about summary refs log tree commit diff
path: root/pkgs/development/libraries/zxing-cpp
diff options
context:
space:
mode:
authorAlexander Shpilkin <ashpilkin@gmail.com>2022-05-09 07:36:22 +0300
committerArtturin <Artturin@artturin.com>2022-09-07 21:44:35 +0300
commit61bffac9fa8efe418bcc3ba6bea9968bf56c52d6 (patch)
treee8999784f2c505a1a533a344801bde77968c64a2 /pkgs/development/libraries/zxing-cpp
parentab783bb492bc54f86fead66f990a68bedb538bfb (diff)
zxing: fix paths in pkg-config file
Diffstat (limited to 'pkgs/development/libraries/zxing-cpp')
-rw-r--r--pkgs/development/libraries/zxing-cpp/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/libraries/zxing-cpp/default.nix b/pkgs/development/libraries/zxing-cpp/default.nix
index 126ef2bc69d69..b9d61e5af626d 100644
--- a/pkgs/development/libraries/zxing-cpp/default.nix
+++ b/pkgs/development/libraries/zxing-cpp/default.nix
@@ -26,6 +26,17 @@ stdenv.mkDerivation rec {
     "-DBUILD_BLACKBOX_TESTS=OFF"
   ];
 
+  # https://github.com/nu-book/zxing-cpp/issues/335
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace 'configure_file(zxing.pc.in' \
+                'include(GNUInstallDirs)
+                 configure_file(zxing.pc.in'
+    substituteInPlace zxing.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
   meta = with lib; {
     homepage = "https://github.com/nu-book/zxing-cpp";
     description = "C++ port of zxing (a Java barcode image processing library)";