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
TonyTheLion_ has quit [Ping timeout: 260 seconds]
<dtz> can "update-nix" be used on a nix 1.11 installation but with a nix-shell providing Nix 2?
<dtz> err, can I tell people that something like $ nix-shell '<nixpkgs>' -A nixUnstable --run "nix upgrade-nix"
<dtz> would be reasonable?
<dtz> I'd appreciate thoughts, but in the meantime I suppose i'll try it in a docker container or so :)
<dtz> err * "-p nixUnstable", but you get the idea :)
sonarpulse has quit [Ping timeout: 248 seconds]
<jtojnar> could I please get someone's opinion on the GNOME updateScript? https://github.com/NixOS/nixpkgs/pull/33086 (ignore the big autogenerated commit)
<gchristensen> jtojnar: link to the scripti tself?
<gchristensen> oh I see
<jtojnar> gchristensen: it is multiple parts
<gchristensen> I mean it looks great
<gchristensen> simple even
<jtojnar> I am mostly concerned that every package's updatescript is a separate derivation
<jtojnar> (separate writeScript)
<jtojnar> but I guess it cannot be avoided when using maintainers/scripts/update.nix
<gchristensen> yeah
<gchristensen> and it isn't in the "hot path" for usage
<gchristensen> just when updating
<gchristensen> in which case N more drvs isn't going to be such a big deal
<jtojnar> also I do not like having to pass the attribute path
<jtojnar> it is needed by update-source-version
mbrgm has quit [Ping timeout: 252 seconds]
mbrgm has joined #nixos-dev
<jtojnar> and also I do not see how to make maintainers/scripts/update.nix pass some arguments (stability configuration)
<jtojnar> but I guess I will just change it in the file, when updating an unstable branch
<jtojnar> I will just merge it and if someone does not like it, they can open a PR
disasm has quit [Quit: WeeChat 1.9.1]
disasm has joined #nixos-dev
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-dev
orivej has quit [Ping timeout: 260 seconds]
aminechikhaoui has quit [Ping timeout: 248 seconds]
aminechikhaoui has joined #nixos-dev
jtojnar_ has joined #nixos-dev
jtojnar has quit [Ping timeout: 252 seconds]
jtojnar_ is now known as jtojnar
jtojnar has quit [Ping timeout: 268 seconds]
pie_ has quit [Ping timeout: 240 seconds]
aminechikhaoui has quit [Ping timeout: 256 seconds]
aminechikhaoui has joined #nixos-dev
tv has quit [Ping timeout: 240 seconds]
tv has joined #nixos-dev
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 245 seconds]
MichaelRaskin has quit [Quit: MichaelRaskin]
vcunat has joined #nixos-dev
vcunat has quit [Client Quit]
goibhniu1 is now known as goibhniu
<shlevy> fpletz: vcunat: I have cross-compiled NixOS working in a branch on top of staging. I have no particular need to have it in 18.03 vs not, but would you be interested in including it if I could get the PR to staging up today?
genesis has joined #nixos-dev
TonyTheLion has joined #nixos-dev
ciil has quit [Quit: leaving]
ciil has joined #nixos-dev
JosW has joined #nixos-dev
pie_ has joined #nixos-dev
<shlevy> Yet another reason not to have /bin/sh... https://nix-cache.s3.amazonaws.com/log/zczav3lw4pdzjy3ilqz9mng539xca5bi-acl-2.2.52.drv this succeeds on my machine because my /bin/sh is bash
<shlevy> doing patchShebangs to fix it but it shouldn't be possible at all...
<Dezgeg> the build machine nix lacks https://github.com/NixOS/nixpkgs/pull/34628
<shlevy> Right, but that's a workaround, not a solution
<Dezgeg> no
<Dezgeg> this needs to be fixed in nix
<shlevy> Right. Not by enhancing the shell though, by letting builders determine what sets /bin/sh or not having /bin/sh at all during builds
<Dezgeg> per-drv /bin/sh would be ideal, yes
<shlevy> I think I'll make an RFC for that
<shlevy> (once the core team is resolved either way)
pie_ has quit [Ping timeout: 268 seconds]
pie_ has joined #nixos-dev
<gchristensen> what are the next steps on getting the core team RFC merged? should probably : 1. establish a mailing list, 2. possibly establishing an IRC channel (may I propose #nix-core-team?) 3. getting +1's from everyone _on_ the team
__Sander__ has joined #nixos-dev
<shlevy> gchristensen: I don't think we should have a mailing list or IRC until the RFC is approved/merged...
<gchristensen> s/merged\?.*$//
ma27 has joined #nixos-dev
<shlevy> Sure :)
<shlevy> Not sure why we'd approve and not merge though
<gchristensen> ok now you're just being difficult :P
<gchristensen> how do we finish this
<shlevy> Oh, sorry, I thought you were substituting in mine :D
<shlevy> Gotcha
<gchristensen> XD
<shlevy> Maybe just make a comment: +1 response for "yes", -1 for "no", unsure face for "still have questions before I can decide". The latter two should require explanation/chance for followup
<shlevy> And then if we reach a clear overwhelming +1 and all of the questions are answered we can go ahead. Unsure how much lead time to give...
<fpletz> shlevy: sounds good to me :)
<fpletz> shouldn't break any other platforms, right?
<shlevy> Right
<shlevy> OK, I merged in latest staging last night and my rebuild is almost finished
<fpletz> Mic92: will take care of that systemd PR now, sorry for the delay
<shlevy> Assuming it boots I'll post the PR
<fpletz> not sure when exactly vcunat wants to branch off though, he's not on irc much and writing emails is so old-school %)
<LnL> he's here sometimes :)
<gchristensen> he's made a commitment to be here more for the release duties
<gchristensen> and has done a pretty good job of thath
<shlevy> A blog post I found for cross-compiling gobject-introspection mentions using Wine to run host-native python :D
pie_ has quit [Ping timeout: 245 seconds]
<sphalerite> quality corss
<sphalerite> cross
adisbladis has quit [Ping timeout: 240 seconds]
<dtz> Can we have a PR/issue backlog sprint/party? There are a lot of good PRs going back months...
<gchristensen> we definitely should!
<dtz> OMG ryantm hahah
<gchristensen> what happened?
<dtz> Oh, just the ongoing flood of PRs, nothing new
<gchristensen> haha yeah
ma27 has quit [Quit: WeeChat 2.0]
goibhniu has quit [Ping timeout: 245 seconds]
ma27 has joined #nixos-dev
goibhniu has joined #nixos-dev
pie_ has joined #nixos-dev
<Mic92> dtz: maybe start with the older ones. sometimes they already good progress and wonder why nobody review them.
<Mic92> *made good progress
<gchristensen> this would be a cool thing: http://pxeboot.nixos.org/?config=https://gist.github.com/grahamc/7aaa99d2a995ec8c1a9c6800a22fdc8e
<srhb> gchristensen: We have something like that, except the actual built system is what is requested, not a configuration.nix to be built.
<fpletz> gchristensen: sure thing, no blame there :) we have a talent to miss each other though
<srhb> Could probably generalize that faaaairly easily.
<gchristensen> srhb: no way...!!!
<srhb> gchristensen: From your surprise I feel like I'm misunderstanding your question :-P
<gchristensen> no I'm just Extremely Excited right now :P zimbatm is riling me up in another chat :D
<srhb> gchristensen: What we have feeds the machine ID (I don't recall if we use a network hardware address, but probably) to a server that decides on the image to serve
<srhb> gchristensen: The image is built from a specification of mac -> configuration.nix more or less
<srhb> By hydra, of course
<srhb> That's all though
<fpletz> injecting a config would require a rebuild of the netboot initrd, if you want to live-boot from that url it would probably take too long to build :)
orivej has joined #nixos-dev
<fpletz> or write pass the url via kernel cmdline and write a service that does a nixos-rebuild with that config
<fpletz> we also have a netboot setup, that would be a nice idea :)
<fpletz> gchristensen: if we have a fixed url for netboot we can finally get listed on netboot.xyz :)
<gchristensen> yeah, that is still an annoying issue :P
<zimbatm> what is a typical timeout for netboot?
<zimbatm> the request could hang while the build is happening
<gchristensen> what are the chances netboot firmware is resistant to the slow loris attack
<fpletz> ipxe ftw :)
<gchristensen> same question :)
<fpletz> not sure about ipxe http timeouts but the connect timeout is 30s
<gchristensen> my bet is if the image service sends a single byte every few seconds we'd stay connected just fine :A)
<zimbatm> is there a prefix in the response that is always the same? fixed size bytes * 30 second :)
<gchristensen> well it is HTTP so we can send as many HTTP headers as we want
<clever> gchristensen: oh, if you return a file starting with #!ipxe, it will be parsed as an ipxe script
<clever> gchristensen: that script could then sleep, then re-execute an http url
<clever> which just returns the same script
<gchristensen> haha, true
<fpletz> clever: oh, yeah, it would have to return an ipxe script anyway at some point due to the init= kernel param for the system store path
<fpletz> that will change if the config is dynamic :)
Willi_Butz has quit [Ping timeout: 256 seconds]
alunduil_ has quit [Ping timeout: 256 seconds]
<shlevy> /nix/store/jhrsn9fq6jymrsw2njj7lbg4ni1kfi44-extra-utils-riscv64-unknown-linux-gnu/bin/ash: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
<shlevy> Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
<shlevy> *technically* I booted cross-nixos :D
niksnut_ is now known as niksnut
<dtz> :D
<dtz> \o/
<shlevy> Aaah the failure is due to lack of proper LDD
<shlevy> Forgot I hadn't fixed that yet.
<sorear> LDD?
<shlevy> Sorry, no caps
<shlevy> Currently the nixos initrd works by running ldd on each binary and copying the libs needed
<shlevy> Rather than using nix's closure, which is likely to be more than we need
<shlevy> So instead I need a recursive readelf script :D
<sorear> huh. didn't know glibc's ldd didn't work in that way
<clever> shlevy: qemu-user?, dynamicaly linked?
<shlevy> No qemu-user
<clever> shlevy: oh, or cross ldd?
<shlevy> cross-glibc doesn't even build ldd :)
<clever> shlevy: also, ldd is just a bash script to set a few env vars, one min
<shlevy> I'm just going to use readelf to find DT_NEEDED and rpath
<shlevy> clever: yes, but then it calls the loader
<clever> shlevy: you can use qemu-user for that, without binfmt-misc
<dtz> pax-utils' lddtree may be useful but likely overkill.
<shlevy> Sure, but it's overkill
<dtz> esp since I have it install the python version by default.
<dtz> but yeah ldd behavior shouldn't require execution
<dtz> "shouldn't" :)
<clever> LD_TRACE_LOADED_OBJECTS=1 qemu-user-riscv /nix/store/risk/lib/ld.so foo
<clever> in theory, this should work
Willi_Butz has joined #nixos-dev
<Mic92> shlevy: do you already have hardware for risc-v?
<shlevy> Mic92: Nope, in a month or so
<Mic92> shlevy: we have one strong FPGA here and a hardware guy who wants checkout risc-v sometime. maybe this will weekend project later or so. I assume you have risc-v branch somewhere?
<clever> Mic92: ive also got an fpga, let me find its specs...
<shlevy> Mic92: I'll post about it to the ML when I've got this step working
goibhniu has quit [Ping timeout: 240 seconds]
<clever> Spartan 6 XC6SLX9 FPGA
goibhniu has joined #nixos-dev
<clever> 9152 logic cells, 11440 flipflops, 90kb distro ram, 576kb block ram
<clever> Mic92: any chance that might support it?
<niksnut> I wrote a braindump with some ideas for improving the Nix language: https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d
<niksnut> comments welcome
<Mic92> clever: I have no idea :). But the RAM alone does sound too much, if you want to run anything except bar metall?
<clever> Mic92: thats more what you would use as cache
<clever> Mic92: it also has a ddr3 controller
<clever> though i dont like the odds of getting ddr3 to work over 0.1" headers
<Mic92> clever: see, I have not much experience with fpga's. I only did one student assignment using VHDL.
<Mic92> and only in a simulator and not targeting FPGAs actually
<clever> 1st page has a lot of the core details
<clever> oh, it even supports gigabit ethernet, sata, displayport, and pcie!, neat
<sorear> assuming you can get sufficient signal integrity for ddr, that's fine
pie_ has quit [Remote host closed the connection]
pie_ has joined #nixos-dev
<manveru> niksnut: so {{}} would be the new syntax for the extensible attrs?
<niksnut> maybe
<niksnut> first I had "ext { ... }"
<niksnut> or maybe go unicode, « attrs » :-)
<aminechikhaoui> {{}} is nicer :D
<niksnut> so many to choose from https://www.compart.com/en/unicode/category/Ps
<niksnut> { ... }
<gchristensen> perfect choice
<gchristensen> though I was sort of thinking ❤️ ... 👀
<manveru> :D
<aminechikhaoui> hehe
<clever> those dont even render on my end
<gchristensen> it is a heart then the emoji for eyes looking left
<manveru> well, i think the `include` builtin would be super awesome already...
<samueldr> « and » will finally give a leg up to french-speaking nix developers!
<gchristensen> we can start fundraising by selling Nix-specific keyboards with « and »
<niksnut> or use emojis
<niksnut> meta.broken = ☹;
<clever> :D
<samueldr> or a compose key drive
<samueldr> [compose]:( ☹
orivej has quit [Ping timeout: 240 seconds]
<shlevy> Anyone know off the top of their head how rpaths combine as you go down the tree of dependencies?
<shlevy> E.g. if A depends on B, when I'm resolving B's dependencies do I get access to A's rpath?
<niksnut> iirc, yes
<shlevy> "This is unlike DT_RPATH, which is applied to searches for all children in the dependency tree." OK
<shlevy> niksnut: does patchelf give RPATH or RUNPATH?
<niksnut> depends
<shlevy> for --print-rpath?
<niksnut> there is a --force-rpath option
<niksnut> oh
<niksnut> don't remember
<shlevy> :) OK
<dtz> lmao meta.broken = sadface
JosW has quit [Quit: Konversation terminated!]
<clever> sorear: https://imgur.com/a/MK9PR would ddr3 work over this rats nest? lol
<sorear> I don't have a good intuition for RF
<clever> thats a total mess and i dont see it working at ghz speeds
<clever> it would probably even have trouble at 100mhz
<sorear> Also I have no idea what the minimum frequency in spec for ddr3 is
<gchristensen> I think all the wild voting going on for RFC #25 has taken GitHub down
<clever> sorear: the micron chips have a special mode to support <125mhz
FRidh has quit [Remote host closed the connection]
FRidh has joined #nixos-dev
__Sander__ has quit [Quit: Konversation terminated!]
<gchristensen> niksnut: you're really tempting fate with "enableP********o" in your example there
<sorear> clever: i suspect replacing the rig with a cheap modern board with integrated memory like Arty would be a better use of time, but idk
<sorear> assuming it doesn't work and has to be debugged
<clever> sorear: yeah
sonarpulse has joined #nixos-dev
<shlevy> Oh man I need to set aside some time to read niksnut's gist it's too much to take in right now :D
<dtz> gist?
<sonarpulse> dtz: ^
<dtz> ! ty
<sonarpulse> shlevy: thoughts so far is a) we still need self super b) if {{ foo.bar.baz = ...; }} works, are we doing a shallow or recursive union?
<sonarpulse> shlevy: but the library changes (separate from the language changes) I am all for anyways
<sonarpulse> (oh shit, I hadn't even gotten to module system yet)
<pierron> niksnut: The main issue I see, is that there is no equivalent of the old reference, and that the depth is defined ahead, so extending has to be thought ahead, instead of when you need to extend.
<pierron> niksnut: the "old:" argument is used for extending postInstall phases or similar.
pxc has quit [Ping timeout: 240 seconds]
<sonarpulse> pierron: do you think SOS is worth it without any language support?
<pierron> niksnut: and being able to decide when you stop the extending process is similar to when you apply mkForce, in the case where everything is extendable by default.
<sonarpulse> (I do)
<pierron> sonarpulse: I think it would be too verbose to be accepted.
<sonarpulse> (x: with x; [ ....]) isn't to verbose to me
<pierron> sonarpulse: the recursiveZip is.
<pierron> sonarpulse: (x: with x; …) is useful only if you can prevent anything else from the context to enter.
<sonarpulse> pierron: we could do that with types hahaha
<pierron> let y = …; in (x: with x; y /* read x.y */)
<sonarpulse> (higher ranked polymorphism)
<sonarpulse> (buildInputs : forall x. attrs x -> list x
<pierron> niksnut: I think using the "… // {{ … }}" as a way to control the decent in an attribute set is nicer than the SOS proposal.
<pierron> niksnut: this way the right-hand-side defines where the recusive decent stops.
<pierron> niksnut: in which case we could keep the same idea as the old argument with some other syntax on attribute sets.
<pierron> niksnut: and // would have to be changed to work on functions too.
<pierron> I will comment on github later.
<niksnut> pierron: regarding "old:", my hope is that merge functions are enough
<niksnut> btw, I haven't thought about how to do mkIf yet
<niksnut> so at the level of individual attributes, "if" should just work
<niksnut> but "if" would still produce an infinite recursion when applied at the module level
<gchristensen> I know shlevy has been doing some interesting things around modules and stuff
<niksnut> e.g. in 'if foo.enable then {{ ... }} else {{ ... }}'
<shlevy> gchristensen: I have? Not in some time...
<gchristensen> how about: I know shlevy has been having some interesting thoughts around modules and stuff
<LnL> :p
<shlevy> # uname -a
<shlevy> Linux nixos 4.16.0-rc2 #2 SMP Thu Mar 1 12:18:52 UTC 2018 riscv64 GNU/Linux
<gchristensen> shlevy: please put that on twitter for me
<LnL> whaa!
<dtz> \o/
<shlevy> Lots of errros during startup, but I got there!
<niksnut> cool
<simpson> It begins~
<shlevy> gchristensen: Done
<shlevy> OK, definitely more fixes to come, but I feel like this PR is ready :)
<sonarpulse> shlevy: wooo!
FRidh2 has joined #nixos-dev
<shlevy> I bet 90% of the remaining near-term fixes are using the right bash in the shebang :P
<sonarpulse> shlevy: cross then?!?!?!
<shlevy> Yep!
<sonarpulse> woooo!
<shlevy> I'm doing this to get a build server for the native bootstrap :)
<shlevy> Also in case it turns out I'm too impatient for rebuilds when the real thing comes around :D
<gchristensen> who do we talk to in order to get a 200 core riscv box?
<sonarpulse> shlevy: when did you start on this, btw?
<sonarpulse> if we had a like "time from general cross support to cross-built riscv nix"
<sonarpulse> that could be great bragging rights
<shlevy> And the majority of the work was kernel fixes
<shlevy> Definitely huge bragging rights
<sonarpulse> shlevy: wooo!
<shlevy> (also I have a job and stuff :P )
<gchristensen> uhhhh you started this 13 days ago?
<shlevy> Yep. sonarpulse deserves the credit for the speed :P
<gchristensen> you all are ridiculously amazing
<sphalerite> meanwhile I've been gradually porting nixos to the chromebook (which is already a somewhat supported arch) for like 7 months xD
<sonarpulse> time to smash that
<shlevy> sonarpulse: yup :)
<shlevy> Hmm it's *much* slower than I remember the fedora disk image being
<sonarpulse> bummer
<sonarpulse> maybe just something somewhere needs optimization / configure script being overly conservative
<gchristensen> is your IO being hammered with various errors? :)
<sonarpulse> got the link from that board's site
<shlevy> Hmm I've got systemd trying to run things like /usr/bin/mount... I wonder if that's something that's changed on staging or just an issue with cross specifically?
<shlevy> fpletz: ^
<pierron> niksnut: hum … I do not think the default merge option would cover all the override cases.
<pierron> niksnut: I would definetly prefer named attribute in such cases.
<pierron> niksnut: as a different merge rule.
<pierron> niksnut: now that I tihnk about it, this would also be useful in many cases in NixOS where you want to remove something instead of adding something.
<Mic92> shlevy: my pr is still open, so nothing has changed since the last systemd upgrade.
<shlevy> :(
<gchristensen> shlevy: could you write a blog post about your work on risc-v and how evidently easy it has been? :P
<Mic92> shlevy: I think I know the reason, why this is happnening though.
<shlevy> gchristensen: I should! I'm not going to quite commit right now but if I can find time for it I will :)
<gchristensen> ok :)}
<shlevy> Mic92: Oh?
<shlevy> Aaah
<Mic92> and fallbacks to /usr/bin/mount for cross builds
<shlevy> Bleargh
<Mic92> shlevy: maybe you can set MOUNT_PATH
<shlevy> So I need -Dfoo-path
<shlevy> OK, not so hard
<shlevy> Mic92: Do you know if there's an easy way to see what those values resolve to on a native build?
<Mic92> shlevy: it will print the value here during configurePhase: https://github.com/systemd/systemd/blob/master/meson.build#L585
<shlevy> Cool thanks
<shlevy> Ah, that's only if it's supplied
<Mic92> shlevy: I plan to rework some stuff in the buildsystem and send it upstream to make NixOS build with less patches. If you have input I can also improve cross-compiling support.
<shlevy> Mic92: Other than this issue it's all been great
<shlevy> sonarpulse: OK with stdenv.runtimeShell = pkgs.bash?
<Mic92> shlevy: you have already spotted this file, I assume? https://github.com/systemd/systemd/blob/master/meson_options.txt
<sonarpulse> shlevy: hmmmmm
<sonarpulse> so stdenv doesn't have any runtime things besides libc
<shlevy> Mic92: No, do I need it?
<shlevy> sonarpulse: OK
<shlevy> Just wanted a convenient place
<sonarpulse> and i want to eventually remove libc :D
<Mic92> shlevy: it might help you to see what option can be used to configure the build
<shlevy> I'm going to find/replace ${stdenv.shell} with ${pkgs.bash}/bin/bash in nixos and view the diff :D
<sonarpulse> shlevy: yeah i agree hardcoding bash will bite use later
<sonarpulse> / looks bad
<sonarpulse> i guess i don't have a better place ATM
<sonarpulse> but maybe add some comment this s "subject to change" or something?
<shlevy> Hmm pkgs.shell is untaken :)
<sonarpulse> i dunno
<sonarpulse> shlevy: hmmm, I suppose we have a pkgs.libc too
<sonarpulse> or at least libcCross
<sonarpulse> which would become libc
<shlevy> :( 'shell' at the top level changes stdenv somehow
<shlevy> runtimeShell it is
<shlevy> sonarpulse: Do you have any WIP fixing patchshebangs?
<shlevy> sonarpulse: I guess we want patchShebangsHost and patchShebangsBuild?
<shlevy> With patchShebangs defaulting to the former
<sonarpulse> shlevy: i don't actually
<gchristensen> I like that we're becoming more resistant to p2p-trolls
<gchristensen> pretty much just on the matter of "it doesn't work at how big we are"
<sonarpulse> p2p-trolls?
<gchristensen> people who insist that Nix is bad because it isn't based on <cool new p2p filesharning protocol>
<simpson> gchristensen: I have known Soni for years. They are very much into complaining about how nobody uses their particular toolset.
<gchristensen> ohh awesome!
<sonarpulse> hahahaha
<shlevy> sonarpulse: Do you know how it should look?
<sonarpulse> shlevy: if i took a stab at it i would hahaha
<sonarpulse> but i didn't
<shlevy> :D I'm asking in case I find time to take a stab first
<sonarpulse> just agreed with the problem and solution in broad terms
<sonarpulse> yeah i know
<sonarpulse> looking at it now
<sonarpulse> oh maybe i did haha
<sonarpulse> shlevy: ok have a plan
<shlevy> :D
<sonarpulse> 1) make a new name for patchShebangs with additional path argument
<sonarpulse> 2) make old patch shebangs wrapper around new_ one $PATH
<sonarpulse> 3) change stdenv to make like a PATH_FOR_HOST
<shlevy> Hmm I think in most cases existing patchShebangs should be PATH_FOR_HOST :P
<sonarpulse> true!
<sonarpulse> my bad
<sonarpulse> cause the fixup output hook
<sonarpulse> yeah make patchShenbangs{Build,Host}
<sonarpulse> like you said
<sonarpulse> and make the legacy one wrap patchShebangsHost
<shlevy> Cool
<sonarpulse> and change the fixup output hook
<shlevy> So we enumerate buildInputs for patchShebangsHost and PATH for patchShebangsBuild?
<sonarpulse> well see how path is done
<sonarpulse> and remember my reverting stdenv hacks commit?
<shlevy> Sure
<shlevy> Do it during the env hooks
<shlevy> I just mean conceptually
<sonarpulse> yeah
<sonarpulse> i think that's when that happened
<shlevy> OK.
<sonarpulse> my revert the hacks change won't just be reverting single commit but that's ok haha
<sonarpulse> so on cross the PATH and PATH_FOR_HOST should both be the real deal
<sonarpulse> and on our nixpkgs-no-cheating too :)
<shlevy> :D yeah
<sonarpulse> but in stdenv tooday, there will be that hack with test -Z ${crossCompilation:-}
<sonarpulse> or whatever it is
<shlevy> Actually, how hard would it be to just have a isCheating flag?
<shlevy> So we don't have to deal with reverts etc.
<shlevy> And just flip a switch when we're ready
<sonarpulse> shlevy: yes
<sonarpulse> that is good
<shlevy> Or even keep a long-running hydra jobset witht he flip switched but otherwise kept up to date
<sonarpulse> I want to get rid of this crossConfig fag
<sonarpulse> *flag
<sonarpulse> wow I am so sorry everyone
<gchristensen> sonarpulse: please believe we understand simple typos
<sonarpulse> well i really do despise the crossConfig fLag, which amplifies the typo :(
<shlevy> sonarpulse: So do you want to just revert the hack and re-enable it behind a cheating flag?
<sonarpulse> shlevy: well don't worry about revert then
<shlevy> I think we should do this shortly after the branch-off
<sonarpulse> just s/crossConfig/isCheating/g
<sonarpulse> basically
<shlevy> Ah really?
<sonarpulse> and then some nix code in make-derivation.nix
<shlevy> OK
<sonarpulse> oh also! look for `crossConfig = true;`
<sonarpulse> in nixpkgs shlevy
<shlevy> :)
<sonarpulse> that is when i wanted to quick-hack disable the cheating for a package in all cases
<shlevy> OK, so everywhere I see a "crossConfig" I should read "the true branch of this will go away eventually"?
<shlevy> So when we're doing cross-stdenv we're already doing the right thing?
<sonarpulse> yeah
<simpson> I like that idea.
<sonarpulse> crossConfig is each a) isCheating in disguise or b) some legacy cross thing that needs to be rewritten
<shlevy> OK, will give it a shot and then add patchShebangsHost
<sonarpulse> woo! thanks!!
<shlevy> (not sure when yet :) )
<shlevy> First I need to get ssh working on this VM...
<sonarpulse> btw selfNativeBuildInput is another legacy thing which I want to get rid of
<sonarpulse> only guile works it now
<sonarpulse> haha ok
<shlevy> Heh I already changed guile not to use it
<sonarpulse> that is a demonstrably pressing thing
<shlevy> no references in nixpkgs now
<sonarpulse> shlevy: landed?!
<sonarpulse> and all versions of guile?
<sonarpulse> there is like 1 2 an default-which-is-not-an-alias or something weird
<shlevy> On staging
<sonarpulse> cool
<sonarpulse> I really want to get rid of the stdenv cross adapter
<sonarpulse> maybe I can on staging now
<shlevy> :)
<sonarpulse> shlevy: in your pr, i wonder what pkgs.bash we already changed should also go to pkgs.stdenv.runtimeShell
<sonarpulse> *pkgs.runtimeShell
<sonarpulse> whew
<shlevy> sonarpulse: Probably a bunch :) But harder to trace down
<sonarpulse> yeah indeed
<sonarpulse> maybe I'll do a big (git diff first-bgmari-commit..) | grep pkgs.bash haha
<shlevy> :D
<sonarpulse> that's what I told him to do
MichaelRaskin has joined #nixos-dev
<thoughtpolice> shlevy: I looked over #36187 and at a glance it looks good, but admittedly I don't know about some of the other WIP stuff going on.
<thoughtpolice> There are a lot of moving pieces to CC right now...
<thoughtpolice> But yes I basically fixed sudo/strace etc and a million other things in vaguely similar ways, though using some old work from sonarpulse
<sonarpulse> thoughtpolice: me or bgamari?
<thoughtpolice> Yours, from the Obsidian branch
<sonarpulse> basic cross infra is much more settled now
<sonarpulse> ah so the infra, not specific nixos fixes
<thoughtpolice> Yes, I ended up doing my own work on our fork for a bunch of various other things, but I am cross building NixOS now, at least.
<sonarpulse> cool
<sonarpulse> it sounded like you 3 were already going to exchange commits for nixos
<thoughtpolice> Obviously though at the moment I'm not going to upend our $WORK tree to examine this but yeah
<sonarpulse> but yeah do recommend
<sonarpulse> sure
<thoughtpolice> we were basically all converging on the same solution at different speeds
<thoughtpolice> Personally I have my own use for a few ARM board cross compiles though, so I'll probably get a good feel for where everything is in master real soon
<thoughtpolice> shlevy: Also, unrelated, but I actually took a look around and I *think* NixOS at this point is actually pretty good wrt using <nixpkgs> in places, in case you want to set NIX_PATH empty -- it's only in the test components for Hydra that use NIX_PATH based imports, the rest are relative.
<thoughtpolice> shlevy: I plan on verifying this soon on my own private nixos-configs (so they can always have in-sync, bootstrapped Nixpkgs checkouts across all machines), but do you imagine that's really the only sticking point?
<thoughtpolice> I suppose I have to fix the testing stuff too actually, if I want qemu-based testing to work without leaking impurities into the build...
<gchristensen> peti: that was very inspiring :)
<LnL> ^^
<gchristensen> I'm pretty sure I'm going to get this thread framed
<shlevy> thoughtpolice: I think it should work, yeah
pie_ has quit [Read error: Connection reset by peer]
pie_ has joined #nixos-dev
<fpletz> shlevy: that's weird, I didn't encounter that /usr/bin/mount issue before… did you read that in the journal? what unit was that?
<shlevy> fpletz: It was cross-specific, due to the relevant bins being unavailable in path: https://github.com/NixOS/nixpkgs/pull/36187/commits/a486cb1af61dd88579de254637ecd4b4d3fc3173
<sonarpulse> shlevy: didn't you already land perl cross?
<sonarpulse> are there some master commits in that PR?
<shlevy> sonarpulse: Nope, I pushed it to my branch to share it
<sonarpulse> ah right
<sonarpulse> shlevy: ok 3 questions after more thorough review. In case you saw already, I quickly deleted one comment that i posted on its own and remade it as part of the broader review
<sonarpulse> shlevy: ok I'll look more more findLibs
<sonarpulse> shlevy: I feel like https://github.com/arsv/perl-cross/issues/61 is going in interesting places
<sonarpulse> as far as the person is saying "just use host [sic, i think lol, should be "build"] perl", I like the sound of that
<sonarpulse> but i see no reason to block you nixos improvements on that
orivej has joined #nixos-dev
pie__ has joined #nixos-dev
pie_ has quit [Remote host closed the connection]
FRidh2 has quit [Quit: Konversation terminated!]
goibhniu has quit [Ping timeout: 256 seconds]
<shlevy> Yeah, I have that open to explore that too :)
goibhniu has joined #nixos-dev
goibhniu1 has joined #nixos-dev
goibhniu has quit [Ping timeout: 252 seconds]
<angerman> sonarpulse: I’m having an issue when trying to extend the haskell packages through packageOverrides. The extension doesn’t end up in the buildPackages
<sonarpulse> angerman: that's intended behavior, for better or worse
<angerman> How do I inject a package into the build packages?
<sonarpulse> (two seperate fixpoints so it was naturaly not to mess with the extend functions and tie them together)
<sonarpulse> let me see
<angerman> sonarpulse: the issue: I have a custom cabal (Cabal_HEAD) package.
<sonarpulse> yeah
<sonarpulse> angerman: so btw my coworker ended up working around that problem
<sonarpulse> but my patch i linked you didn't seem to work
<sonarpulse> I never ended up using it in our stuff you see
<angerman> For my cross compiled package, I need buildPackages.Cabal_HEAD in the setupHsDepends
<sonarpulse> the idea is sound however and am am sure you can fix it
<sonarpulse> let me check nix for that
<angerman> sonarpulse: I got your patch to work...
<sonarpulse> oh good!
<angerman> ... as long as I keep doing evening *in* nixpkgs
<angerman> Now I’m trying to clean it up, and move the custom compiler and Cabal_HEAD into config.nix
<sonarpulse> cool
<sonarpulse> I am getting you a gist
<sonarpulse> from my coworker haha
<angerman> sonarpulse: but I’m stuck with the buildPackages not having my Cabal_HEAD
<angerman> sonarpulse: do we have any mechanism of automatically moving a package expression into buildPackages? You almost always want the Setup.hs dependencies from the buildPackages
<sonarpulse> angerman: have you seen buildHaskellPackages?
<sonarpulse> setup.hs are drawn from there
<sonarpulse> that is in turn drawn from buildPackages in the default package sets
<clever> in compiler.override { initialPackages = stackPackages;
<sonarpulse> (see pkgs/top-level/haskell-packages.nix)
<clever> any relation to this area?
<sonarpulse> never heard of initialPackages huh
<clever> stack2nix uses that to replace all of haskellPackages with custom versions
<sonarpulse> ah ok
<angerman> sonarpulse: so this is my `config.nix` https://gist.github.com/angerman/5d0ed4e4e7e728b4c48958e30c2c2e8e
<sonarpulse> angerman, clever: so right now the slight awkwardness is buildHaskellPackages is "early bound"
<sonarpulse> it's just a closed-over argument
<sonarpulse> it's not part of the package set
<angerman> `with import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.mingwW64; config = import ./config.nix; }; let Cabal_HEAD = pkgs.buildPackages.haskell.packages.myghc.callPackage ./cabal-head.nix { }; in (pkgs.haskell.packages.myghc.callPackage ./default.nix { inherit Cabal_HEAD; })`
<angerman> and that's essentially my build expression.
<sonarpulse> angerman: see what I coppied on that pr
<angerman> BUT: that fails with `attribute ‘myghc’ missing` in `while evaluating the attribute`.
<sonarpulse> overriding GHC like that will no longer work
<sonarpulse> but the mkDerivation override is a good start
<clever> angerman: you could put myghc into a let block, but then you dont have an easy way to access it from outside the file
<angerman> sonarpulse: which PR? The one from two days ago? I must have missed that ghc overrid.
<sonarpulse> angerman: sorry s/pr/gist
<sonarpulse> angerman: I think part of the issue is unlike overlays, config currently only applies to the final stage
<sonarpulse> let me check
<angerman> sonarpulse: I'm not seeing it? Could you repost?
<angerman> sonarpulse: the overrideDerivationis *too* late. All strings are inlined.
<sonarpulse> ps.buildPackages.haskell.packages.myghc
<sonarpulse> that is where myghc is missing I think
<sonarpulse> nevermind, I am wrong
<sonarpulse> and I wrote that too, hahaha
<angerman> sonarpulse: Hmm... so I'll have to somehow get your coworkers change into my config.nix.
<sonarpulse> angerman: yeah
<angerman> I must admit I'm not *that* experience with nix.
<sonarpulse> angerman: I'll comment again with that
<sonarpulse> no worries
<sonarpulse> angerman: do you wish to boot your cross ghc with native your ghc?
<angerman> I've been booting it with the 82binary one
pie_ has joined #nixos-dev
<sonarpulse> angerman: ok
<angerman> not yet at least :-)
<angerman> once I'll get into TH I might need to.
pie__ has quit [Ping timeout: 256 seconds]
<sonarpulse> angerman: heh, i was just confusing myself
<sonarpulse> build haskell packages vs boot packages again
<sonarpulse> angerman: https://gist.github.com/angerman/5d0ed4e4e7e728b4c48958e30c2c2e8e#gistcomment-2367133 I wrote it blind but I think that should work
<sonarpulse> the `ps.lib.optionalAttrs (ps.hostPlatform != ps.buildPlatform)` lib part you can adjust as you please
<sonarpulse> (no harm also using it for libraries used by Setup.hs)
<angerman> sonarpulse: thanks I'll give that a try once I'm out of bed :-)
<sonarpulse> hahah sounds good. good morning!
<angerman> it's 10 to 8am.
<shlevy> sonarpulse: Am I good to merge cross-nixos?
<sonarpulse> shlevy: you wanted me to look over findLibs bash in more detail?
<sonarpulse> that is last thing I have to do
<shlevy> Ah yeah
<angerman> sonarpulse: another thing: the `.integer-simple.` logic seems to go horribly wrong when cross compiling. It starts pulling in all kind of packaes to be built for the host, that are supposed to be only built for the build machine.
<sonarpulse> shlevy: will that be a mass rebuild alone? (adjusting my nit/style threshhold hahaha)
<sonarpulse> angerman: oh hmm
<sonarpulse> not surprised I didn't notice that
<angerman> I went back, and basically changed the nix/head.nix to use integer-simple if build != host.
<angerman> couldn't get gmp to built for windows via mingw32 just yet.
<shlevy> sonarpulse: No, not a mass rebuild at all
<shlevy> sonarpulse: Just the initrd would rebuild
<sonarpulse> shlevy: hmm ok
<sonarpulse> shlevy: I sometimes like `while (( ''${#left[@]} )); do` but this is just stupid style opinion
<sonarpulse> I looked at the rest all else is fine
<sonarpulse> I am embarrassed to so bike-shed on the RFC :D
<sonarpulse> *PR itself
<shlevy> Dude, that's what review is for
<shlevy> If I can improve the code easily, great
<shlevy> If you nit and I disagree, oh well we'll figure it out :P
<sonarpulse> fair enough