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