From ae87a30a8343053f3e4b5217dab222f2a1e4a0b9 Mon Sep 17 00:00:00 2001 From: timor Date: Thu, 7 Sep 2017 18:47:37 +0200 Subject: [PATCH] physlock: 0.5 -> 11-dev Update physlock to a more current version which supports PAM and systemd-logind. Amongst others, this should work now with the slim login manager without any additional configuration, because it does not rely on the utmp mechanism anymore. --- nixos/modules/services/security/physlock.nix | 2 ++ pkgs/misc/screensavers/physlock/default.nix | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/security/physlock.nix b/nixos/modules/services/security/physlock.nix index 0881483967c6..30224d7fc6ba 100644 --- a/nixos/modules/services/security/physlock.nix +++ b/nixos/modules/services/security/physlock.nix @@ -99,6 +99,8 @@ in ''; }; + security.pam.services.physlock = {}; + }; } diff --git a/pkgs/misc/screensavers/physlock/default.nix b/pkgs/misc/screensavers/physlock/default.nix index e580c9efea82..14c2e178e923 100644 --- a/pkgs/misc/screensavers/physlock/default.nix +++ b/pkgs/misc/screensavers/physlock/default.nix @@ -1,23 +1,27 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, pam, systemd }: stdenv.mkDerivation rec { - version = "0.5"; + version = "11-dev"; name = "physlock-v${version}"; src = fetchFromGitHub { owner = "muennich"; repo = "physlock"; - rev = "v${version}"; - sha256 = "102kdixrf7xxsxr69lbz73i1ss7959716cmdf8d5kbnhmk6argv7"; + rev = "31cc383afc661d44b6adb13a7a5470169753608f"; + sha256 = "0j6v8li3vw9y7vwh9q9mk1n1cnwlcy3bgr1jgw5gcv2am2yi4vx3"; }; + buildInputs = [ pam systemd ]; + preConfigure = '' substituteInPlace Makefile \ --replace /usr/local $out \ --replace "-m 4755 -o root -g root" "" ''; + makeFlags = "SESSION=systemd"; + meta = with stdenv.lib; { - description = "A secure suspend/hibernate-friendly alternative to `vlock -an` without PAM support"; + description = "A secure suspend/hibernate-friendly alternative to `vlock -an`"; license = licenses.gpl2; platforms = platforms.linux; };