Nix: fix install error

Fixes #214
This commit is contained in:
Mihai Fufezan 2024-03-21 19:25:55 +02:00
parent e0d7e8f946
commit f237dead6c
No known key found for this signature in database
2 changed files with 21 additions and 0 deletions

15
nix/cmake.patch Normal file
View file

@ -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")

View file

@ -18,8 +18,14 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "hyprlock"; pname = "hyprlock";
inherit version; inherit version;
src = ../.; src = ../.;
patches = [
# remove PAM file install check
./cmake.patch
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
pkg-config pkg-config