expat: Fix cmake config files

Header & library path constructions in CMake modules expect them to reside under the same prefix as the CMake files.
This assumption doesn't work with our multiple outputs so we patch the library path to the correct output.

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
launchpad/nixpkgs/master
OPNA2608 3 years ago committed by Dmitry Kalinkin
parent 288f1d27d9
commit 392bca4c58
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
  1. 7
      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";

Loading…
Cancel
Save