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

2016-08-25 Thread Vladimír Čunát
On 08/25/2016 10:38 PM, Nick Sabalausky wrote: > 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 y

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

2016-08-25 Thread Nick Sabalausky
On 08/25/2016 04:12 PM, Roland Koebler wrote: Hi, - ...Is there a way binaries can be built on non-nixos linux so that they WILL work out-of-the-box on nixos? maybe the following articles help: http://anderspapitto.com/posts/2015-02-28-deb-installation-nixos.html https://sandervanderburg.blogs

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

2016-08-25 Thread Nick Sabalausky
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

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

2016-08-25 Thread Roland Koebler
Hi, > - ...Is there a way binaries can be built on non-nixos linux so that they > WILL work out-of-the-box on nixos? maybe the following articles help: http://anderspapitto.com/posts/2015-02-28-deb-installation-nixos.html https://sandervanderburg.blogspot.de/2015/10/deploying-prebuilt-binary-softw

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

2016-08-25 Thread Bjørn Forsman
On 25 August 2016 at 21:08, Nick Sabalausky wrote: > On 08/25/2016 01:52 PM, Bjørn Forsman wrote: >> >> On 25 August 2016 at 18:54, Nick Sabalausky >> wrote: >>> >>> On 08/24/2016 01:29 PM, stewart mackenzie wrote: Have a look at patchelf >>> >>> >>> Ok, so according to

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

2016-08-25 Thread Nick Sabalausky
On 08/25/2016 01:52 PM, Bjørn Forsman wrote: On 25 August 2016 at 18:54, Nick Sabalausky wrote: On 08/24/2016 01:29 PM, stewart mackenzie wrote: Have a look at patchelf Ok, so according to , what I do is: % patchelf --set-interpreter PATH_TO_LOADER program_b

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

2016-08-25 Thread Bjørn Forsman
On 25 August 2016 at 18:54, Nick Sabalausky wrote: > On 08/24/2016 01:29 PM, stewart mackenzie wrote: >> Have a look at patchelf > > Ok, so according to , what I do is: > > % patchelf --set-interpreter PATH_TO_LOADER program_binary > % patchelf --set-rpath LINKER_S

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

2016-08-25 Thread Nick Sabalausky
On 08/24/2016 01:29 PM, stewart mackenzie wrote: Have a look at patchelf Ok, so according to , what I do is: % patchelf --set-interpreter PATH_TO_LOADER program_binary % patchelf --set-rpath LINKER_SEARCH_PATHS program_binary But how do I know what my paths f

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

2016-08-25 Thread Christian Theune
Hi, something related that we experienced: allowing users to compile/link against the system environment causes later mayhem: linkers will typically resolve any symlinks and then have shared libraries looked up by their store path. If that goes away later (as the manually compiled binary is not

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

2016-08-24 Thread Tomasz Czyż
Personaly, I was a little tired with repatching 3rd party binaries and I linked ld-linux-x86-64.so to /lib and /usr/lib (where most apps looks for this). One time I even linked /usr/lib and /lib directly to /run/current-profile/sw/lib and even have got working some non static binaries :-) (but tha

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

2016-08-24 Thread Vladimír Čunát
On 08/24/2016 05:51 PM, Nick Sabalausky wrote: > Also, kind of related: When a package does depend on an older version of > itself in order to be built from source, what is the nix way of going > about that? > > Ie: Suppose building package foobar v3.0 depends on foobar v2.0, and > building foobar

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

2016-08-24 Thread stewart mackenzie
Have a look at patchelf kr/sjm ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev

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

2016-08-24 Thread Nick Sabalausky
Normally, it tends to work out fine on Linux to build an executable binary (linked with gcc), and then run the binary on other distros with an equal-or-newer glibc. I realize these binaries won't work out-of-the-box on nixos (something about the non-typical directory structure), and the standa