[Nix-dev] exclude $out/lib when building system-path

Eike eike at eknet.org
Thu Jan 29 16:15:16 CET 2015

Luca Bruno writes:

> On 29/01/2015 15:32, Eike wrote:
>> Hi all,
>> I'm building a (java) program that produces a $out/lib folder with some
>> things in it. But it is not a linux program, just using a similiar
>> directory structure. Thus I don't want it to be linked into the
>> environment. Is there an option to prevent nix from doing so?
>> I've looked at nixos/modules/config/system-path.nix and found the option
>> `pathsToLink' which seem responsible for this -- but I can't figure out
>> to go on. I'd like to exclude just the one derivation from linking.
>> Thanks and regards
> First of all, linking /lib to the system env shouldn't be a problem,
> because projects aren't going to use that.
> Second, I'm planning to remove /lib from being linked. But needs some
> testing and probably several fixes to nixos modules that assume /lib
> being linked.

Thanks for your reply. I know that's not really a problem (the contents
in the lib directory are quite unusable to other programs). I have
similiar such packages that all have this lib directory and nix
complains about link collisions if I want to install many of them. But
these are ignored, it's only a convenience thing… I was just wondering
that I might missed an option or something.

thanks and regards

More information about the nix-dev mailing list