From b36d224b85410d466d77bc61c88335b596e9faed Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 7 Mar 2024 01:00:44 +0000 Subject: [PATCH] swaylock-plugin: init (but i likely won't be using it) --- pkgs/additional/swaylock-plugin/default.nix | 65 +++++++++++++++++++++ pkgs/default.nix | 1 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/additional/swaylock-plugin/default.nix diff --git a/pkgs/additional/swaylock-plugin/default.nix b/pkgs/additional/swaylock-plugin/default.nix new file mode 100644 index 00000000..bf05f6bf --- /dev/null +++ b/pkgs/additional/swaylock-plugin/default.nix @@ -0,0 +1,65 @@ +# STATUS: +# - can't find any virtual keyboard it works with +# - run with `swaylock-plugin --command='/nix/store/my-virtual-keyboard-.../bin/vkbd'` +# - if it crashes, launch `sane-open-desktop swaylock.desktop` from another TTY +# - `cd /etc/pam.d; sudo cp swaylock swaylock-plugin` +{ lib, stdenv +, cairo +, fetchFromGitHub +, gdk-pixbuf +, libxkbcommon +, meson +, ninja +, pam +, pkg-config +, scdoc +, wayland +, wayland-protocols +, wayland-scanner +}: +stdenv.mkDerivation { + pname = "swaylock-plugin"; + version = "1.6-unstable-2024-02-21"; #< from meson.build + + src = fetchFromGitHub { + owner = "mstoeckl"; + repo = "swaylock-plugin"; + rev = "1dd15b6ecbe91be7a3dc4a0fa9514fb166fb2e07"; + hash = "sha256-xWyDDT8sXAL58HtA9ifzCenKMmOZquzXZaz3ttGGJuY="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + scdoc + wayland-scanner + ]; + buildInputs = [ + cairo + gdk-pixbuf + libxkbcommon + pam + wayland + wayland-protocols + ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-error=maybe-uninitialized"; + + meta = with lib; { + description = "Screen locker for Wayland -- fork with background plugin support"; + longDescription = '' + This is a fork of swaylock, a screen locking utility for Wayland compositors. + With swaylock-plugin, you can for your lockscreen background display the + animated output from any wallpaper program that implements the + wlr-layer-shell-unstable-v1 protocol. + + N.B.: it's necessary to install /etc/pam.d/swaylock-plugin without which + swaylock-plugin will never unlock your session. + ''; + inherit (src.meta) homepage; + mainProgram = "swaylock-plugin"; + platforms = platforms.linux; + maintainers = with maintainers; [ colinsane ]; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index a399543f..966d4abf 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -62,6 +62,7 @@ let signal-desktop-from-src = callPackage ./additional/signal-desktop-from-src { }; static-nix-shell = callPackage ./additional/static-nix-shell { }; sublime-music-mobile = callPackage ./additional/sublime-music-mobile { }; + swaylock-plugin = callPackage ./additional/swaylock-plugin { }; sxmo-utils = callPackage ./additional/sxmo-utils { }; tow-boot-pinephone = callPackage ./additional/tow-boot-pinephone { }; tree-sitter-nix-shell = callPackage ./additional/tree-sitter-nix-shell { };