Merge pull request #307726 from kashw2/ironbar
ironbar: 0.14.1 -> 0.15.0; added feature checks
This commit is contained in:
@@ -1,63 +1,76 @@
|
||||
{ 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
|
||||
{
|
||||
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 ? [ ],
|
||||
}:
|
||||
|
||||
let
|
||||
hasFeature = f: features == [ ] || builtins.elem f features;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ironbar";
|
||||
version = "0.14.1";
|
||||
version = "0.15.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JakeStanger";
|
||||
repo = "ironbar";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-y4w4i/IVe1+wjB2tsCPQH6c7XTl93u45Q0pXFi3TY1E=";
|
||||
hash = "sha256-SowZ3qo06x32+A02Wmq4N/rU/yxyKqkn407qHzJLU0M=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-h5yNJM+NvX/Hi86iSegHWevPcPZeDmJ4y/qNr3G20Qg=";
|
||||
cargoHash = "sha256-DaF669mOnICTnUzH4mc640xIecin/UEZSk7PWDjQbr0=";
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk-layer-shell
|
||||
glib-networking
|
||||
shared-mime-info
|
||||
gnome.adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
gsettings-desktop-schemas
|
||||
libxkbcommon
|
||||
openssl
|
||||
];
|
||||
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 ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook3
|
||||
gobject-introspection
|
||||
];
|
||||
propagatedBuildInputs = [ gtk3 ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
gtk3
|
||||
];
|
||||
runtimeDeps = [ luajitPackages.lgi ];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
buildNoDefaultFeatures = features != [ ];
|
||||
buildFeatures = features;
|
||||
|
||||
gappsWrapperArgs =
|
||||
''
|
||||
# Thumbnailers
|
||||
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
||||
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
||||
@@ -66,6 +79,15 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
# gtk-launch
|
||||
--suffix PATH : "${lib.makeBinPath [ gtk3 ]}"
|
||||
''
|
||||
+ 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}
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -74,7 +96,11 @@ rustPlatform.buildRustPackage rec {
|
||||
description = "Customizable gtk-layer-shell wlroots/sway bar written in Rust";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ yavko donovanglover jakestanger ];
|
||||
maintainers = with maintainers; [
|
||||
yavko
|
||||
donovanglover
|
||||
jakestanger
|
||||
];
|
||||
mainProgram = "ironbar";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user