depot/third_party/nixpkgs/pkgs/applications/misc/waylock/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

52 lines
984 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
zig,
wayland,
pkg-config,
scdoc,
wayland-protocols,
libxkbcommon,
pam,
}:
stdenv.mkDerivation rec {
pname = "waylock";
version = "0.4.2";
src = fetchFromGitHub {
owner = "ifreund";
repo = pname;
rev = "v${version}";
sha256 = "sha256-yWjWcnGa4a+Dpc82H65yr8H7v88g/tDq0FSguubhbEI=";
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 --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];
};
}