From bd9f1f215588bb69755a4a283a3a0f9d0ba9de70 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 3 Apr 2024 09:51:02 +0200 Subject: [PATCH] podofo: fix library path in pkg-config file The lib/ directory was being moved to the $lib output post-build without correcting the path in libpodofo.pc. --- pkgs/development/libraries/podofo/0.10.x.nix | 4 ---- pkgs/development/libraries/podofo/default.nix | 9 +++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/podofo/0.10.x.nix b/pkgs/development/libraries/podofo/0.10.x.nix index 6c4356e9add9..93c989a9c1ec 100644 --- a/pkgs/development/libraries/podofo/0.10.x.nix +++ b/pkgs/development/libraries/podofo/0.10.x.nix @@ -53,10 +53,6 @@ stdenv.mkDerivation (finalAttrs: { "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; - postInstall = '' - moveToOutput lib "$lib" - ''; - meta = { homepage = "https://github.com/podofo/podofo"; description = "A library to work with the PDF file format"; diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix index 1243763421c0..85651d225f42 100644 --- a/pkgs/development/libraries/podofo/default.nix +++ b/pkgs/development/libraries/podofo/default.nix @@ -24,8 +24,13 @@ stdenv.mkDerivation rec { "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; - postInstall = '' - moveToOutput lib "$lib" + postPatch = '' + # Use GNU directories to fix multiple outputs + failNoMatches='t yes; b no; :yes h; :no p; $ {x; /./{x;q}; q1}' + sed -ni src/podofo/CMakeLists.txt \ + -e 's/LIBDIRNAME/CMAKE_INSTALL_LIBDIR/' -e "$failNoMatches" + sed -ni src/podofo/libpodofo.pc.in \ + -e 's/^libdir=.*/libdir=@CMAKE_INSTALL_LIBDIR@/' -e "$failNoMatches" ''; meta = with lib; {