[Nix-dev] Moving binaries from sbin/ to bin/?

Michael Raskin 7c6f434c at mail.ru
Thu Oct 2 19:45:04 CEST 2014


>Does anyone mind if we (slowly) move binaries from $out/sbin to $out/bin?
>
>Arguments for doing it:
>
>1) The sbin vs bin distinction is an historic relic from the past. It
>makes little sense on NixOS. (Even a normal (LSB-like) distro like
>ArchLinux has already made the sbin -> bin switch).
>
>2) It's annoying to have this distinction when writing nix
>expressions, having to figure out which of the two directories is the
>correct one for *this* package.
>
>3) I just found my second sbin/bin bug caused by sbin being treated as
>a second class citizen in nixpkgs. I noticed that our standard builder
>will not add packages' sbin/ directory to PATH. (The first issue was
>from a long time ago, when sbin wasn't added to PATH by the profile.sh
>script (maybe wrong name) when on a non-NixOS distro.)

Personally, I support gradual move to having everything in $path/bin/

Among other benefits, when I do a rescue or a complex test, I sometimes
need to set PATH manually, and having only /bin/ makes it simpler.

I would like to ask whether moving /sbin/ contents to /bin/ contents 
and creating a sbin → bin symlink is a good idea. Our initrd already
does this. For some packages many third-party tools expect them in some
directory like $PREFIX/sbin and with move+symlink we can get benefits
now and pay the price case-by-case. Maybe we'll even keep the symlink
for a long time.





More information about the nix-dev mailing list