nixpkgs/pkgs/by-name/nw/nwg-drawer/package.nix

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

66 lines
1.4 KiB
Nix
Raw Normal View History

2021-07-18 14:57:50 +00:00
{ lib
, buildGoModule
, cairo
2023-11-18 07:52:44 +00:00
, fetchFromGitHub
2021-07-18 14:57:50 +00:00
, gobject-introspection
, gtk-layer-shell
2023-11-18 07:52:44 +00:00
, gtk3
2022-01-15 15:23:11 +00:00
, pkg-config
, wrapGAppsHook3
2023-11-18 07:52:44 +00:00
, xdg-utils
}:
2021-07-18 14:57:50 +00:00
2023-11-18 07:52:44 +00:00
let
2021-07-18 14:57:50 +00:00
pname = "nwg-drawer";
2024-11-09 21:33:09 +00:00
version = "0.5.2";
2021-07-18 14:57:50 +00:00
src = fetchFromGitHub {
owner = "nwg-piotr";
2023-11-18 07:52:44 +00:00
repo = "nwg-drawer";
2021-07-18 14:57:50 +00:00
rev = "v${version}";
2024-11-09 21:33:09 +00:00
hash = "sha256-A/Rg7iUk8qpJ5lxumv4JNNJG1vN8wJIabJupp2c+nsw=";
2021-07-18 14:57:50 +00:00
};
2024-11-09 21:33:09 +00:00
vendorHash = "sha256-r4DtY06z0ZcPoHba4pqpCWqxYo7RbwCKi2g4jdoN1kg=";
2023-11-18 07:52:44 +00:00
in
buildGoModule {
inherit pname version src vendorHash;
nativeBuildInputs = [
gobject-introspection
pkg-config
wrapGAppsHook3
2023-11-18 07:52:44 +00:00
];
2021-07-18 14:57:50 +00:00
2023-11-18 07:52:44 +00:00
buildInputs = [
cairo
gtk-layer-shell
gtk3
];
2022-01-15 15:23:11 +00:00
2023-11-18 07:52:44 +00:00
doCheck = false; # Too slow
2022-01-15 15:23:11 +00:00
preInstall = ''
mkdir -p $out/share/nwg-drawer
cp -r desktop-directories drawer.css $out/share/nwg-drawer
'';
preFixup = ''
# make xdg-open overrideable at runtime
2022-01-15 15:23:11 +00:00
gappsWrapperArgs+=(
--suffix PATH : ${xdg-utils}/bin
2022-01-15 15:23:11 +00:00
--prefix XDG_DATA_DIRS : $out/share
)
'';
2021-07-18 14:57:50 +00:00
meta = with lib; {
description = "Application drawer for sway Wayland compositor";
homepage = "https://github.com/nwg-piotr/nwg-drawer";
2024-06-16 20:48:03 +00:00
changelog = "https://github.com/nwg-piotr/nwg-drawer/releases/tag/${src.rev}";
2023-11-18 07:52:44 +00:00
license = with lib.licenses; [ mit ];
2023-10-03 15:32:28 +00:00
mainProgram = "nwg-drawer";
2023-11-18 07:52:44 +00:00
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = with lib.platforms; linux;
2021-07-18 14:57:50 +00:00
};
}