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

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

74 lines
1.5 KiB
Nix
Raw Normal View History

2023-09-09 04:53:18 +00:00
{ lib
, fetchFromGitHub
2024-05-29 18:29:54 +00:00
, wrapGAppsHook3
2023-09-09 04:53:18 +00:00
, buildGoModule
, glib
, pkg-config
, cairo
, gtk3
, xcur2png
, libX11
, zlib
}:
buildGoModule rec {
pname = "nwg-look";
2024-05-29 18:29:54 +00:00
version = "0.2.7";
2023-09-09 04:53:18 +00:00
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = "nwg-look";
2023-09-09 04:53:18 +00:00
rev = "v${version}";
2024-05-29 18:29:54 +00:00
hash = "sha256-qUNTJkNHWoJisLH0SU23UQuamEL27MMRnxw0kBxzWLk=";
2023-09-09 04:53:18 +00:00
};
2024-05-29 18:29:54 +00:00
vendorHash = "sha256-qHWy9OCxENrrWk00YoRveSjqYWIy/fe4Fyc8tc4n34E=";
2023-09-09 04:53:18 +00:00
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [
pkg-config
2024-05-29 18:29:54 +00:00
wrapGAppsHook3
2023-09-09 04:53:18 +00:00
];
buildInputs = [
2024-05-29 18:29:54 +00:00
glib
2023-09-09 04:53:18 +00:00
cairo
xcur2png
libX11.dev
zlib
gtk3
];
CGO_ENABLED = 1;
postInstall = ''
mkdir -p $out/share
mkdir -p $out/share/nwg-look/langs
mkdir -p $out/share/applications
mkdir -p $out/share/pixmaps
2024-05-29 18:29:54 +00:00
mkdir -p $out/share/icons
2023-09-09 04:53:18 +00:00
cp stuff/main.glade $out/share/nwg-look/
cp langs/* $out/share/nwg-look/langs
cp stuff/nwg-look.desktop $out/share/applications
cp stuff/nwg-look.svg $out/share/pixmaps
'';
2024-05-29 18:29:54 +00:00
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : "${glib.bin}/bin"
--prefix PATH : "${xcur2png}/bin"
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
)
'';
2023-09-09 04:53:18 +00:00
meta = with lib; {
homepage = "https://github.com/nwg-piotr/nwg-look";
description = "Nwg-look is a GTK3 settings editor, designed to work properly in wlroots-based Wayland environment";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ max-amb ];
mainProgram = "nwg-look";
};
}