From 735c4f912bc1995c9aac5a088c5599709d9d0eb0 Mon Sep 17 00:00:00 2001 From: Picnoir Date: Wed, 30 Oct 2024 10:26:17 +0100 Subject: [PATCH] swaylock-plugin: init at 1.8.0 --- pkgs/by-name/sw/swaylock-plugin/package.nix | 82 +++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pkgs/by-name/sw/swaylock-plugin/package.nix diff --git a/pkgs/by-name/sw/swaylock-plugin/package.nix b/pkgs/by-name/sw/swaylock-plugin/package.nix new file mode 100644 index 0000000000000..0ef29e11a7faa --- /dev/null +++ b/pkgs/by-name/sw/swaylock-plugin/package.nix @@ -0,0 +1,82 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + scdoc, + libxcrypt, + wayland-scanner, + wayland, + wayland-protocols, + libxkbcommon, + cairo, + gdk-pixbuf, + pam, + nix-update-script, +}: + +let + version = "1.8.0"; + src = fetchFromGitHub { + owner = "mstoeckl"; + repo = "swaylock-plugin"; + rev = "refs/tags/v${version}"; + hash = "sha256-Kd6Gqs+YnQu3qKfEeqW5CG38bU2gH2hqjoFEojWa8a4="; + }; +in +stdenv.mkDerivation { + inherit version src; + pname = "swaylock-plugin"; + + strictDeps = true; + depsBuildBuild = [ pkg-config ]; + nativeBuildInputs = [ + meson + ninja + pkg-config + scdoc + wayland-scanner + ]; + buildInputs = [ + cairo + libxcrypt + gdk-pixbuf + libxkbcommon + pam + wayland + wayland-protocols + ]; + + # Pleasing GCC. + # TOREMOVE when https://github.com/mstoeckl/swaylock-plugin/pull/14 + # gets merged + env.NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized"; + + mesonFlags = [ + "-Dpam=enabled" + "-Dgdk-pixbuf=enabled" + "-Dman-pages=enabled" + ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Screen locker for Wayland, forked from swaylock"; + longDescription = '' + swaylock-pulgins is a fork of swaylock, a screen locking utility for Wayland compositors. + On top of the usual swaylock features, it allow you to use a + subcommand to generate the lockscreen background. + + Important note: You need to set "security.pam.services.swaylock-plugin = {};" manually. + ''; + inherit (src.meta) homepage; + mainProgram = "swaylock-plugin"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ picnoir ]; + }; +}