Skip to content

Commit

Permalink
swaylock-plugin: init at 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
picnoir committed Oct 30, 2024
1 parent ec78e5d commit 7a7dd44
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions pkgs/by-name/sw/swaylock-plugin/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
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 = "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
NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";

mesonFlags = [
"-Dpam=enabled"
"-Dgdk-pixbuf=enabled"
"-Dman-pages=enabled"
];

passthru = {
updateScript = nix-update-script { };
};

meta = with lib; {
description = "Screen locker for Wayland";
longDescription = ''
swaylock is a screen locking utility for Wayland compositors.
Important note: If you don't use the Sway module (programs.sway.enable)
you need to set "security.pam.services.swaylock = {};" manually.
'';
inherit (src.meta) homepage;
mainProgram = "swaylock-plugin";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ picnoir ];
};
}

0 comments on commit 7a7dd44

Please sign in to comment.