biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / misc / nwg-look / default.nix
blob5ce8ad87ba37d76b2c1ecd3c80c46daeaa217761
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , substituteAll
5 , buildGoModule
6 , go
7 , glib
8 , pkg-config
9 , cairo
10 , gtk3
11 , xcur2png
12 , libX11
13 , zlib
16 buildGoModule rec {
17   pname = "nwg-look";
18   version = "0.2.6";
20   src = fetchFromGitHub {
21     owner = "nwg-piotr";
22     repo = "nwg-look";
23     rev = "v${version}";
24     hash = "sha256-kOoYhJKt7/BsQ0/RuVhj0bWnX9GU8ET3MSq6NMCOw5E=";
25   };
27   vendorHash = "sha256-V0KXK6jxBYI+tixBLq24pJJcnu4gDF6nfyns2IBTss4=";
29   # Replace /usr/ directories with the packages output location
30   # This means it references the correct path
31   patches = [ ./fix-paths.patch ];
33   postPatch = ''
34     substituteInPlace main.go tools.go --replace '@out@' $out
35   '';
37   ldflags = [ "-s" "-w" ];
39   nativeBuildInputs = [
40     pkg-config
41   ];
43   buildInputs = [
44     cairo
45     xcur2png
46     libX11.dev
47     zlib
48     gtk3
49   ];
51   CGO_ENABLED = 1;
53   postInstall = ''
54     mkdir -p $out/share
55     mkdir -p $out/share/nwg-look/langs
56     mkdir -p $out/share/applications
57     mkdir -p $out/share/pixmaps
58     cp stuff/main.glade $out/share/nwg-look/
59     cp langs/* $out/share/nwg-look/langs
60     cp stuff/nwg-look.desktop $out/share/applications
61     cp stuff/nwg-look.svg $out/share/pixmaps
62   '';
64   meta = with lib; {
65     homepage = "https://github.com/nwg-piotr/nwg-look";
66     description = "Nwg-look is a GTK3 settings editor, designed to work properly in wlroots-based Wayland environment.";
67     license = licenses.mit;
68     platforms = platforms.linux;
69     maintainers = with maintainers; [ max-amb ];
70     mainProgram = "nwg-look";
71   };