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

Ludovic Courtès ludo at gnu.org
Sat Nov 3 16:48:40 CET 2012


Hi Michael,

Michael Raskin <7c6f434c at mail.ru> skribis:

> I have some basic-chroot.nix, which is what basics I need to do Nix 
> builds and look at simple problems comfortably.
>
> It is literally:
>
> let nixpkgs = import <nixpkgs> {}; in with nixpkgs; 
>   symlinkJoin "chroot-system" [
>     nixUnstable openssl (glibcLocales.override {allLocales = true;})
>     rlwrap gcc zlib patchelf coreutils stdenv bashInteractive su gnugrep
>     gnused less findutils curl wget utillinuxCurses subversion openssh
>     gzip vim file strace lsof 
>   ]
>
> I build it as /var/chroot-env
>
> When I need to do a rebuild that includes some local work, I do
>
> /etc/nixos/configurations/misc/raskin/misc-scripts/special-chroot \
>      /var/nix-chroot /root root usr-only /var/chroot-env

Wow, that seems a little bit too sophisticated for a first-time user.
;-)

Ideally, I’d like a solution that Just Works for anyone trying out Nix.

I was thinking that, instead of just bind-mounting /bin, we could have
at least a nix-daemon option that would allow the host code to specify
which file /bin/sh should point to.  Even better would be to have an
additional ‘derivation’ parameter.

Eelco: what do you think?

Thanks,
Ludo’.


More information about the nix-dev mailing list