orivej has quit [(Quit: #nixos)]
orivej has joined joined #nixos-dev
Sonarpulse has quit [(Ping timeout: 256 seconds)]
<Profpatsch> hrm. self/super fixpoints are great, but I dislike the namespace cluttering.
<Profpatsch> The utility functions are in the same namespace (e.g. for haskelPackages), so what happens if somebody uploads a haskell package called “callPackage”.
<Profpatsch> But I don’t really know how to solve that, except with sub-namespaces like _functions or the like.
<Profpatsch> Then you get the update problem. lenses for nix? :)
<Profpatsch> Then again, why would you want to keep utility functions inside the fixpoint, as long as they don’t call each other?
<Profpatsch> { fetchgit }: self: super: would essentially make fetchgit a constant.
<Profpatsch> But maybe that’s not so bad of a deal.
<Profpatsch> At least in my small local fixpoint?
phreedom has joined joined #nixos-dev
<Profpatsch> pierron_: fix (extends (_: _: { foo = 42; }) (extends (se: su: { bar = se.foo - 19; }))) is bad style, right?
<Profpatsch> It works, but it has to cycle through the fixpoint twice, as compared to swapping the two extends layers, I assume?
<Profpatsch> fix (extends foo (extends bar (_: {})))
<Profpatsch> as compared to
<Profpatsch> fix (extends bar (extends foo (_: {})))
<Profpatsch> dunno, that’s just what my intuition says, haven’t expanded it manually.
<Profpatsch> Oh lol, ({ foo }@args: { foo = foo + 19; } // args) 123
<Profpatsch> Does not do what I thought it would.
<Profpatsch> Should rather go with
<Profpatsch> Oh lol, ({ foo }@args: args // { foo = foo + 19; }) 123
<gchristensen> indeed :)
phreedom has quit [(Remote host closed the connection)]
<Profpatsch> Gosh, this is hard.
<Profpatsch> I get the feeling it would be a lot easier & more rigorous if I could put it in some recursion scheme structure.
orivej has quit [(Ping timeout: 264 seconds)]
<Profpatsch> Oh holy crap, my complex refactoring with fixes and extends seem to have worked flawlessly on the first tr..
<Profpatsch> *try
<Profpatsch> Now I’m kind of afraid of what I’ve become.
phreedom has joined joined #nixos-dev
laggy_wifi has joined joined #nixos-dev
<Profpatsch> People help me rename my yarn2nix library
<Profpatsch> Ah, not library, actual tool.
<Profpatsch> Features:
<Profpatsch> - purely transform yarn.lock files into very minimal, line-diffable nix expressions
<Profpatsch> - the ability to resolve git dependencies by prefetching their repos and including the hashes
<Profpatsch> - completely local transformation if there are no git dependencies (can be used inside nix-build, no large file check-in)
<Profpatsch> - extremely fast
<Profpatsch> - nice code that can be easily extended, new repositories introduced, adapt to new versions of the yarn.lock format
<Profpatsch> - comes with a nix library that uses the power of overlays to make overriding dependenciese possible
<Profpatsch> Probably a few more, dunno.
<Profpatsch> Currently the pretty complex yarn.lock of the HackMD project is resolved & transformed without a hitch.
<Profpatsch> dist/build/yarn2nix/yarn2nix ~/tmp/hackmd/yarn.lock | wc
<Profpatsch> 5306 17068 280246
<Profpatsch> cat ~/tmp/hackmd/yarn.lock | wc
<Profpatsch> 7667 11307 266652
<Profpatsch> Here’s the output for HackMD: https://gist.github.com/Profpatsch/9e50d25faf5a5c4269566e9b7d89199b
<Profpatsch> As you can observe it’s pretty minimal and should work very well with the line-diffs of git.
<Profpatsch> There should not be any duplication.
ma27 has joined joined #nixos-dev
ma27 has quit [(Ping timeout: 272 seconds)]
pie_ has joined joined #nixos-dev
<Profpatsch> Now also with README. :)
pie_ has quit [(Remote host closed the connection)]
pie_ has joined joined #nixos-dev
goibhniu has joined joined #nixos-dev
stqism has quit [(Quit: Like 3 fire emojis lit rn 🔥🔥🔥)]
coup has joined joined #nixos-dev
coup has quit [(Client Quit)]
coup has joined joined #nixos-dev
coup has quit [(Changing host)]
coup has joined joined #nixos-dev
coup is now known as stqism
pie__ has joined joined #nixos-dev
pie_ has quit [(Read error: Connection reset by peer)]
pie__ has quit [(Read error: Connection reset by peer)]
pie_ has joined joined #nixos-dev
ma27 has joined joined #nixos-dev
ma27 has quit [(Quit: WeeChat 1.9.1)]
__Sander__ has joined joined #nixos-dev
orivej has joined joined #nixos-dev
orivej has quit [(Ping timeout: 264 seconds)]
orivej has joined joined #nixos-dev
<gchristensen> Volth is continuing to delete their comments :(
orivej has quit [(Ping timeout: 240 seconds)]
orivej_ has joined joined #nixos-dev
orivej_ has quit [(Client Quit)]
orivej has joined joined #nixos-dev
<niksnut> ?
<gchristensen> Volth deletes almost all their comments on an PR they send
ma27 has joined joined #nixos-dev
orivej_ has joined joined #nixos-dev
orivej has quit [(Read error: Connection reset by peer)]
<gchristensen> peti: yes of course you may have access :D
<gchristensen> peti: please be sure you've read https://github.com/grahamc/ofborg#guidelines
<peti> gchristensen: I did. :-)
pie_ has quit [(Ping timeout: 264 seconds)]
pie_ has joined joined #nixos-dev
propumpkin is now known as contrapumpkin
<MoreTea> Profpatsch: your yarn2nix looks awesome! Do you handle inputs for e.g. libxml as well?
<gchristensen> domenkozar: looks like I have an upcoming projects for your Elm work
<domenkozar> o/
<domenkozar> gchristensen: it's very alpha, but it works :)
<gchristensen> you mean the current UI?
<gchristensen> oh, the Elm work
<gchristensen> yes yes that is fine
<domenkozar> what's next is elm.compiler and elm.packages
<domenkozar> and elm.compiler.018.mkDerivation
orivej_ has quit [(Ping timeout: 256 seconds)]
<laggy_wifi> like does nix have any of its own commands that it itself created, that can accept numbers as arguments, for example "dd" does not count as nix did not make it, nix-env does but idk if it supports numbers as arguments
orivej has joined joined #nixos-dev
<gchristensen> niksnut: when selecting the logo from the "new logo ideas" 2008 haskell thing, was https://wiki.haskell.org/File:Haskell-logo-revolution.png in the running as an option?
<niksnut> don't remember it
<gchristensen> :)
<orivej> gchristensen: https://github.com/NixOS/nixpkgs/pull/32697#issuecomment-352025357 (in case you were not notified: I made a type in the original mention)
<orivej> a typo :)
<gchristensen> ahh cool, thanks :)
<Profpatsch> MoreTea: Which package can I test it with?
<Profpatsch> I assume native dependencies would have to be provided manually; by default each package is overridable via the self/super mechanism, but I’m not sure how to satisfy the potentially large amount of version numbers that need to be patched.
<Profpatsch> Hm, maybe it *is* possible, by reimplementing a versioning scheme inside nix.
FRidh has quit [(Quit: Konversation terminated!)]
<aminechikhaoui> gchristensen: a colleague added a PR a while back https://github.com/NixOS/nixpkgs/pull/31969, do you think it's mergeable or is there anything pending ?
<gchristensen> aminechikhaoui: can your colleague describe the practical differences between the existing config and the recommended config?
<gchristensen> I don't know too much about PAM other than it is easy to accidentally do bad things [insert][links][to][prs][fixing][security][bugs][in][pam] so I believe this is a good improvement
<aminechikhaoui> gchristensen: donnow, I'll ask him ;)
<aminechikhaoui> gchristensen: maybe if there was nixos tests for pam we could know if there is a regression somewhere ?
<gchristensen> there would have to be many many nixos tests for the different combinations, even if we selected just common combinations :) and yes, we probably should have them
<aminechikhaoui> or maybe that's also hard to test, I'm no expert myself in pam
Sonarpulse has joined joined #nixos-dev
<pierron_> Profpatsch: Going twice through a fix-point does not matter much, except when we are trying to add semantic to what the top-level function does, and what does that mean to go through it.
vcunat has joined joined #nixos-dev
__Sander__ has quit [(Quit: Konversation terminated!)]
<Profpatsch> pierron_: Wouldn’t adding a function that is used by inner layers on an outer layer create a round of indirection for each such function call?
goibhniu has quit [(Ping timeout: 256 seconds)]
goibhniu has joined joined #nixos-dev
goibhniu has quit [(Ping timeout: 272 seconds)]
<gchristensen> Another option would be for elm2nix to delete the file if it was created by elm2nix. But know I'll regret making such assumptions. :D
<catern> gchristensen: p'rhaps we could automatically generate tests for each configurations
<gchristensen> heh
<gchristensen> I think I kill'd that one
<gchristensen> which PR is it for?
<gchristensen> oof - I killed it b/c it consumed >7GB of RAM to eval
<domenkozar> huh
<domenkozar> that's bad news, is that more than usual?
<gchristensen> yeah, it usually doesn't cause my server to crawl to a stop :)
<gchristensen> yeah, it usually doesn't cause my server to slow to a crawl
<domenkozar> well it did evaulate last commit
<gchristensen> lets try a new eval
<gchristensen> I'll watch my system
goibhniu has joined joined #nixos-dev
<domenkozar> gchristensen: m'kay
goibhniu has quit [(Remote host closed the connection)]
<gchristensen> domenkozar: if I stop replying: https://twitter.com/grhmc/status/941752398984380417
ma27 has quit [(Ping timeout: 255 seconds)]
<domenkozar> gchristensen: :o
<domenkozar> I wonder what I do wrong to feel no pain
<gchristensen> hmm I'm up to 5.5G in use during an eval, but not evaling your PR
ma27 has joined joined #nixos-dev
<domenkozar> well it's a lot of new outputs
ma27 has quit [(Client Quit)]
<gchristensen> 6.3G
<gchristensen> I could move these eval checks to my router, that has more RAM than my server
<domenkozar> that is final RSS memory use for normal eval?
* gchristensen is no good at this stuff
<domenkozar> my router has 400MB ram, what are you doing :D
<gchristensen> not everybody has a router with 16G ram? :)
<domenkozar> ah, improving nixos
* clever looks
<clever> 8gig of ram on my router
<gchristensen> it routes packets well enough
<vcunat> :-)
<gchristensen> domenkozar: ps #nixos-on-your-router
ma27 has joined joined #nixos-dev
goibhniu has joined joined #nixos-dev
<gchristensen> can someone merge master to staging to fix eval issues?https://gist.github.com/GrahamcOfBorg/e2d947107e0963affe85edc6f791b901
<gchristensen> I thought I did but maybe I patched taglib after merging master to staging
<vcunat> gchristensen: pushed
<gchristensen> thank you!
<gchristensen> todo: expose eval stats in https://events.nix.gsc.io/stats.php
<cransom> routers with 16g of ram are great.
garbas has joined joined #nixos-dev
<garbas> vcunat: ping
<vcunat> pong
<garbas> first sorry, i should more carefully look at the labels
<garbas> second, should i backout the changes?
<vcunat> people aren't much used to the labels yet, I suppose :-)
<vcunat> let me check the exact rebuild amount
<gchristensen> I wonder how much over 500 it is, if it is close to 500 I'd not worried
<vcunat> in any case, thanks to my merge mentioned above, it's in staging now anyway
<gchristensen> it is a bit funny how a label and a guideline can quickly turn in to a rule
<vcunat> well, we've had the rule for a long time
<vcunat> but there was no easy means to check the rebuild amount
<garbas> gchristensen: maybe having an exact number of rebuild packages couuld also help with judgement
<gchristensen> that would be nice
<vcunat> ~4k on x86_64-linux
<vcunat> let me revert the libva bump
<garbas> vcunat: i have the commit ready
<vcunat> OK
<garbas> i will revert all 3 commits
<gchristensen> I think that will cause problems when merging staging in to master, it'll keep the patch reverted
<gchristensen> I think .. :)
<vcunat> yes, we need to merge master to staging after that and re-revert on staging
<vcunat> (better soon before we forget)
<garbas> vcunat: done
vcunat has quit [(Ping timeout: 272 seconds)]
<gchristensen> orivej: did you not wait for grahamcofborg to do eval checks on https://github.com/NixOS/nixpkgs/pull/32721 because you were certain it'd work, or ofborg was being slow, or a different reason? just curious, I can fix one of those problems :)
<orivej> gchristensen: I'd very much like it to work, but it did not begin evaluation for unusually long so I figured it won't
vcunat has joined joined #nixos-dev
<gchristensen> i see, ok
<gchristensen> this weekend I will try to run the evaluator on at least one more server
<gchristensen> thanks!
orivej has quit [(Ping timeout: 272 seconds)]
<lassulus> hey, maybe someones here does know, how to get internet inside a nixos-test
<gchristensen> like during nix-build ?
<lassulus> yes, that would be the plan i guess
<lassulus> if there is some other way, I would also try that
<vcunat> if it's a fixed-output derivation, you should have it
<gchristensen> I don't think you can, lassulus
<gchristensen> because nixos tests will never produce the same output
<lassulus> yes, but this is expected
<lassulus> i just want to ping something
<gchristensen> something specific? :)
<lassulus> on the real internet
<gchristensen> you can't
<vcunat> you may have a test with empty output, making it fixed-output
<vcunat> (and get all results just from the log)
<lassulus> but i really like the framework and just don't want to reimplement nixos-tests with internet.
<vcunat> there used to be an undocumented attribute, __chroot or something
<gchristensen> the framework is excellent, may I ask why you need to ping something on the internet?
<vcunat> if it's not intended for upstream nixpkgs, you may just turn off sandboxing, too
<gchristensen> oh yeah I forget about that
<lassulus> actually I need to test a script witch git fetches something from a predefined place. And I'm really to lazy to mockup git for that test. And it's outside of nixpkgs.
<lassulus> And i already tried nix-build --option build-use-sandbox true ./mytest.nix
<gchristensen> you could use nixos' vm test framework support for 2 VMs and have one VM serve the repo and the other fetch it
<lassulus> aeh false
<lassulus> well I could emulate the internet in my test I guess. but just having internet would also be nice :D
<vcunat> `--option build-use-sandbox false` should work, if ran as root, I think
<lassulus> hmm, running as root might be a problem
<lassulus> but I see the problem maybe
<simpson> lassulus: I know that you see a "this would be nice", but we see a "this is a massive gaping hole in our security model".
<lassulus> yeah, I realized that now
<lassulus> so getting internet inside a test, without running the test as root, would be considered a bug then?
<simpson> Getting arbitrary networking is a bug. Getting specific kinds of networking is a thing that Nix sometimes allows.
<lassulus> would it be possible to fetch packages from the nixos cache inside a test?
<lassulus> or what would this "specific kinds of networking" be?
<simpson> Fixed-output derivations, some sorts of recursion using IFD, pulling stuff from cache.nixos.org, that sort of thing.
<lassulus> alright, that is helpfull, thank you
<MoreTea> Profpatsch: anything that does something with node-gyp. I'll dig for an example
<jtojnar> why is nixpkgs-channels a separate repo again?
<jtojnar> if the branches were in the main repo GitHub could easily show whether the commit already propagated to a channel
<gchristensen> so we can't push to it
<gchristensen> that would be a nice feature
<jtojnar> would not protecting the branches be enough?
<gchristensen> no
<gchristensen> that only prevents force pushing I think
<gchristensen> we could sync back the channel's branches though, that'd allow you to see that data... but I think it would be very confusing for people
<gchristensen> one option would be to label PRs or something once they are released througha channel
<jtojnar> Maybe “Require status checks to pass before merging” could be abused with a Travis rule failing unless hydra is pushing
<jtojnar> but that would require a temporary branch for the status checks to run
<vcunat> well, we could at least make it a fork of the main repo
<vcunat> the stats look strange when you have the same commits counted in two "projects"
<vcunat> IIRC there was also some other reason for a separate repo, but I don't recall what it was.
<samueldr> (making it a fork will also make it easier to compare branches)
vcunat has quit [(Quit: Leaving.)]
orivej has joined joined #nixos-dev
jtojnar has quit [(Quit: jtojnar)]
jtojnar has joined joined #nixos-dev
goibhniu has quit [(Ping timeout: 272 seconds)]
phreedom has quit [(Ping timeout: 256 seconds)]
phreedom has joined joined #nixos-dev