chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ir / ironbar / package.nix
blob7a16167d7d7966217607de5cf5d0e7dab23ca918
2   gtk3,
3   gdk-pixbuf,
4   librsvg,
5   webp-pixbuf-loader,
6   gobject-introspection,
7   glib-networking,
8   glib,
9   shared-mime-info,
10   gsettings-desktop-schemas,
11   wrapGAppsHook3,
12   gtk-layer-shell,
13   adwaita-icon-theme,
14   libxkbcommon,
15   openssl,
16   pkg-config,
17   hicolor-icon-theme,
18   rustPlatform,
19   lib,
20   fetchFromGitHub,
21   luajit,
22   luajitPackages,
23   libpulseaudio,
24   features ? [ ],
27 let
28   hasFeature = f: features == [ ] || builtins.elem f features;
30 rustPlatform.buildRustPackage rec {
31   pname = "ironbar";
32   version = "0.16.0";
34   src = fetchFromGitHub {
35     owner = "JakeStanger";
36     repo = "ironbar";
37     rev = "v${version}";
38     hash = "sha256-bvg7U7asuTONZgINQO8wSM2QjXAybvV7j5Ex/g6IDok=";
39   };
41   cargoHash = "sha256-Hlucn83Uf1XydRY4SYso+fJ5EvH2hOGmCFYuKgCeSuE=";
43   buildInputs =
44     [
45       gtk3
46       gdk-pixbuf
47       glib
48       gtk-layer-shell
49       glib-networking
50       shared-mime-info
51       adwaita-icon-theme
52       hicolor-icon-theme
53       gsettings-desktop-schemas
54       libxkbcommon
55     ]
56     ++ lib.optionals (hasFeature "http") [ openssl ]
57     ++ lib.optionals (hasFeature "volume") [ libpulseaudio ]
58     ++ lib.optionals (hasFeature "cairo") [ luajit ];
60   nativeBuildInputs = [
61     pkg-config
62     wrapGAppsHook3
63     gobject-introspection
64   ];
65   propagatedBuildInputs = [ gtk3 ];
67   runtimeDeps = [ luajitPackages.lgi ];
69   buildNoDefaultFeatures = features != [ ];
70   buildFeatures = features;
72   gappsWrapperArgs =
73     ''
74       # Thumbnailers
75       --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
76       --prefix XDG_DATA_DIRS : "${librsvg}/share"
77       --prefix XDG_DATA_DIRS : "${webp-pixbuf-loader}/share"
78       --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
80       # gtk-launch
81       --suffix PATH : "${lib.makeBinPath [ gtk3 ]}"
82     ''
83     + lib.optionalString (hasFeature "cairo") ''
84       --prefix LUA_PATH : "./?.lua;${luajitPackages.lgi}/share/lua/5.1/?.lua;${luajitPackages.lgi}/share/lua/5.1/?/init.lua;${luajit}/share/lua/5.1/\?.lua;${luajit}/share/lua/5.1/?/init.lua"
85       --prefix LUA_CPATH : "./?.so;${luajitPackages.lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
86     '';
88   preFixup = ''
89     gappsWrapperArgs+=(
90       ${gappsWrapperArgs}
91     )
92   '';
94   meta = with lib; {
95     homepage = "https://github.com/JakeStanger/ironbar";
96     description = "Customizable gtk-layer-shell wlroots/sway bar written in Rust";
97     license = licenses.mit;
98     platforms = platforms.linux;
99     maintainers = with maintainers; [
100       yavko
101       donovanglover
102       jakestanger
103     ];
104     mainProgram = "ironbar";
105   };