From f1a58aba151e59c4a5c438c501663944d608011f Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Thu, 16 Jul 2020 10:41:32 -0500 Subject: [PATCH] exiv2: fix CMake export paths --- pkgs/development/libraries/exiv2/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix index 8a6dfd1983ef..02d3f1da3e69 100644 --- a/pkgs/development/libraries/exiv2/default.nix +++ b/pkgs/development/libraries/exiv2/default.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation rec { (cd ../tests/ && python3 runner.py) ''; - # With cmake we have to enable samples or there won't be + # With CMake we have to enable samples or there won't be # a tests target. This removes them. postInstall = '' ( cd "$out/bin" @@ -108,6 +108,14 @@ stdenv.mkDerivation rec { ) ''; + # Fix CMake export paths. + postFixup = '' + sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \ + -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \ + -e "/Compute the installation prefix/ a set(_IMPORT_PREFIX \"$out\")" \ + -e "/^get_filename_component(_IMPORT_PREFIX/ d" + ''; + enableParallelBuilding = true; meta = with stdenv.lib; {