2024-04-29 12:29:48 +02:00
|
|
|
{
|
|
|
|
gtk3,
|
|
|
|
gdk-pixbuf,
|
|
|
|
librsvg,
|
|
|
|
webp-pixbuf-loader,
|
|
|
|
gobject-introspection,
|
|
|
|
glib-networking,
|
|
|
|
glib,
|
|
|
|
shared-mime-info,
|
|
|
|
gsettings-desktop-schemas,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
gtk-layer-shell,
|
|
|
|
gnome,
|
|
|
|
libxkbcommon,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
hicolor-icon-theme,
|
|
|
|
rustPlatform,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
luajit,
|
|
|
|
luajitPackages,
|
|
|
|
libpulseaudio,
|
|
|
|
features ? [ ],
|
2023-07-01 20:47:48 +02:00
|
|
|
}:
|
|
|
|
|
2024-04-29 12:29:48 +02:00
|
|
|
let
|
|
|
|
hasFeature = f: features == [ ] || builtins.elem f features;
|
|
|
|
in
|
2023-07-01 20:47:48 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ironbar";
|
2024-05-06 07:28:18 +02:00
|
|
|
version = "0.15.1";
|
2023-07-01 20:47:48 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JakeStanger";
|
|
|
|
repo = "ironbar";
|
|
|
|
rev = "v${version}";
|
2024-05-06 07:28:18 +02:00
|
|
|
hash = "sha256-TPbvKQdoGfZMzp+fl72vy6MtRV1yGcOG/es67VOA0xw=";
|
2023-07-01 20:47:48 +02:00
|
|
|
};
|
|
|
|
|
2024-05-06 07:28:18 +02:00
|
|
|
cargoHash = "sha256-+9R505xyEycv5Dav4ZCh1BiYRp3U1I9yBDqSPefo9uY=";
|
2023-07-01 20:47:48 +02:00
|
|
|
|
2024-04-29 12:29:48 +02:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk-layer-shell
|
|
|
|
glib-networking
|
|
|
|
shared-mime-info
|
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
hicolor-icon-theme
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
libxkbcommon
|
|
|
|
]
|
|
|
|
++ lib.optionals (hasFeature "http") [ openssl ]
|
|
|
|
++ lib.optionals (hasFeature "volume") [ libpulseaudio ]
|
|
|
|
++ lib.optionals (hasFeature "cairo") [ luajit ];
|
2023-07-01 20:47:48 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-04-26 22:24:03 +02:00
|
|
|
wrapGAppsHook3
|
2023-07-01 20:47:48 +02:00
|
|
|
gobject-introspection
|
|
|
|
];
|
2024-04-29 12:29:48 +02:00
|
|
|
propagatedBuildInputs = [ gtk3 ];
|
2023-07-01 20:47:48 +02:00
|
|
|
|
2024-04-29 12:29:48 +02:00
|
|
|
runtimeDeps = [ luajitPackages.lgi ];
|
2023-07-01 20:47:48 +02:00
|
|
|
|
2024-04-29 12:29:48 +02:00
|
|
|
buildNoDefaultFeatures = features != [ ];
|
|
|
|
buildFeatures = features;
|
|
|
|
|
|
|
|
gappsWrapperArgs =
|
|
|
|
''
|
2023-07-01 20:47:48 +02:00
|
|
|
# Thumbnailers
|
|
|
|
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${webp-pixbuf-loader}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
|
|
|
|
# gtk-launch
|
|
|
|
--suffix PATH : "${lib.makeBinPath [ gtk3 ]}"
|
2024-04-29 12:29:48 +02:00
|
|
|
''
|
|
|
|
+ lib.optionalString (hasFeature "cairo") ''
|
|
|
|
--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"
|
|
|
|
--prefix LUA_CPATH : "./?.so;${luajitPackages.lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
${gappsWrapperArgs}
|
2023-07-01 20:47:48 +02:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/JakeStanger/ironbar";
|
|
|
|
description = "Customizable gtk-layer-shell wlroots/sway bar written in Rust";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2024-04-29 12:29:48 +02:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
yavko
|
|
|
|
donovanglover
|
|
|
|
jakestanger
|
|
|
|
];
|
2023-07-01 20:47:48 +02:00
|
|
|
mainProgram = "ironbar";
|
|
|
|
};
|
|
|
|
}
|