[Nix-dev] Dealing with non-Bash /bin/sh on non-NixOS

Michael Raskin 7c6f434c at mail.ru
Sat Nov 3 22:16:32 CET 2012


>> So, I guess there would be a configuration option (marked as dangerous
>> and/or impure) to override what is taken from external environment for 
>> a normal chroot build (ideally, nothing — maybe it is possible to use
>> even fake proc?).
>
>What I had in mind was more an extension of DerivationInputs.  Instead
>of having just a derivation-path/output-ids pair, it could optionally be
>something like a derivation-path/output-id/file/fs-mapping.
>
>IOW, instead of (or in addition to) /.../bash.drv + “out”, you could
>have: /.../bash.drv + “out” + “bin/bash” + “/bin/sh”, which would mean
>“map ${bash}/bin/bash to /bin/sh”.
>
>This would make chroot builds compulsory, though.

And if we make it a separate facility with proper declared semantics 
(patching preversions), NixOS non-chroot builds will not be affected,
and non-chroot builds on other distributions will work some of the time
which is the best that can be achieved

>So an intermediate solution would be to have a specific nix-daemon
>option to say what /bin/sh should point to.
>
>Thoughts?
>
>Ludo’.
>





More information about the nix-dev mailing list