I originally wrote this for packaging proprietary games in Vuizvui[1]
but I thought it would be generally useful as we have a fair amount of
proprietary software lurking around in nixpkgs, which are a bit tedious
to maintain, especially when the library dependencies change after an
update.
So this setup hook searches for all ELF executables and libraries in the
resulting output paths after install phase and uses patchelf to set the
RPATH and interpreter according to what dependencies are available
inside the builder.
For example consider something like this:
stdenv.mkDerivation {
...
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ mesa zlib ];
...
}
Whenever for example an executable requires mesa or zlib, the RPATH will
automatically be set to the lib dir of the corresponding dependency.
If the library dependency is required at runtime, an attribute called
runtimeDependencies can be used to list dependencies that are added to
all executables that are discovered unconditionally.
Beside this, it also makes initial packaging of proprietary software
easier, because one no longer has to manually figure out the
dependencies in the first place.
[1]: https://github.com/openlab-aux/vuizvui
Signed-off-by: aszlig <aszlig@nix.build>
Closes: #34506
This reverts commit e73e5c884f. Please don't
set $LD_LIBRARY_PATH! Instead, pass appropriate --extra-include-dir and
--extra-lib-dir arguments to "cabal configure" to ensure that Cabal knows
about system dependencies.
For a Haskell package "foo" the environment foo.env now contains the build tool
dependencies required for compiling the package in $PATH.
Fixes https://github.com/NixOS/cabal2nix/issues/331.
Currently, when building NixOS from a git clone, Nix has to copy
the entire repo at >1GB into the store by default. That is not
necessary and causes a dumping large path message.
If you need the old behaviour for some reason, you will have to
specify it by passing the path to your repo explicitly as the
nixpkgs argument like this:
--arg nixpkgs '{outPath = ./.; revCount = 56789; shortRev = "gfedcba"; }'
Upstream changes:
* Improve Zeroconf behavior
* Fix showing normal message event
* remove usage of OpenSSL.rand
* a few minor bugfixes
The really important part here is the third point about OpenSSL.rand,
because the rand attribute no longer exists in pyopenssl and thus Gajim
doesn't even start.
Also the fix-tests.patch has been fixed upstream as well, so we don't
need it anymore.
Another change in 0.16.9 that's not included in the changelog is that
there is a test_nogui target, which is also run by the CI upstream is
using, so let's use that and remove xvfb_run.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @7c6f434c, @Mic92