[Nix-dev] Generating nixos-compatible binaries? And bootstrapped packages.

Nick Sabalausky bus_nixos_list at semitwist.com
Thu Aug 25 22:38:11 CEST 2016


On 08/25/2016 03:33 PM, Bjørn Forsman wrote:
> On 25 August 2016 at 21:08, Nick Sabalausky
>> Any downsides to setting the RPATH that way? By just setting it to
>> /run/current-system/sw/lib?
>
> Both are hacks :-) The first method breaks when you garbage collect
> the system and the paths embedded into the binary are removed. The
> second method (may) break when you update the system so that the links
> in /run/current-system/sw/lib/... point to different and incompatible
> libraries.
>

Ok, I see.

Now, I assume using patchelf probably isn't recommended or suitable for 
packages in nixpkgs (unless maybe it's something closed-source?).

But what if a nix expression uses it as an intermediary build step on a 
tool downloaded as used AS part of the build process, but then simply 
discarded? Such as bootstrapping a compiler by downloading an older 
pre-built binary provided on the compiler's official release page, 
patchelf it, and use that to bootstrap the compiler being built.

Would that be non-hacky enough to be acceptable for a nixpkgs pull request?



More information about the nix-dev mailing list