eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 92d36e84c4d200192ec13e3e061f215e4c3f9edf
parent 423e303d95c82b766841f1cc482496cab6e93894
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 26 Apr 2022 23:01:30 +0100

add dependencies for saturn

Diffstat:
Mdefault.nix | 29+++++++++++++++++++++++++++++
Alua-dbus-proxy.nix | 29+++++++++++++++++++++++++++++
Mrc.fnl | 1+
Msaturn/main.fnl | 1-
4 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/default.nix b/default.nix @@ -1,5 +1,7 @@ { stdenv , callPackage +, fetchFromGitHub + , fennel , gobject-introspection , gtk3 @@ -7,11 +9,38 @@ , lua5_3 } : let + 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; [ (toLuaModule fennel_) + inifile + luafilesystem lgi luaposix + luaDbusProxy + penlight + ]); kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; }; in diff --git a/lua-dbus-proxy.nix b/lua-dbus-proxy.nix @@ -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}/" + ''; + +} diff --git a/rc.fnl b/rc.fnl @@ -12,4 +12,5 @@ ;(kiwmi:spawn "swaybg -c '#ff00ff'") (kiwmi:spawn "lua -l fennelrun modeline.fnl") +(kiwmi:spawn "lua -l fennelrun saturn/main.fnl") (kiwmi:spawn "foot") diff --git a/saturn/main.fnl b/saturn/main.fnl @@ -14,7 +14,6 @@ ((require :pl.import_into))) (local dbus (require :dbus_proxy)) -(local inspect (require :inspect)) (local lfs (require :lfs)) (local inifile (require :inifile)) (local posix (require :posix))