3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/X11/xsecurelock/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2018-07-11 16:38:38 +01:00
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
, libX11, libXcomposite, libXft, libXmu, libXrandr, libXext, libXScrnSaver
, pam, apacheHttpd, imagemagick, pamtester, xscreensaver, xset }:
2018-07-11 16:38:38 +01:00
stdenv.mkDerivation rec {
2018-08-13 22:31:12 +01:00
name = "xsecurelock-${version}";
version = "1.4.0";
2018-07-11 16:38:38 +01:00
src = fetchFromGitHub {
owner = "google";
repo = "xsecurelock";
2018-08-13 22:31:12 +01:00
rev = "v${version}";
sha256 = "1l9xk3hb5fxp4sqlxjldm4j6cvmxa39a7a37hw8f7vbpmcqy6n6w";
2018-07-11 16:38:38 +01:00
};
2018-12-16 08:49:48 +00:00
nativeBuildInputs = [
autoreconfHook pkgconfig
];
2018-07-11 16:38:38 +01:00
buildInputs = [
libX11 libXcomposite libXft libXmu libXrandr libXext libXScrnSaver
pam apacheHttpd imagemagick pamtester
2018-07-11 16:38:38 +01: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
'';
2018-10-11 01:06:16 +01:00
preInstall = ''
substituteInPlace helpers/saver_blank \
--replace 'protect xset' 'protect ${xset}/bin/xset'
'';
2018-07-11 16:38:38 +01: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;
};
}