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