4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, meson, ninja, pkgconfig, scdoc
|
|
, wayland, wayland-protocols, libxkbcommon, cairo, gdk-pixbuf, pam
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "swaylock";
|
|
version = "1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "swaywm";
|
|
repo = "swaylock";
|
|
rev = version;
|
|
sha256 = "0r95p4w11dwm5ra614vddz83r8j7z6gd120z2vcchy7m9b0f15kf";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace meson.build \
|
|
--replace "version: '1.4'" "version: '${version}'"
|
|
'';
|
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig scdoc ];
|
|
buildInputs = [ wayland wayland-protocols libxkbcommon cairo gdk-pixbuf pam ];
|
|
|
|
mesonFlags = [
|
|
"-Dpam=enabled" "-Dgdk-pixbuf=enabled" "-Dman-pages=enabled"
|
|
];
|
|
|
|
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;
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ primeos ];
|
|
};
|
|
}
|