diff options
author | Masayuki Takeda <mtakeda.enigsol@gmail.com> | 2017-04-18 19:19:52 +0900 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-04-18 21:06:17 +0200 |
commit | 733cc23a1b5f38982623aeb1ff35213d62aacab4 (patch) | |
tree | 6270403d99f4610243d8c08b834ff85484cc4244 /pkgs/misc/screensavers/slock | |
parent | 1eabc2396145cfed08d9937ce6d1cc2501b9bd8e (diff) |
slock: add configFile support
fixes #24994
Diffstat (limited to 'pkgs/misc/screensavers/slock')
-rw-r--r-- | pkgs/misc/screensavers/slock/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/misc/screensavers/slock/default.nix b/pkgs/misc/screensavers/slock/default.nix index 2f20943981a5..2a2be06fde6a 100644 --- a/pkgs/misc/screensavers/slock/default.nix +++ b/pkgs/misc/screensavers/slock/default.nix @@ -1,13 +1,27 @@ -{ stdenv, fetchurl, xproto, libX11, libXext, libXrandr }: +{ 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; stdenv.mkDerivation rec { name = "slock-1.4"; + src = fetchurl { url = "http://dl.suckless.org/tools/${name}.tar.gz"; sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m"; }; + buildInputs = [ xproto libX11 libXext libXrandr ]; + installFlags = "DESTDIR=\${out} PREFIX="; - meta = with stdenv.lib; { + + preBuild = optionalString (conf != null) '' + cp ${writeText "config.def.h" conf} config.def.h + ''; + + meta = { homepage = http://tools.suckless.org/slock; description = "Simple X display locker"; longDescription = '' |