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