1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/development
aszlig c420de6b05
gobject-introspection: Fix patching shared objects
The gi-r-scanner is generating a list of shared libraries that are
referenced in the shared-library attribute of the <namespace/> element
of the GIR file. However, this attribute only contains the names of the
libraries and not the full store paths, like for example while preparing
to package libblockdev, the following items were included in the
shared-library attribute:

  /nix/store/...-libblockdev-1.3/lib/libblockdev.so.0
  libm.so.6
  libdmraid.so.1.0.0.rc16
  libbd_utils.so.0

Unfortunately, loading such a library without setting LD_LIBRARY_PATH is
going to fail finding libm.so.6 and libdmraid.so.1.0.0.rc16.

Now the first attempt at solving this was to put absolute paths of all
the libraries referenced in the shared-library attribute, but this also
led up to including paths of build-time shared objects into that
attribute:

  /nix/store/...-libblockdev-1.3/lib/libblockdev.so.0
  /nix/store/...-glibc-2.21/lib/libm.so.6
  /nix/store/...-dmraid-1.0.0.rc16/lib/libdmraid.so.1.0.0.rc16
  /tmp/nix-build-libblockdev-1.3.drv-0/.../utils/.libs/libbd_utils.so.0

This of course is not what we want, so the final solution is to only
use the absolute path whenever it is a Nix path and leave the library
name as-is if the path doesn't reside within the store, like this:

  /nix/store/...-libblockdev-1.3/lib/libblockdev.so.0
  /nix/store/...-glibc-2.21/lib/libm.so.6
  /nix/store/...-dmraid-1.0.0.rc16/lib/libdmraid.so.1.0.0.rc16
  libbd_utils.so.0

The downside of this approach is that if not even the output path of the
library is in LD_LIBRARY_PATH, even loading of libbd_utils.so.0 could
fail, so we need to patch the loader as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-22 22:46:02 +01:00
..
arduino platformio: init at 2.7.0 2016-01-06 04:09:52 -05:00
compilers elm: recurseIntroAtrs and use GHC 7.10.3 2016-01-22 13:39:18 +01:00
coq-modules coq-interval: 2.1.0 -> 2.2.1 2016-01-06 09:35:05 +01:00
dotnet-modules/patches
eclipse
erlang-modules Update hex-packages.nix with hermetic rebar3. 2016-01-19 12:58:43 +01:00
go-modules go builder: respect enableParallelBuilding 2016-01-21 17:11:28 +01:00
guile-modules
haskell-modules hackage-packages.nix: update Haskell package set 2016-01-22 22:23:00 +01:00
idris-modules idris-wl-pprint: Use fetchFromGitHub 2015-11-28 05:53:50 -05:00
interpreters rubygems: 2.4.1 -> 2.4.8, fixes #8492 2016-01-20 03:36:36 +01:00
libraries gobject-introspection: Fix patching shared objects 2016-01-22 22:46:02 +01:00
lisp-modules asdf: 3.1.5 -> 3.1.6 2016-01-01 12:30:17 +03:00
lua-modules
misc
mobile Renamed subdirectories in Android SKD's build-tools 2016-01-18 00:42:54 +01:00
ocaml-modules Merge pull request #12064 from FlorentBecker/eliom42 2016-01-18 09:32:48 +01:00
perl-modules perl-DBIx-Class: fix tests 2015-11-30 14:50:42 +01:00
pharo Refactor Pharo to allow co-installation of VMs 2016-01-18 20:14:19 +01:00
pure-modules
python-modules multipath_tools: Rename to multipath-tools 2016-01-21 16:18:38 +01:00
qtcreator qtcreator: 3.5.1 -> 3.6.0 2016-01-15 19:19:42 -05:00
r-modules R: fix Darwin build 2016-01-06 22:20:40 +01:00
ruby-modules
tools rebar3-nix-bootstrap: 0.0.2 -> 0.0.3 2016-01-19 12:58:33 +01:00
web nodejs: 5.1.1 -> 5.4.1 2016-01-21 10:31:18 +01:00