2021-01-17 09:17:16 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
autoreconfHook,
|
|
|
|
pkg-config,
|
2019-03-02 02:11:06 +00:00
|
|
|
libX11,
|
|
|
|
libXcomposite,
|
|
|
|
libXft,
|
|
|
|
libXmu,
|
|
|
|
libXrandr,
|
|
|
|
libXext,
|
|
|
|
libXScrnSaver,
|
2022-01-07 12:09:31 +00:00
|
|
|
pam,
|
|
|
|
apacheHttpd,
|
|
|
|
pamtester,
|
|
|
|
xscreensaver,
|
|
|
|
coreutils,
|
|
|
|
makeWrapper,
|
|
|
|
}:
|
2018-07-11 15:38:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "xsecurelock";
|
2023-12-19 18:49:25 +00:00
|
|
|
version = "1.9.0";
|
2018-07-11 15:38:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "xsecurelock";
|
2018-08-13 21:31:12 +00:00
|
|
|
rev = "v${version}";
|
2023-12-19 18:49:25 +00:00
|
|
|
sha256 = "sha256-OPasi5zmvmcWnVCj/dU2KprzNmar51zDElD23750yk4=";
|
2018-07-11 15:38:38 +00:00
|
|
|
};
|
|
|
|
|
2018-12-16 08:49:48 +00:00
|
|
|
nativeBuildInputs = [
|
2022-01-07 12:09:31 +00:00
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
2018-12-16 08:49:48 +00:00
|
|
|
];
|
2022-01-07 12:09:31 +00:00
|
|
|
|
2018-07-11 15:38:38 +00:00
|
|
|
buildInputs = [
|
2019-03-02 02:11:06 +00:00
|
|
|
libX11
|
|
|
|
libXcomposite
|
|
|
|
libXft
|
|
|
|
libXmu
|
|
|
|
libXrandr
|
|
|
|
libXext
|
|
|
|
libXScrnSaver
|
2020-07-02 22:35:14 +00:00
|
|
|
pam
|
|
|
|
apacheHttpd
|
|
|
|
pamtester
|
2018-07-11 15:38:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-pam-service-name=login"
|
|
|
|
"--with-xscreensaver=${xscreensaver}/libexec/xscreensaver"
|
|
|
|
];
|
|
|
|
|
2018-12-16 08:49:48 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cat > version.c <<'EOF'
|
|
|
|
const char *const git_version = "${version}";
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2022-01-07 12:09:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/libexec/xsecurelock/saver_blank --prefix PATH : ${coreutils}/bin
|
|
|
|
'';
|
|
|
|
|
2018-07-11 15:38:38 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "X11 screen lock utility with security in mind";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/google/xsecurelock";
|
2018-07-11 15:38:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
platforms = platforms.unix;
|
2023-10-06 02:59:25 +00:00
|
|
|
mainProgram = "xsecurelock";
|
2018-07-11 15:38:38 +00:00
|
|
|
};
|
|
|
|
}
|