summary refs log tree commit diff
path: root/pkgs/development/libraries/expat/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/expat/default.nix')
-rw-r--r--pkgs/development/libraries/expat/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix
index fe30b701ed0..3bfc215aea7 100644
--- a/pkgs/development/libraries/expat/default.nix
+++ b/pkgs/development/libraries/expat/default.nix
@@ -27,6 +27,13 @@ stdenv.mkDerivation rec {
     patchShebangs ./configure ./run.sh ./test-driver-wrapper.sh
   '';
 
+  # CMake files incorrectly calculate library path from dev prefix
+  # https://github.com/libexpat/libexpat/issues/501
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/expat-${version}/expat-noconfig.cmake \
+      --replace "$"'{_IMPORT_PREFIX}' $out
+  '';
+
   meta = with lib; {
     homepage = "https://libexpat.github.io/";
     description = "A stream-oriented XML parser library written in C";