Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swaylock-fprintd: init at unstable-20230130 #226519

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions pkgs/applications/window-managers/sway/lock-fprintd.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, scdoc
, wayland-scanner
, wayland
, wayland-protocols
, libxkbcommon
, cairo
, gdk-pixbuf
, pam
, glib
, dbus
, fprintd
, unstableGitUpdater
}:

stdenv.mkDerivation rec {
pname = "swaylock-fprintd";
version = "unstable-20230130";
Copy link
Member

@lilyinstarlight lilyinstarlight May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "unstable-20230130";
version = "unstable-2023-01-30";

The format documented in the manual for unstable git versions is unstable-YYYY-MM-DD (this may have been my bad in the derivation I wrote...)


src = fetchFromGitHub {
owner = "SL-RU";
repo = "swaylock-fprintd";
rev = "ffd639a785df0b9f39e9a4d77b7c0d7ba0b8ef79";
hash = "sha256-2VklrbolUV00djPt+ngUyU+YMnJLAHhD+CLZD1wH4ww=";
};

postPatch = ''
substituteInPlace fingerprint/meson.build --replace \
'/usr/share/dbus-1/interfaces/net.reactivated.Fprint' \
'${fprintd}/share/dbus-1/interfaces/net.reactivated.Fprint'
'';

strictDeps = true;
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
pkg-config
glib
meson
ninja
pkg-config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pkg-config

I just noticed I had pkg-config in my derivation twice for some reason...

scdoc
wayland-scanner
];
buildInputs = [
wayland
wayland-protocols
libxkbcommon
cairo
gdk-pixbuf
pam
dbus
];

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

passthru.updateScript = unstableGitUpdater {};

meta = with lib; {
description = "Screen locker for Wayland with fingerprint support via fprintd";
longDescription = ''
swaylock-fprintd is a fork of swaylock, a screen locking utility for Wayland compositors,
with fingerprint support via fprintd. It is compatible with any Wayland compositor which
implements the ext-session-lock-v1 Wayland protocol.
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;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ lilyinstarlight sebtm ];
mainProgram = "swaylock";
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31265,6 +31265,7 @@ with pkgs;
swayidle = callPackage ../applications/window-managers/sway/idle.nix { };
swaylock = callPackage ../applications/window-managers/sway/lock.nix { };
swayosd = callPackage ../applications/window-managers/sway/osd.nix { };
swaylock-fprintd = callPackage ../applications/window-managers/sway/lock-fprintd.nix { };
Comment on lines 31267 to +31268
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
swayosd = callPackage ../applications/window-managers/sway/osd.nix { };
swaylock-fprintd = callPackage ../applications/window-managers/sway/lock-fprintd.nix { };
swaylock-fprintd = callPackage ../applications/window-managers/sway/lock-fprintd.nix { };
swayosd = callPackage ../applications/window-managers/sway/osd.nix { };

Sort

swayws = callPackage ../applications/window-managers/sway/ws.nix { };
swaywsr = callPackage ../applications/window-managers/sway/wsr.nix { };
sway-contrib = recurseIntoAttrs (callPackages ../applications/window-managers/sway/contrib.nix { });
Expand Down