Skip to content
Unverified Commit c83e697a authored by aszlig's avatar aszlig
Browse files

gobject-introspection: Add fallback for libraries

After patching up the shared libraries in c420de6b

 to use absolute paths,
there are still some libraries left which do not get an absolute paths
assigned.

Those libraries are the ones which have an absolute path outside of the
Nix store, so we assume that they're build products of the current build
and make them absolute by prepending "$out/lib" or "$lib/lib" (depending
on whether it's a multiple output derivation or not) to its basename.

So for my test case, the resulting library paths now look 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
  /nix/store/...-libblockdev-1.3/lib/libbd_utils.so.0

Which is perfectly fine and everything gets resolved correctly after
importing the library using GI.

However, I didn't test it against other libraries and programs, so this
still needs testing, especially for Darwin.

Signed-off-by: default avataraszlig <aszlig@redmoonstudios.org>
parent c420de6b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment