[Nix-dev] RFC: managed paths outside /var and /etc

Yury G. Kudryashov urkud.urkud at gmail.com
Sat Mar 3 14:52:16 CET 2012


Hi!

Currently the activation script creates a bunch of symlinks in /etc. 
Creating some symlinks outside of /etc will allow us drop some of our 
patches.

I propose the following symlinks:
* /usr/bin/env -> /var/run/current-system/sw/bin/env

"#!/usr/bin/env perl" is the only perl sheebang portable across various 
unices. We can patch sheebangs in packages but not in ~/bin.

* /lib/modules/`uname -r`
If `readlink /var/run/current-system/kernel` == `readlink /var/run/booted-
system/kernel`, points to /var/run/current-system/kernel-modules/lib/`uname 
-r`, otherwise to /.../booted-system/...

This will allow us to drop our patches to module-init-tools. This would also 
make `modprobe` slightly faster (pure C binary instead of 
bash+`uname`+modprobe).

What do you think about this?

P.S.: For me, the main advantage of the purity is the ability to have 
several versions of a package. In both cases above it makes no sense to use 
two versions at the same time.
-- 
Yury G. Kudryashov,
mailto: urkud at mccme.ru



More information about the nix-dev mailing list