gchristensen changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | 18.03 release managers: fpletz and vcunat
davidlt has quit [Ping timeout: 256 seconds]
Lisanna has quit [Remote host closed the connection]
jtojnar has joined #nixos-dev
{`-`}_ has joined #nixos-dev
MoreTea2 has joined #nixos-dev
layus_ has joined #nixos-dev
Profpatsch has quit [*.net *.split]
{`-`} has quit [*.net *.split]
acowley has quit [*.net *.split]
primeos has quit [*.net *.split]
layus has quit [*.net *.split]
MoreTea has quit [*.net *.split]
layus_ is now known as layus
acowley has joined #nixos-dev
primeos has joined #nixos-dev
Profpatsch has joined #nixos-dev
thefloweringash has quit [Quit: WeeChat 1.9.1]
pie_ has quit [Remote host closed the connection]
pie_ has joined #nixos-dev
lopsided98 has quit [Remote host closed the connection]
mbrgm_ has joined #nixos-dev
mbrgm has quit [Ping timeout: 264 seconds]
mbrgm_ is now known as mbrgm
jtojnar has quit [Ping timeout: 240 seconds]
dj_goku_ has quit [Quit: Lost terminal]
lopsided98 has joined #nixos-dev
pie_ has quit [Ping timeout: 256 seconds]
zybell_ has quit [Ping timeout: 260 seconds]
zybell_ has joined #nixos-dev
orivej has joined #nixos-dev
davidlt has joined #nixos-dev
goibhniu has joined #nixos-dev
MichaelRaskin has quit [Quit: MichaelRaskin]
Bogdacutu has joined #nixos-dev
goibhniu has quit [Ping timeout: 240 seconds]
sphalerite1 is now known as sphalerit
thefloweringash[ has quit [Ping timeout: 248 seconds]
copumpkin has quit [Ping timeout: 248 seconds]
srhb has quit [Ping timeout: 264 seconds]
dtz has quit [Ping timeout: 248 seconds]
garbas has quit [Ping timeout: 264 seconds]
simpson has quit [Ping timeout: 276 seconds]
srhb has joined #nixos-dev
garbas has joined #nixos-dev
simpson has joined #nixos-dev
copumpkin has joined #nixos-dev
Bogdacutu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thefloweringash[ has joined #nixos-dev
dtz has joined #nixos-dev
primeos[m] has quit [Ping timeout: 245 seconds]
regnat[m] has quit [Ping timeout: 245 seconds]
shlevy has quit [Ping timeout: 256 seconds]
michaelpj has quit [Ping timeout: 276 seconds]
shlevy has joined #nixos-dev
srhb has quit [Ping timeout: 240 seconds]
michaelpj has joined #nixos-dev
primeos[m] has joined #nixos-dev
srhb has joined #nixos-dev
regnat[m] has joined #nixos-dev
goibhniu has joined #nixos-dev
Bogdacutu has joined #nixos-dev
Bogdacutu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has quit [Ping timeout: 276 seconds]
jtojnar has joined #nixos-dev
ma27 has joined #nixos-dev
ma27 has quit [Ping timeout: 276 seconds]
ma27 has joined #nixos-dev
zybell_ has quit [Ping timeout: 255 seconds]
jtojnar_ has joined #nixos-dev
jtojnar_ has quit [Remote host closed the connection]
jtojnar has quit [Ping timeout: 240 seconds]
abbradar has joined #nixos-dev
tilpner has quit [Quit: :wq]
Bogdacutu has joined #nixos-dev
tilpner has joined #nixos-dev
pie_ has joined #nixos-dev
thefloweringash has joined #nixos-dev
<gchristensen> is it just me, or does `--check` refuse to use remote builders?
Bogdacutu has quit [Quit: Textual IRC Client: www.textualapp.com]
ma271 has joined #nixos-dev
ma27 has quit [Ping timeout: 264 seconds]
<LnL> yes
<LnL> otherwise it will just get cached
JosW has joined #nixos-dev
<gchristensen> aye
<NinjaTrappeur> Hey, I'm new to nix and I wanted to dive a bit in the implementation. I started to fix a minor issue on nix-store as an excuse to dive in the code. I raged for 30 minutes in front of GDB not understanding why my changes to lib-store were not reflected before realizing I was actually not using my local build but my nixos nix-daemon ><
<NinjaTrappeur> Is there any clean way to prevent the nix-shell "nix" environment from calling my nix-daemon?
<aminechikhaoui> are you on NixOS ?
<NinjaTrappeur> yes
<clever> NinjaTrappeur: NIX_REMOTE=local
<clever> it will also need write access to /nix/store for that to work
<clever> so it only works as root
<NinjaTrappeur> clever, awesome, thanks! Yes, of course.
<NinjaTrappeur> May I add this tip in the hacking section?
<clever> though you can also use a different rootfs, NIX_REMOTE=local?root=/home/clever/rootfs/
<clever> it will then act on /home/clever/rootfs/nix/store/
<clever> the binaries within will only work if you chroot to the rootfs dir
<aminechikhaoui> I guess you could also set `nix.package = (builtins.storePath <path>); where path is your own nix versions built with nix-build
<clever> and still expect a /nix/store path for the store
<NinjaTrappeur> ah, good idea
<NinjaTrappeur> thanks
<clever> that can also help prevent it from ever corrupting the real store
coconnor has joined #nixos-dev
abbradar has quit [Remote host closed the connection]
zybell_ has joined #nixos-dev
abbradar has joined #nixos-dev
<abbradar> ,b
<abbradar> wrong window, sorry
orivej has joined #nixos-dev
<copumpkin> FRidh: I'm seeing some odd behavior with a private buildPythonPackage between 17.09 and 18.03 that I can't explain. I didn't have doCheck specified before, and I don't think it ran tests, but now it does seem to, and it's not a big deal but I also don't understand what changed in the python machinery to run tests automatically
<LnL> copumpkin: I think the checkPhase was enabled by default on master a while back
Lisanna has joined #nixos-dev
<Profpatsch> Sonarpulse: What’s the best way to collect all dependencies of a derivation?
<Sonarpulse> Profpatsch: in what sense?
<Sonarpulse> buildInputs and friends?
<Sonarpulse> nix references if it is built?
<Profpatsch> Every drv that goes into building a drv basically.
<Sonarpulse> there is some nix-level thing for that
<Sonarpulse> I don't remember what it is called
<Profpatsch> There’s a bunch of new fields I’ve never seen.
<Profpatsch> hello.depsBuildBuildPropagated
<Profpatsch> hello.all
<Sonarpulse> oh those are the new dep types for cross
<Sonarpulse> no idea what "all" is though
<Sonarpulse> is this for check meta?
<Profpatsch> nix-repl> map (v: v == glibc) glibc.all
<Profpatsch> [ true false false false false ]
<Profpatsch> Sonarpulse: I’m investigating if getting a full tree of dependencies is possible from within nix
<Profpatsch> There’s just *so* many circular dependencies.
<Profpatsch> Oh, if I use drvAttrs it might work!
<Profpatsch> nix-repl> collectDeps hello.drvAttrs
<Profpatsch> [ «derivation /nix/store/2zy7frljkla7k498xyf3aivygni11hrp-hello-2.10.tar.gz.drv» «derivation /nix/store/dxlr68sqr9jqj59ifdvpmw25zjz5lw7v-stdenv.drv» ]
<Profpatsch> nix-repl> collectDeps glibc.drvAttrs
<Profpatsch> [ «derivation /nix/store/jy160k2pfmhb95m2aa2gygx4bksph5ry-linux-headers-4.15.drv» «derivation /nix/store/6zm8jrm3ah53h4mh4d85w7776x8rd2jq-glibc-2.26.tar.xz.drv» «derivation /nix/store/glr8xn8g16p22gmyk6qb0fk2qkfm4w4s-stdenv-linux-boot.drv» ]
<Sonarpulse> Profpatsch: what is the full tree of deps for?
<Sonarpulse> generally you don't want that
<Sonarpulse> just all the listed deps
<Sonarpulse> but there are exceptions
<Profpatsch> Sonarpulse: Can you check whether the output of `scrub derivation` looks sensible to you for a bunch of derivation? https://gist.github.com/Profpatsch/91b5a25d31764514485277f86b7ea862
<Profpatsch> *of derivations
<Sonarpulse> Profpatsch: all might relate to multiple outputs
<Sonarpulse> which is cyclic
<Profpatsch> Basically I want the nested scrubDrv (name, out derivation, all dependencies, meta.maintainers) and export it as json
<Sonarpulse> Profpatsch: ah ok
<Profpatsch> nix-instantiate test.nix --json --eval --strict | jq
<Sonarpulse> so yeah this is definitely nix-level not nixpkgs
<Profpatsch> (scrub.nix)
<Sonarpulse> buildInputs would be a layer violation
<Sonarpulse> Profpatsch: you could literally just import a drv file
<Sonarpulse> one can do that, you know
<Profpatsch> Sonarpulse: Here’s what I get from scrub glibc:
<Profpatsch> Sonarpulse: Yeah, but all the meta info is missing.
<Sonarpulse> this is for meta check?
<Profpatsch> Which is the relevant bit for finding the corresponding maintainers.
<Profpatsch> Nope, for pinging maintainers.
<Sonarpulse> ah ok
<Sonarpulse> hmm
<Profpatsch> Maybe it’s already enough. But it’s probably missing half the outputs.
<Sonarpulse> no bootstrap tools on gcc seems wrong
<Sonarpulse> yeah
<Profpatsch> *err dependencies.
<Profpatsch> I’m collecting them from drvAttrs, which is probably wrong?
<Sonarpulse> I suppose meta is like passthru
<Sonarpulse> doesn't influence drb
<Profpatsch> exactly.
<Sonarpulse> the point of pinging all the deps is what exactly?
<Sonarpulse> (basic concept makes sense)
<Sonarpulse> (just trying to be really precise on goal)
<Profpatsch> Ping the maintainers whose drvs changed.
<Sonarpulse> ah from a PR?
<Profpatsch> yeah
<Sonarpulse> that would be reverse dependencies of change, right?
<Profpatsch> Yep.
<Sonarpulse> err but this is looking at dependencies not reverse dependencies
<Sonarpulse> if gcc is changed
<Sonarpulse> those will be the only things that *haven't* changed
<Profpatsch> That’s just one small part.
<Sonarpulse> ok
<Profpatsch> The algorithm is:
<Profpatsch> Take a list of all packages (pkgs)
<Profpatsch> Build up a tree of all deps for each of them
<Profpatsch> Do that twice, with and without patch
<Profpatsch> Diff the tree for changed drvs.
<Profpatsch> The deepest leaves are the reverse dependencies that caused the changes
<Sonarpulse> the deepest leavs of the diff tree you mean?
<Profpatsch> yes.
<Sonarpulse> ok
<Sonarpulse> so there are ways with like "......${asdf}....." to add dependencies
<Sonarpulse> that are very hard to catch
<Sonarpulse> the string contexts or whatever i dunno how it works
<Profpatsch> Right!
<Profpatsch> They are not in the type="derivation" attrset I suppose? I can test, actually.
<Sonarpulse> so the drv files list all the deps
<Sonarpulse> including those secret ones
<Sonarpulse> but I don't think the drv attrset does
<Sonarpulse> try importing a drv file in the repl and see what happens
<Sonarpulse> Profpatsch: I'd consider going straight to hnix for this one
<Sonarpulse> I don't think its possible to be 100% correct in nix
<Sonarpulse> unless we can override things to put the meta attr in the drv
<Profpatsch> Ah, they are not.
<Profpatsch> Well, then the algorithm is changed.
<Sonarpulse> if we can annotate derivations
<Sonarpulse> and shlevy has talked about that
<Profpatsch> Ah, no, I can’t pick those up and reassiciate them with meta info sadly.
<Sonarpulse> then we can put meta in drvs
<Sonarpulse> and then your algorithm works on drvs
<Profpatsch> So there is no way to go from drv or storepath to a meta attribute.
<Sonarpulse> nope
<Sonarpulse> not that I know of at least
<Profpatsch> Hm, maybe there is.
<Sonarpulse> it's stripped away
<Sonarpulse> well you could make index
<Sonarpulse> I suppose
<Profpatsch> If I constructed a hashmap from drv paths/out paths to drvs
<Profpatsch> yeah, index
<Sonarpulse> drvpaths -> meta.maintainers
<Sonarpulse> nix-diff should probably know how to find the leaves
<Sonarpulse> (in general its a dag not tree, then the root changes are the *only* leaves)
<Profpatsch> Every dag can be made into a tree. :)
<Profpatsch> Yeah, so building an index and working on that is going to be the way to go I think.
<Profpatsch> And probably working breadth-first, calling into nix-instantiate multiple times.
goibhniu has quit [Ping timeout: 260 seconds]
<Profpatsch> To prune when already known drvs are reached.
<Profpatsch> Building the index is a best-effort thing, but because pkgs contains references to nearly all derivations of note, we shouldn’t miss too many packages.
<Profpatsch> Or maintainers fields in this case.
<Profpatsch> And one can warn on differences in dependencies between the drv files and what is found on the nix level.
<niksnut> Profpatsch: there is some code for traversing derivation graphs in maintainers/scripts/find-tarballs.nix
<niksnut> it uses genericClosure to make the traversal efficient
<Profpatsch> niksnut: Thanks for the tip!
Lisanna has quit [Ping timeout: 260 seconds]
Lisanna has joined #nixos-dev
Lisanna has quit [Client Quit]
Jackneill has quit [Read error: Connection reset by peer]
Jackneill has joined #nixos-dev
jtojnar has joined #nixos-dev
pie__ has joined #nixos-dev
pie_ has quit [Ping timeout: 264 seconds]
jtojnar has quit [Quit: jtojnar]
FRidh has joined #nixos-dev
phreedom has quit [Ping timeout: 268 seconds]
phreedom has joined #nixos-dev
MichaelRaskin has joined #nixos-dev
JosW has quit [Quit: Konversation terminated!]
<Sonarpulse> fpletz: see my old ping?
<Sonarpulse> shlevy: I want to deprecate platform and system nixpkgs arguments in favor of localSystem
<Sonarpulse> which has been around a few releases
<Sonarpulse> but isn't really known about
<Sonarpulse> should we deprecate now and remove in 19.03
<Sonarpulse> or can we deprecate in 18.03 retroactively and remove in 18.09?
<gchristensen> probably can't retroactive deprecate
<Dezgeg> why do we need to deprecate it anyways?
<Sonarpulse> Dezgeg: cause it's sort of confusing
<Sonarpulse> complicates impure.nix
<Sonarpulse> even if the user is confused, it makes them think the wrong things
<Dezgeg> how will it un-confuse all the existing users who have --argstr system foo in their scripts that has worked for years and have to go modify them?
<Sonarpulse> Dezgeg: you value backwards compatability more than me
<Sonarpulse> after isArm
<Sonarpulse> I don't think I'll convince you this is a good idea either
<Sonarpulse> but here i goes anyways
<Sonarpulse> I made localSystem to match crossSystem
<Sonarpulse> and {build,host,target}Platform
<Sonarpulse> so that everything had the same structure
<Sonarpulse> having system and platform as top level arguments to nixpkgs is...
<Sonarpulse> a) weird because the division of labor is kind of arbitrary
<Sonarpulse> b) obscures the fact that everything is now the same schema/type
<Sonarpulse> c) obscures cross in general
<Sonarpulse> d) doesn't allow setting all options
<Sonarpulse> removing them and leaving localSystem
<Sonarpulse> a) makes fewer redundant ways to sets things
<Sonarpulse> b) shows the relation
<Sonarpulse> c) hints at cross being available
taktoa has quit [Remote host closed the connection]
FRidh has quit [Quit: Konversation terminated!]
abbradar has quit [Remote host closed the connection]
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos-dev
jtojnar has joined #nixos-dev
goibhniu has joined #nixos-dev
orivej has quit [Ping timeout: 276 seconds]
xeji has joined #nixos-dev
goibhniu has quit [Ping timeout: 265 seconds]
taktoa has joined #nixos-dev
<obadz> so I remember there's a way to either check that a derivation output doesn't contain a specific dependency (and fail if it does) or maybe even to prune the dependency, but I don't remember how to do it.. anyone knows?
<obadz> (runtime dependency)
<gchristensen> disallowedRequisites I thin
<gchristensen> https://search.nix.gsc.io/?q=allowedRe shows also allowedReferences which may be helpful?
<LnL> yeah, we use that in the darwin stdenv
<LnL> there's also allowedRequisites if you want a whitelist instead of a blacklist
<obadz> does it fail if they are there?
<obadz> or does it blank them out?
xeji has quit [Quit: WeeChat 2.0]
<LnL> requisites fails
<gchristensen> fails
<LnL> to nuke references you can use removeReferencesTo
<LnL> go stuff uses that a lot IIRC
<obadz> great, thanks!
<obadz> worked! ⇒ https://git.io/vxSRa
ma271 has quit [Ping timeout: 265 seconds]
<gchristensen> :D
<obadz> that's like 800Mb saved per nixos closure for me :-P
<LnL> heh, did I mention something about go? :p
<gchristensen> :o
<obadz> yes you did ;-)
<gchristensen> maybe I should look at this tooling for ensuring my initrds are small
<LnL> don't we do that already?
<gchristensen> certainly not in the initrds I make, I can reference files willy nilly
<gchristensen> I've made ~150G of initrd's since Monday :')
<obadz> !m gchristensen
pie__ has quit [Remote host closed the connection]
davidlt has quit [Ping timeout: 276 seconds]