@@ -2314,6 +2314,53 @@ (define-public xss-lock
(home-page "https://bitbucket.org/raymonad/xss-lock")
(license license:expat))))
+(define-public physlock
+ (package
+ (name "physlock")
+ (version "13")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xyb3rt/physlock")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1mz4xxjip5ldiw9jgfq9zvqb6w10bcjfx6939w1appqg8f521a7s"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+
+ (add-after 'unpack 'fix-makefile
+ (lambda _
+ (substitute* "Makefile" (("-m 4755 -o root -g root") "")))))
+
+ #:make-flags
+ #~(list "HAVE_SYSTEMD=0" "HAVE_ELOGIND=1"
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))))
+ (native-inputs (list linux-pam elogind))
+ (synopsis
+ "Control physical access to a linux computer by locking all of its
+virtual terminals.")
+ (description
+ "physlock only allows the user of the active session (the user logged in
+on the foreground virtual terminal) and the root user to unlock the computer
+and uses PAM for authentication.
+
+physlock uses 3 mechanisms to detect the user of the active session:
+@enumerate
+@item Querying elogind(8)
+@item Searching the utmp file for an entry whose ut_line field is the base name of
+the active tty device file
+@item Using the owner of the active tty device file typically set by login(1)
+@end enumerate")
+ (home-page "https://github.com/xyb3rt/physlock")
+ (license license:gpl2)))
+
(define-public python-pyperclip
(package
(name "python-pyperclip")