From f237dead6cf7c79b713168fb1053758c771a1dfe Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Thu, 21 Mar 2024 19:25:55 +0200 Subject: [PATCH] Nix: fix install error Fixes #214 --- nix/cmake.patch | 15 +++++++++++++++ nix/default.nix | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 nix/cmake.patch diff --git a/nix/cmake.patch b/nix/cmake.patch new file mode 100644 index 0000000..92c21d6 --- /dev/null +++ b/nix/cmake.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 07e2338..720810b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -83,9 +83,4 @@ protocol("unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml" "linux-dmabuf-unst + # Installation + install(TARGETS hyprlock) + +-install(CODE " +- if (NOT EXISTS \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/hyprlock\") +- install(FILES \"${CMAKE_SOURCE_DIR}/pam/hyprlock\" DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d\") +- endif() +-") +- ++install(FILES "${CMAKE_SOURCE_DIR}/pam/hyprlock" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d") diff --git a/nix/default.nix b/nix/default.nix index 9fe25e1..0cc8496 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -18,8 +18,14 @@ stdenv.mkDerivation { pname = "hyprlock"; inherit version; + src = ../.; + patches = [ + # remove PAM file install check + ./cmake.patch + ]; + nativeBuildInputs = [ cmake pkg-config