nixpkgs/pkgs/tools/X11/xsecurelock/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2018-07-11 11:38:38 -04:00
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
2018-09-22 16:38:44 -04:00
, libX11, libXcomposite, libXft, libXmu, pam, apacheHttpd, imagemagick
2018-10-10 20:06:16 -04:00
, pamtester, xscreensaver, xset }:
2018-07-11 11:38:38 -04:00
stdenv.mkDerivation rec {
2018-08-13 17:31:12 -04:00
name = "xsecurelock-${version}";
2018-12-16 03:49:48 -05:00
version = "1.2";
2018-07-11 11:38:38 -04:00
src = fetchFromGitHub {
owner = "google";
repo = "xsecurelock";
2018-08-13 17:31:12 -04:00
rev = "v${version}";
2018-12-16 03:49:48 -05:00
sha256 = "1vaw2m3yyfazj1x7xdwppmm0ch075q399g5vzrmhhrkzdrs53r1x";
2018-07-11 11:38:38 -04:00
};
2018-12-16 03:49:48 -05:00
nativeBuildInputs = [
autoreconfHook pkgconfig
];
2018-07-11 11:38:38 -04:00
buildInputs = [
2018-09-22 16:38:44 -04:00
libX11 libXcomposite libXft libXmu pam
2018-07-11 11:38:38 -04:00
apacheHttpd imagemagick pamtester
];
configureFlags = [
"--with-pam-service-name=login"
"--with-xscreensaver=${xscreensaver}/libexec/xscreensaver"
];
2018-12-16 03:49:48 -05:00
preConfigure = ''
cat > version.c <<'EOF'
const char *const git_version = "${version}";
EOF
'';
2018-10-10 20:06:16 -04:00
preInstall = ''
substituteInPlace helpers/saver_blank \
--replace 'protect xset' 'protect ${xset}/bin/xset'
'';
2018-07-11 11:38:38 -04:00
meta = with lib; {
description = "X11 screen lock utility with security in mind";
homepage = https://github.com/google/xsecurelock;
license = licenses.asl20;
maintainers = with maintainers; [ fpletz ];
platforms = platforms.unix;
};
}