1 { lib, stdenv, fetchurl, writeText
2 , xorgproto, libX11, libXext, libXrandr, libxcrypt
3 # default header can be obtained from
4 # https://git.suckless.org/slock/tree/config.def.h
6 # update script dependencies
10 stdenv.mkDerivation (finalAttrs: {
15 url = "https://dl.suckless.org/tools/slock-${finalAttrs.version}.tar.gz";
16 hash = "sha256-ruHj+/aid/tiWjg4BzuXm2SD57rKTOgvVt4f8ZLbDk0=";
19 buildInputs = [ xorgproto libX11 libXext libXrandr libxcrypt ];
21 installFlags = [ "PREFIX=$(out)" ];
23 postPatch = "sed -i '/chmod u+s/d' Makefile";
25 preBuild = lib.optionalString (conf != null) ''
26 cp ${writeText "config.def.h" conf} config.def.h
29 makeFlags = [ "CC:=$(CC)" ];
31 passthru.updateScript = gitUpdater {
32 url = "git://git.suckless.org/slock";
36 homepage = "https://tools.suckless.org/slock";
37 description = "Simple X display locker";
38 mainProgram = "slock";
40 Simple X display locker. This is the simplest X screen locker.
42 license = licenses.mit;
43 maintainers = with maintainers; [ astsmtl qusic ];
44 platforms = platforms.linux;