From 4c958df482229b4f82e46eb0302987d478be7501 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 12 Apr 2024 12:12:53 +0200 Subject: [PATCH] lomiri.biometryd: Fix lack of output fixup in pkg-config file, update pkg-config call with new CMake option --- pkgs/desktops/lomiri/services/biometryd/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/lomiri/services/biometryd/default.nix b/pkgs/desktops/lomiri/services/biometryd/default.nix index 418a39ebb6e0..d06ecf16942e 100644 --- a/pkgs/desktops/lomiri/services/biometryd/default.nix +++ b/pkgs/desktops/lomiri/services/biometryd/default.nix @@ -38,12 +38,17 @@ stdenv.mkDerivation (finalAttrs: { ]; postPatch = '' - # Uses pkg_get_variable, cannot substitute prefix with that + # Substitute systemd's prefix in pkg-config call substituteInPlace data/CMakeLists.txt \ - --replace 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'set(SYSTEMD_SYSTEM_UNIT_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/system")' + --replace-fail 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})' substituteInPlace src/biometry/qml/Biometryd/CMakeLists.txt \ - --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" + --replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" + + # For our automatic pkg-config output patcher to work, prefix must be used here + substituteInPlace data/biometryd.pc.in \ + --replace-fail 'libdir=''${exec_prefix}' 'libdir=''${prefix}' \ + --replace-fail 'includedir=''${exec_prefix}' 'includedir=''${prefix}' \ '' + lib.optionalString (!finalAttrs.doCheck) '' sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt '';