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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.3 KiB
Nix
Raw Normal View History

2021-08-09 23:01:40 +00:00
{ fetchFromGitHub
, lib
, makeWrapper
, stdenv
2021-08-10 14:26:34 +00:00
# Dependencies (@see https://github.com/pavanjadhaw/betterlockscreen/blob/master/shell.nix)
2021-08-09 23:01:40 +00:00
, bc
, coreutils
, dbus
, withDunst ? true
, dunst
2021-08-09 23:01:40 +00:00
, i3lock-color
, gawk
, gnugrep
, gnused
, imagemagick
, procps
, xorg
2019-01-30 22:00:12 +00:00
}:
let
runtimeDeps =
[ bc coreutils dbus i3lock-color gawk gnugrep gnused imagemagick procps xorg.xdpyinfo xorg.xrandr xorg.xset ]
++ lib.optionals withDunst [ dunst ];
in
2019-01-30 22:00:12 +00:00
stdenv.mkDerivation rec {
pname = "betterlockscreen";
2023-08-27 12:27:58 +00:00
version = "4.2.0";
2019-01-30 22:00:12 +00:00
src = fetchFromGitHub {
owner = "pavanjadhaw";
repo = "betterlockscreen";
2021-08-09 23:01:40 +00:00
rev = "v${version}";
2023-08-27 12:27:58 +00:00
sha256 = "sha256-e/NyUxrN18+x2zt+JzqVA00P8VdHo8oj9Bx09XKI+Eg=";
2019-01-30 22:00:12 +00:00
};
nativeBuildInputs = [ makeWrapper ];
2021-08-10 14:26:34 +00:00
installPhase = ''
runHook preInstall
2021-08-09 23:01:40 +00:00
2021-08-10 14:26:34 +00:00
mkdir -p $out/bin
cp betterlockscreen $out/bin/betterlockscreen
wrapProgram "$out/bin/betterlockscreen" \
--prefix PATH : "$out/bin:${lib.makeBinPath runtimeDeps}"
2021-08-09 23:01:40 +00:00
runHook postInstall
2021-08-10 14:26:34 +00:00
'';
2019-01-30 22:00:12 +00:00
meta = with lib; {
2021-08-09 23:01:40 +00:00
description = "Fast and sweet looking lockscreen for linux systems with effects!";
homepage = "https://github.com/pavanjadhaw/betterlockscreen";
mainProgram = "betterlockscreen";
2019-01-30 22:00:12 +00:00
license = licenses.mit;
platforms = platforms.linux;
2021-08-09 23:01:40 +00:00
maintainers = with maintainers; [ eyjhb sebtm ];
2019-01-30 22:00:12 +00:00
};
}