about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2024-01-14 21:14:36 +0800
committerBobby Rong <rjl931189261@126.com>2024-01-14 21:15:23 +0800
commitbfb58157d580deeaf69a96a71a4e9ddfdd1b997e (patch)
tree092162c1996f6586f2fc0edcb473152b5d6545cd /pkgs/applications/editors
parent9d7136ff2abdc93000fe6070e4969dfc02379ce2 (diff)
xed-editor: Fix typelib path
We patch gobject-introspection and meson to store absolute paths to libraries in
typelibs but that requires the install_dir is an absolute path.

ref: https://github.com/NixOS/nixpkgs/commit/1b2a061c87fd079f57a05c5390a42dcc777498f0
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/xed-editor/correct-gir-lib-path.patch13
-rw-r--r--pkgs/applications/editors/xed-editor/default.nix6
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/editors/xed-editor/correct-gir-lib-path.patch b/pkgs/applications/editors/xed-editor/correct-gir-lib-path.patch
new file mode 100644
index 0000000000000..fa530e9a12afa
--- /dev/null
+++ b/pkgs/applications/editors/xed-editor/correct-gir-lib-path.patch
@@ -0,0 +1,13 @@
+diff --git a/xed/meson.build b/xed/meson.build
+index 7525bad..ae0814e 100644
+--- a/xed/meson.build
++++ b/xed/meson.build
+@@ -143,7 +143,7 @@ libxed = library(
+     dependencies: xed_deps,
+     include_directories: include_dirs,
+     install: true,
+-    install_dir: join_paths(libdir, 'xed')
++    install_dir: join_paths(prefix, libdir, 'xed')
+ )
+ 
+ install_headers(
diff --git a/pkgs/applications/editors/xed-editor/default.nix b/pkgs/applications/editors/xed-editor/default.nix
index 164b1fee45dec..8ce15bdce09eb 100644
--- a/pkgs/applications/editors/xed-editor/default.nix
+++ b/pkgs/applications/editors/xed-editor/default.nix
@@ -28,6 +28,12 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-MXRxzmRo/dRhp5Llib9ng1gzWW8uvzqTMjUVK8a3eJ8=";
   };
 
+  patches = [
+    # We patch gobject-introspection and meson to store absolute paths to libraries in typelibs
+    # but that requires the install_dir is an absolute path.
+    ./correct-gir-lib-path.patch
+  ];
+
   nativeBuildInputs = [
     meson
     pkg-config