1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

build(nix): add luajit and lgi support

This commit is contained in:
Jake Stanger 2024-03-30 23:43:30 +00:00
parent 653d1d6aed
commit a62010ee4f
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
3 changed files with 34 additions and 3 deletions

View file

@ -106,9 +106,11 @@
program = "${pkgs.ironbar}/bin/ironbar"; program = "${pkgs.ironbar}/bin/ironbar";
}; };
}); });
devShells = genSystems (system: let devShells = genSystems (system: let
pkgs = pkgsFor system; pkgs = pkgsFor system;
rust = mkRustToolchain pkgs; rust = mkRustToolchain pkgs;
in { in {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
@ -128,11 +130,15 @@
gsettings-desktop-schemas gsettings-desktop-schemas
libxkbcommon libxkbcommon
libpulseaudio libpulseaudio
luajit
luajitPackages.lgi
]; ];
RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
}; };
}); });
homeManagerModules.default = { homeManagerModules.default = {
config, config,
lib, lib,

View file

@ -14,6 +14,8 @@
libxkbcommon, libxkbcommon,
libpulseaudio, libpulseaudio,
openssl, openssl,
luajit,
luajitPackages,
pkg-config, pkg-config,
hicolor-icon-theme, hicolor-icon-theme,
rustPlatform, rustPlatform,
@ -30,11 +32,28 @@
name = "ironbar"; name = "ironbar";
path = lib.cleanSource ../.; path = lib.cleanSource ../.;
}; };
nativeBuildInputs = [pkg-config wrapGAppsHook gobject-introspection]; nativeBuildInputs = [ pkg-config wrapGAppsHook gobject-introspection ];
buildInputs = [gtk3 gdk-pixbuf glib gtk-layer-shell glib-networking shared-mime-info gnome.adwaita-icon-theme hicolor-icon-theme gsettings-desktop-schemas libxkbcommon libpulseaudio openssl];
propagatedBuildInputs = [ buildInputs = [
gtk3 gtk3
gdk-pixbuf
glib
gtk-layer-shell
glib-networking
shared-mime-info
gnome.adwaita-icon-theme
hicolor-icon-theme
gsettings-desktop-schemas
libxkbcommon
libpulseaudio
openssl
luajit
]; ];
propagatedBuildInputs = [ gtk3 ];
lgi = luajitPackages.lgi;
preFixup = '' preFixup = ''
gappsWrapperArgs+=( gappsWrapperArgs+=(
# Thumbnailers # Thumbnailers
@ -45,6 +64,10 @@
# gtk-launch # gtk-launch
--suffix PATH : "${lib.makeBinPath [ gtk3 ]}" --suffix PATH : "${lib.makeBinPath [ gtk3 ]}"
# cairo
--prefix LUA_PATH : "./?.lua;${lgi}/share/lua/5.1/?.lua;${lgi}/share/lua/5.1/?/init.lua;${luajit}/share/lua/5.1/\?.lua;${luajit}/share/lua/5.1/?/init.lua"
--prefix LUA_CPATH : "./?.so;${lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
) )
''; '';
passthru = { passthru = {

View file

@ -10,6 +10,8 @@ pkgs.mkShell {
gcc gcc
openssl openssl
libpulseaudio libpulseaudio
luajit
luajitPackages.lgi
]; ];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [