nixpkgs/pkgs/by-name/wl/wlogout/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
1.7 KiB
Nix
Raw Normal View History

2021-02-16 06:33:02 +00:00
{ lib
, fetchFromGitHub
, gitUpdater
, gtk-layer-shell
, gtk3
, libxkbcommon
2021-02-16 06:33:02 +00:00
, meson
, ninja
, pkg-config
2021-02-16 06:33:02 +00:00
, scdoc
, stdenv
2021-02-16 06:33:02 +00:00
, 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)
2021-02-16 06:33:02 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2021-02-16 06:33:02 +00:00
pname = "wlogout";
2024-03-01 12:49:41 +00:00
version = "1.2.1";
2021-02-16 06:33:02 +00:00
src = fetchFromGitHub {
owner = "ArtsyMacaw";
repo = "wlogout";
rev = finalAttrs.version;
2024-03-01 12:49:41 +00:00
hash = "sha256-n8r+E6GXXjyDYBTOMiv5musamaUFSpRTM2qHgb047og=";
2021-02-16 06:33:02 +00:00
};
outputs = [ "out" "man" ];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
scdoc
];
2021-02-16 06:33:02 +00:00
buildInputs = [
gtk3
libxkbcommon
wayland
wayland-protocols
] ++ lib.optionals withGtkLayerShell [
gtk-layer-shell
2021-02-16 06:33:02 +00:00
];
strictDeps = true;
mesonFlags = [
"--datadir=${placeholder "out"}/share"
"--sysconfdir=${placeholder "out"}/etc"
];
2021-02-16 06:33:02 +00:00
postPatch = ''
substituteInPlace style.css \
--replace "/usr/share/wlogout" "$out/share/wlogout"
2021-02-16 06:33:02 +00:00
substituteInPlace main.c \
--replace "/etc/wlogout" "$out/etc/wlogout"
2021-02-16 06:33:02 +00:00
'';
passthru = {
updateScript = gitUpdater { };
};
2021-02-16 06:33:02 +00:00
meta = {
2021-02-16 06:33:02 +00:00
homepage = "https://github.com/ArtsyMacaw/wlogout";
description = "A 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;
2021-02-16 06:33:02 +00:00
};
})