Skip to content

Commit

Permalink
slock: add configFile support
Browse files Browse the repository at this point in the history
fixes #24994
  • Loading branch information
mt-caret authored and Mic92 committed Apr 18, 2017
1 parent 1eabc23 commit 733cc23
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions 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 = ''
Expand Down

0 comments on commit 733cc23

Please sign in to comment.