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
7 stdenv.mkDerivation (finalAttrs: {
12 url = "https://dl.suckless.org/tools/slock-${finalAttrs.version}.tar.gz";
13 hash = "sha256-ruHj+/aid/tiWjg4BzuXm2SD57rKTOgvVt4f8ZLbDk0=";
16 buildInputs = [ xorgproto libX11 libXext libXrandr libxcrypt ];
18 installFlags = [ "PREFIX=$(out)" ];
20 postPatch = "sed -i '/chmod u+s/d' Makefile";
22 preBuild = lib.optionalString (conf != null) ''
23 cp ${writeText "config.def.h" conf} config.def.h
26 makeFlags = [ "CC:=$(CC)" ];
29 homepage = "https://tools.suckless.org/slock";
30 description = "Simple X display locker";
32 Simple X display locker. This is the simplest X screen locker.
34 license = licenses.mit;
35 maintainers = with maintainers; [ astsmtl ];
36 platforms = platforms.linux;