nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromCodeberg,
5 pkg-config,
6 wayland-scanner,
7 wayland,
8 wayland-protocols,
9 libxkbcommon,
10 libxcrypt,
11 versionCheckHook,
12 nix-update-script,
13}:
14
15stdenv.mkDerivation (finalAttrs: {
16 pname = "wlock";
17 version = "1.0";
18
19 src = fetchFromCodeberg {
20 owner = "sewn";
21 repo = "wlock";
22 tag = finalAttrs.version;
23 hash = "sha256-vbGrePrZN+IWwzwoNUzMHmb6k9nQbRLVZmbWIAsYneY=";
24 };
25
26 postPatch = ''
27 substituteInPlace Makefile --replace-fail 'chmod 4755' 'chmod 755'
28 '';
29
30 strictDeps = true;
31
32 nativeBuildInputs = [
33 pkg-config
34 wayland-scanner
35 ];
36
37 buildInputs = [
38 wayland
39 wayland-protocols
40 libxkbcommon
41 libxcrypt
42 ];
43
44 makeFlags = [
45 "PREFIX=$(out)"
46 ("WAYLAND_SCANNER=" + lib.getExe wayland-scanner)
47 ];
48
49 doInstallCheck = true;
50 nativeInstallCheckInputs = [ versionCheckHook ];
51 versionCheckProgramArg = "-v";
52
53 passthru.updateScript = nix-update-script { };
54
55 meta = {
56 description = "Sessionlocker for Wayland compositors that support the ext-session-lock-v1 protocol";
57 license = lib.licenses.gpl3Only;
58 homepage = "https://codeberg.org/sewn/wlock";
59 platforms = lib.platforms.linux;
60 maintainers = with lib.maintainers; [
61 fliegendewurst
62 yiyu
63 ];
64 mainProgram = "wlock";
65 };
66})