git.iko.soy/typeable/nixpkgs
on master help sign in
gobject-introspection: Deal with $outputLib

Once #7701 gets merged, we have another environment variable called $outputLib, which then points to another environment variable which is the final library output. This was brought up in discussion with @lethalman and @vcunat in: https://github.com/NixOS/nixpkgs/pull/12558#discussion_r50599813 The closure-size branch is not yet merged into master, so this is only a preparation and we're still falling back to $out and $lib whenever $outputLib isn't available. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit740b30b937ee42a3ae3596e6c9ba0a08742db5d9 authoraszlig <aszlig@redmoonstudios.org> dateSat 23 Jan 2016, 16:24 (11 years ago) parentb3b444a
1 file changed+17−12
pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch+17−12
pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch+17−12
@@ -1,21 +1,26 @@
11diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
2−index 89ec193..8ee92c3 100755
2+index 89ec193..54f1d2e 100755
33--- a/giscanner/scannermain.py
44+++ b/giscanner/scannermain.py
5−@@ -94,6 +94,34 @@ def get_windows_option_group(parser):
5+@@ -94,6 +94,39 @@ def get_windows_option_group(parser):
66 return group
77
88
99+def _get_default_fallback_libpath():
10−+ outputs = os.environ.get("outputs", "out").split()
11−+ if "lib" in outputs:
12−+ # For multiple output derivations let's try whether there is a $lib
13−+ # environment variable and use that as the base store path.
14−+ store_path = os.environ.get("lib")
15−+ elif "out" in outputs:
16−+ # Otherwise we have a single output derivation, so the libraries most
17−+ # certainly will end up in "$out/lib".
18−+ store_path = os.environ.get("out")
10++ # Newer multiple-output-optimized stdenv has an environment variable
11++ # $outputLib which in turn specifies another variable which then is used as
12++ # the destination for the library contents (${!outputLib}/lib).
13++ store_path = os.environ.get(os.environ.get("outputLib"))
14++ if store_path is None:
15++ outputs = os.environ.get("outputs", "out").split()
16++ if "lib" in outputs:
17++ # For multiple output derivations let's try whether there is a $lib
18++ # environment variable and use that as the base store path.
19++ store_path = os.environ.get("lib")
20++ elif "out" in outputs:
21++ # Otherwise we have a single output derivation, so the libraries
22++ # most certainly will end up in "$out/lib".
23++ store_path = os.environ.get("out")
1924+
2025+ if store_path is not None:
2126+ # Even if we have a $lib as output, there still should be a $lib/lib
@@ -37,7 +42,7 @@ index 89ec193..8ee92c3 100755
3742 def _get_option_parser():
3843 parser = optparse.OptionParser('%prog [options] sources')
3944 parser.add_option('', "--quiet",
40−@@ -200,6 +228,10 @@ match the namespace prefix.""")
45+@@ -200,6 +233,10 @@ match the namespace prefix.""")
4146 parser.add_option("", "--filelist",
4247 action="store", dest="filelist", default=[],
4348 help="file containing headers and sources to be scanned")