Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
writeText,
|
|
xorgproto,
|
|
libX11,
|
|
libXext,
|
|
libXrandr,
|
|
libxcrypt,
|
|
config,
|
|
conf ? config.slock.conf or null,
|
|
patches ? config.slock.patches or [ ],
|
|
extraLibs ? config.slock.extraLibs or [ ],
|
|
# update script dependencies
|
|
gitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "slock";
|
|
version = "1.6";
|
|
|
|
src = fetchzip {
|
|
url = "https://dl.suckless.org/tools/slock-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-EIzLEIGd631dwYoAe7PXNoki9iaQPP3Y0S5H80aY+l8=";
|
|
};
|
|
|
|
buildInputs = [
|
|
xorgproto
|
|
libX11
|
|
libXext
|
|
libXrandr
|
|
libxcrypt
|
|
]
|
|
++ extraLibs;
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
postPatch = "sed -i '/chmod u+s/d' Makefile";
|
|
|
|
preBuild = lib.optionalString (conf != null) ''
|
|
cp ${writeText "config.def.h" conf} config.def.h
|
|
'';
|
|
|
|
inherit patches;
|
|
|
|
makeFlags = [ "CC:=$(CC)" ];
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
url = "git://git.suckless.org/slock";
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://tools.suckless.org/slock";
|
|
description = "Simple X display locker";
|
|
mainProgram = "slock";
|
|
longDescription = ''
|
|
Simple X display locker. This is the simplest X screen locker.
|
|
'';
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
qusic
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|