add dependencies for saturn

phoen
Daniel Barlow 2022-04-26 23:01:30 +01:00
parent 423e303d95
commit 92d36e84c4
4 changed files with 59 additions and 1 deletions

View File

@ -1,5 +1,7 @@
{ stdenv { stdenv
, callPackage , callPackage
, fetchFromGitHub
, fennel , fennel
, gobject-introspection , gobject-introspection
, gtk3 , gtk3
@ -7,11 +9,38 @@
, lua5_3 , lua5_3
} : } :
let let
lua = lua5_3;
fennel_ = (fennel.override { lua = lua5_3; }); fennel_ = (fennel.override { lua = lua5_3; });
luaDbusProxy = callPackage ./lua-dbus-proxy.nix {
inherit (lua.pkgs) lgi buildLuaPackage;
inherit lua;
};
inifile = lua.pkgs.buildLuaPackage rec {
pname = "inifile";
name = "${pname}-${version}";
version = "1.0.2";
src = fetchFromGitHub {
owner = "bartbes";
repo = "inifile";
rev = "f0b41a8a927f3413310510121c5767021957a4e0";
sha256 = "1ry0q238vbp8wxwy4qp1aychh687lvbckcf647pmc03rwkakxm4r";
};
buildPhase = ":";
installPhase = ''
mkdir -p "$out/share/lua/${lua.luaversion}"
cp inifile.lua "$out/share/lua/${lua.luaversion}/"
'';
};
luaWithPackages = lua5_3.withPackages (ps: with ps; [ luaWithPackages = lua5_3.withPackages (ps: with ps; [
(toLuaModule fennel_) (toLuaModule fennel_)
inifile
luafilesystem
lgi lgi
luaposix luaposix
luaDbusProxy
penlight
]); ]);
kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; }; kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; };
in in

29
lua-dbus-proxy.nix Normal file
View File

@ -0,0 +1,29 @@
{ lua, lgi, buildLuaPackage, fetchFromGitHub }:
let
simpleName = "dbus_proxy";
in
# TODO: add busted and checkPhase?
buildLuaPackage rec {
version = "0.10.2";
pname = simpleName; # nixpkgs unstable needs this
name = "${pname}-${version}"; # nixpkgs 21.11 needs this
src = fetchFromGitHub {
owner = "stefano-m";
repo = "lua-${simpleName}";
rev = "v${version}";
sha256 = "0kl8ff1g1kpmslzzf53cbzfl1bmb5cb91w431hbz0z0vdrramh6l";
};
propagatedBuildInputs = [ lgi ];
buildPhase = ":";
installPhase = ''
mkdir -p "$out/share/lua/${lua.luaversion}"
cp -r src/${pname} "$out/share/lua/${lua.luaversion}/"
'';
}

1
rc.fnl
View File

@ -12,4 +12,5 @@
;(kiwmi:spawn "swaybg -c '#ff00ff'") ;(kiwmi:spawn "swaybg -c '#ff00ff'")
(kiwmi:spawn "lua -l fennelrun modeline.fnl") (kiwmi:spawn "lua -l fennelrun modeline.fnl")
(kiwmi:spawn "lua -l fennelrun saturn/main.fnl")
(kiwmi:spawn "foot") (kiwmi:spawn "foot")

View File

@ -14,7 +14,6 @@
((require :pl.import_into))) ((require :pl.import_into)))
(local dbus (require :dbus_proxy)) (local dbus (require :dbus_proxy))
(local inspect (require :inspect))
(local lfs (require :lfs)) (local lfs (require :lfs))
(local inifile (require :inifile)) (local inifile (require :inifile))
(local posix (require :posix)) (local posix (require :posix))