nixpkgs/pkgs/by-name/wa/waylock/package.nix

70 lines
1.3 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
callPackage,
fetchFromGitea,
libxkbcommon,
pam,
pkg-config,
scdoc,
wayland,
wayland-scanner,
wayland-protocols,
2024-09-15 18:15:16 +02:00
zig_0_13,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "waylock";
2024-09-15 18:15:16 +02:00
version = "1.2.1";
2024-01-15 01:25:15 +01:00
src = fetchFromGitea {
domain = "codeberg.org";
owner = "ifreund";
repo = "waylock";
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
2024-09-15 18:15:16 +02:00
hash = "sha256-i1Nd39666xrkzi7r08ZRIXJXvK9wmzb8zdmvmWEQaHE=";
};
deps = callPackage ./build.zig.zon.nix { };
nativeBuildInputs = [
pkg-config
scdoc
wayland-scanner
2024-09-15 18:15:16 +02:00
zig_0_13.hook
];
buildInputs = [
wayland
wayland-protocols
libxkbcommon
pam
];
zigBuildFlags = [
"-Dman-pages"
"--system"
"${finalAttrs.deps}"
];
preBuild = ''
substituteInPlace pam.d/waylock --replace-fail "system-auth" "login"
'';
passthru.updateScript = ./update.nu;
meta = {
homepage = "https://codeberg.org/ifreund/waylock";
changelog = "https://codeberg.org/ifreund/waylock/releases/tag/v${finalAttrs.version}";
description = "Small screenlocker for Wayland compositors";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [
adamcstephens
jordanisaacs
];
2023-09-02 21:23:23 +02:00
mainProgram = "waylock";
platforms = lib.platforms.linux;
};
})