2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv, fetchurl, writeText
|
2022-09-30 00:43:38 +00:00
|
|
|
, xorgproto, libX11, libXext, libXrandr, libxcrypt
|
2017-04-18 10:19:52 +00:00
|
|
|
# default header can be obtained from
|
2018-04-11 13:09:51 +00:00
|
|
|
# https://git.suckless.org/slock/tree/config.def.h
|
2024-03-26 04:48:44 +00:00
|
|
|
, conf ? null
|
|
|
|
# update script dependencies
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2017-04-18 10:19:52 +00:00
|
|
|
|
2022-11-12 17:03:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-08-12 21:00:21 +00:00
|
|
|
pname = "slock";
|
2022-11-12 17:03:37 +00:00
|
|
|
version = "1.5";
|
2017-04-18 10:19:52 +00:00
|
|
|
|
2011-09-17 17:40:07 +00:00
|
|
|
src = fetchurl {
|
2022-11-12 17:03:37 +00:00
|
|
|
url = "https://dl.suckless.org/tools/slock-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-ruHj+/aid/tiWjg4BzuXm2SD57rKTOgvVt4f8ZLbDk0=";
|
2011-09-17 17:40:07 +00:00
|
|
|
};
|
2017-04-18 10:19:52 +00:00
|
|
|
|
2022-09-30 00:43:38 +00:00
|
|
|
buildInputs = [ xorgproto libX11 libXext libXrandr libxcrypt ];
|
2017-04-18 10:19:52 +00:00
|
|
|
|
2021-11-13 12:34:17 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2017-04-18 10:19:52 +00:00
|
|
|
|
2017-09-23 21:08:09 +00:00
|
|
|
postPatch = "sed -i '/chmod u+s/d' Makefile";
|
2017-06-22 14:41:55 +00:00
|
|
|
|
2022-11-12 17:03:37 +00:00
|
|
|
preBuild = lib.optionalString (conf != null) ''
|
2017-04-18 10:19:52 +00:00
|
|
|
cp ${writeText "config.def.h" conf} config.def.h
|
|
|
|
'';
|
|
|
|
|
2021-11-13 12:34:17 +00:00
|
|
|
makeFlags = [ "CC:=$(CC)" ];
|
|
|
|
|
2024-03-26 04:48:44 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "git://git.suckless.org/slock";
|
|
|
|
};
|
|
|
|
|
2022-11-12 17:03:37 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://tools.suckless.org/slock";
|
2011-09-17 17:40:07 +00:00
|
|
|
description = "Simple X display locker";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "slock";
|
2011-09-17 17:40:07 +00:00
|
|
|
longDescription = ''
|
|
|
|
Simple X display locker. This is the simplest X screen locker.
|
|
|
|
'';
|
2016-02-14 13:43:45 +00:00
|
|
|
license = licenses.mit;
|
2024-04-01 08:33:27 +00:00
|
|
|
maintainers = with maintainers; [ astsmtl qusic ];
|
2016-02-14 13:43:45 +00:00
|
|
|
platforms = platforms.linux;
|
2011-09-17 17:40:07 +00:00
|
|
|
};
|
2022-11-12 17:03:37 +00:00
|
|
|
})
|