2017-04-18 11:19:52 +01:00
|
|
|
{ stdenv, lib, fetchurl, writeText
|
|
|
|
, xproto, libX11, libXext, libXrandr
|
|
|
|
# default header can be obtained from
|
|
|
|
# http://git.suckless.org/slock/tree/config.def.h
|
|
|
|
, conf ? null }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2011-09-17 18:40:07 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-11-20 14:11:26 +00:00
|
|
|
name = "slock-1.4";
|
2017-04-18 11:19:52 +01:00
|
|
|
|
2011-09-17 18:40:07 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dl.suckless.org/tools/${name}.tar.gz";
|
2016-11-20 14:11:26 +00:00
|
|
|
sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m";
|
2011-09-17 18:40:07 +01:00
|
|
|
};
|
2017-04-18 11:19:52 +01:00
|
|
|
|
2016-02-14 13:41:27 +00:00
|
|
|
buildInputs = [ xproto libX11 libXext libXrandr ];
|
2017-04-18 11:19:52 +01:00
|
|
|
|
2011-09-17 18:40:07 +01:00
|
|
|
installFlags = "DESTDIR=\${out} PREFIX=";
|
2017-04-18 11:19:52 +01:00
|
|
|
|
2017-06-22 15:41:55 +01:00
|
|
|
patchPhase = "sed -i '/chmod u+s/d' Makefile";
|
|
|
|
|
2017-04-18 11:19:52 +01:00
|
|
|
preBuild = optionalString (conf != null) ''
|
|
|
|
cp ${writeText "config.def.h" conf} config.def.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2011-09-17 18:40:07 +01:00
|
|
|
homepage = http://tools.suckless.org/slock;
|
|
|
|
description = "Simple X display locker";
|
|
|
|
longDescription = ''
|
|
|
|
Simple X display locker. This is the simplest X screen locker.
|
|
|
|
'';
|
2016-02-14 13:43:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ astsmtl ];
|
|
|
|
platforms = platforms.linux;
|
2011-09-17 18:40:07 +01:00
|
|
|
};
|
|
|
|
}
|