On Mon, Feb 13, 2012 at 09:29:30PM +0100, Vladimír Čunát wrote: > On 02/13/2012 08:45 PM, Michael Raskin wrote: > >> Currently quite a few packages in nixpkgs have /var/run/current-system/sw > >> and/or /var/setuid-wrappers hardcoded. Why is it better than having /usr? > > Although suboptimal, it is better than /usr/ because upstream packages > > themselves don't do this on their own (yet). Unlike /usr/ references, > > these are at least easy to locate... > > Yes, moreover the directories are symlinks so they are easily updated > (e.g. on nixos-rebuild switch). Anyway, it's only used for things that > are (at most) once on every system. > > Or you mean it would be better to have these paths like > /var/run/current-system as some configurable parameters in the > expressions (attributes of pkgs)? It might be better but I would > postpone such things until we find a use case...
The case of init-related binaries is a bit delicate. Nixpkgs can't know what init has the system, to hardcode a specific path. Some time ago, we used to make those paths overridable in nixpkgs, defaulting to that nixos /var/blabla. Since we made nixos 'multiplatform' (as in non-PC computers), nixpkgs has the notion of 'platform'. Maybe we could use it to differentiate between a nixos system and a /usr-based system, as for the default options. Nevertheless, I prefer first to have the use case than working on a solution, because we may come up with many solutions that don't solve any use case problem for anyone. Regards, Lluís. _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
