nixpkgs/pkgs/by-name/wl/wlogout/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

83 lines
1.7 KiB
Nix

{ lib
, fetchFromGitHub
, gitUpdater
, gtk-layer-shell
, gtk3
, libxkbcommon
, meson
, ninja
, pkg-config
, scdoc
, stdenv
, wayland
, wayland-protocols
# gtk-layer-shell fails to cross-compile due to a hard dependency
# on gobject-introspection.
# Disable it when cross-compiling since it's an optional dependency.
# This disables transparency support.
, withGtkLayerShell ? (stdenv.buildPlatform == stdenv.hostPlatform)
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wlogout";
version = "1.2.2";
src = fetchFromGitHub {
owner = "ArtsyMacaw";
repo = "wlogout";
rev = finalAttrs.version;
hash = "sha256-/tYZy56ku68ziSOhy6Dex9RGy+blkU6CN2ze76y7718=";
};
outputs = [ "out" "man" ];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
scdoc
];
buildInputs = [
gtk3
libxkbcommon
wayland
wayland-protocols
] ++ lib.optionals withGtkLayerShell [
gtk-layer-shell
];
strictDeps = true;
mesonFlags = [
"--datadir=${placeholder "out"}/share"
"--sysconfdir=${placeholder "out"}/etc"
];
postPatch = ''
substituteInPlace style.css \
--replace "/usr/share/wlogout" "$out/share/wlogout"
substituteInPlace main.c \
--replace "/etc/wlogout" "$out/etc/wlogout"
'';
passthru = {
updateScript = gitUpdater { };
};
meta = {
homepage = "https://github.com/ArtsyMacaw/wlogout";
description = "Wayland based logout menu";
changelog = "https://github.com/ArtsyMacaw/wlogout/releases/tag/${finalAttrs.src.rev}";
license = with lib.licenses; [ mit ];
mainProgram = "wlogout";
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (wayland.meta) platforms;
};
})