summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-01-24 20:59:16 +0000
committerGitHub <noreply@github.com>2018-01-24 20:59:16 +0000
commitbf87e56cda1dc0a032fa75cf235cff3e36f64e09 (patch)
tree70d6deeeae394b31982e3d6721a3f5e363df7b94
parent8696dbece0c8fc106e334dff433c3f4fb18c7ee5 (diff)
parente44038bccab0cae96a93fa517a9acaab9c81a6d8 (diff)
downloadnixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar.gz
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar.bz2
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar.lz
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar.xz
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.tar.zst
nixlib-bf87e56cda1dc0a032fa75cf235cff3e36f64e09.zip
Merge pull request #34081 from jtojnar/gir-abs-cairo
gobjectIntrospection: use absolute path for cairo GIR
-rw-r--r--pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch11
-rw-r--r--pkgs/development/libraries/gobject-introspection/default.nix17
2 files changed, 23 insertions, 5 deletions
diff --git a/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch b/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch
new file mode 100644
index 000000000000..f7e1bedd3e18
--- /dev/null
+++ b/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch
@@ -0,0 +1,11 @@
+--- a/gir/cairo-1.0.gir.in
++++ b/gir/cairo-1.0.gir.in
+@@ -5,7 +5,7 @@
+             xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+   <package name="%CAIRO_GIR_PACKAGE%"/>
+   <namespace name="cairo" version="1.0"
+-	     shared-library="%CAIRO_SHARED_LIBRARY%"
++	     shared-library="@cairoLib@/%CAIRO_SHARED_LIBRARY%"
+ 	     c:identifier-prefixes="cairo"
+ 	     c:symbol-prefixes="cairo">
+     <record name="Context" c:type="cairo_t" foreign="1"
diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix
index f629b9a8a3c3..870f77686b3e 100644
--- a/pkgs/development/libraries/gobject-introspection/default.nix
+++ b/pkgs/development/libraries/gobject-introspection/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python
-, libintlOrEmpty, cctools
+, libintlOrEmpty, cctools, cairo
 , substituteAll, nixStoreDir ? builtins.storeDir
 }:
 # now that gobjectIntrospection creates large .gir files (eg gtk3 case)
@@ -38,10 +38,17 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  patches = stdenv.lib.singleton (substituteAll {
-    src = ./absolute_shlib_path.patch;
-    inherit nixStoreDir;
-  });
+  patches = [
+    (substituteAll {
+      src = ./absolute_shlib_path.patch;
+      inherit nixStoreDir;
+    })
+    # https://github.com/NixOS/nixpkgs/issues/34080
+    (substituteAll {
+      src = ./absolute_gir_path.patch;
+      cairoLib = "${getLib cairo}/lib";
+    })
+  ];
 
   meta = with stdenv.lib; {
     description = "A middleware layer between C libraries and language bindings";