nixpkgs/pkgs/applications/misc/waylock/default.nix

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

52 lines
989 B
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, zig
, wayland
, pkg-config
, scdoc
, wayland-protocols
, libxkbcommon
, pam
}:
stdenv.mkDerivation rec {
pname = "waylock";
2023-02-15 21:59:43 +00:00
version = "0.6.2";
src = fetchFromGitHub {
owner = "ifreund";
repo = pname;
rev = "v${version}";
2023-02-15 21:59:43 +00:00
hash = "sha256-jl4jSDWvJB6OfBbVXfVQ7gv/aDkN6bBy+/yK+AQDQL0=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig wayland scdoc pkg-config ];
buildInputs = [
wayland-protocols
libxkbcommon
pam
];
dontConfigure = true;
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
runHook preInstall
zig build -Drelease-safe -Dman-pages -Dcpu=baseline --prefix $out install
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/ifreund/waylock";
description = "A small screenlocker for Wayland compositors";
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ jordanisaacs ];
};
}