nixpkgs/pkgs/misc/screensavers/slock/default.nix

38 lines
1007 B
Nix
Raw Normal View History

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