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";