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