about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libpeas
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-20 12:31:50 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-20 12:32:25 +0100
commitb7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch)
treea6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/development/libraries/libpeas
parent710028664e26e85cb831a869b3da9f6993902255 (diff)
parent0799f514b1cd74878174939df79ac60ca5036673 (diff)
downloadnixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libpeas')
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/2.x.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/default.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch14
3 files changed, 40 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
index 2b3bd0bc5797..38e4fe055085 100644
--- a/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
+++ b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchurl
+, substituteAll
 , pkg-config
 , gi-docgen
 , gobject-introspection
@@ -16,15 +17,25 @@
 
 stdenv.mkDerivation rec {
   pname = "libpeas";
-  version = "2.0.0";
+  version = "2.0.1";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    hash = "sha256-VAesvAwS95D3DJ0rmCJKzBvjrEScYGA7gZLKAgtJcBE=";
+    hash = "sha256-ndwdUfOGY9pN9SFjBRt7LOo6JCz67p9afhQPB4TIqnc=";
   };
 
+  patches = [
+    # Make PyGObject’s gi library available.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
+        python3.pkgs.pygobject3
+      ];
+    })
+  ];
+
   depsBuildBuild = [
     pkg-config
   ];
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/default.nix b/nixpkgs/pkgs/development/libraries/libpeas/default.nix
index 70d33d86ad19..f0b6023117d9 100644
--- a/nixpkgs/pkgs/development/libraries/libpeas/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libpeas/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchurl
+, substituteAll
 , meson
 , ninja
 , pkg-config
@@ -12,6 +13,7 @@
 , gobject-introspection
 , python3
 , ncurses
+, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
@@ -25,6 +27,16 @@ stdenv.mkDerivation rec {
     sha256 = "KXy5wszNjoYXYj0aPoQVtFMLjlqJPjUnu/0e3RMje0w=";
   };
 
+  patches = [
+    # Make PyGObject’s gi library available.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
+        python3.pkgs.pygobject3
+      ];
+    })
+  ];
+
   depsBuildBuild = [
     pkg-config
   ];
@@ -36,6 +48,7 @@ stdenv.mkDerivation rec {
     gettext
     gi-docgen
     gobject-introspection
+    wrapGAppsHook
   ];
 
   buildInputs = [
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch b/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch
new file mode 100644
index 000000000000..c54cdd8873f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch
@@ -0,0 +1,14 @@
+diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
+index 26edbf3..0d65ada 100644
+--- a/loaders/python/peas-plugin-loader-python.c
++++ b/loaders/python/peas-plugin-loader-python.c
+@@ -248,6 +248,9 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
+       goto python_init_error;
+     }
+ 
++  /* Add PyGObject to path */
++  PyRun_SimpleString("import site; import functools; functools.reduce(lambda k, p: site.addsitedir(p, k), [@pythonPaths@], site._init_pathinfo())");
++
+   /* Initialize PyGObject */
+   pygobject_init (PYGOBJECT_MAJOR_VERSION,
+                   PYGOBJECT_MINOR_VERSION,