1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/misc/screensavers/slock/default.nix
Pascal Wittmann 7427b58266 Switch suckless.org URLs to https
(cherry picked from commit 22f212537f)
2018-04-11 15:11:55 +02:00

37 lines
975 B
Nix

{ stdenv, lib, fetchurl, writeText
, xproto, libX11, libXext, libXrandr
# default header can be obtained from
# https://git.suckless.org/slock/tree/config.def.h
, conf ? null }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "slock-1.4";
src = fetchurl {
url = "https://dl.suckless.org/tools/${name}.tar.gz";
sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m";
};
buildInputs = [ xproto libX11 libXext libXrandr ];
installFlags = "DESTDIR=\${out} PREFIX=";
postPatch = "sed -i '/chmod u+s/d' Makefile";
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.
'';
license = licenses.mit;
maintainers = with maintainers; [ astsmtl ];
platforms = platforms.linux;
};
}