From 19b4b2147e2706e725b1e90cf31e990e04656c57 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 19 Mar 2024 13:17:22 +0000 Subject: [PATCH] Add luarocks-nix Add initial (not working yet) nix expression for scilua package --- home/prog/default.nix | 1 + home/prog/luarocks/scilua.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 home/prog/luarocks/scilua.nix diff --git a/home/prog/default.nix b/home/prog/default.nix index 72ebf225..61305601 100644 --- a/home/prog/default.nix +++ b/home/prog/default.nix @@ -6,6 +6,7 @@ # Lua lua + luarocks-nix lua-language-server stylua diff --git a/home/prog/luarocks/scilua.nix b/home/prog/luarocks/scilua.nix new file mode 100644 index 00000000..70108f82 --- /dev/null +++ b/home/prog/luarocks/scilua.nix @@ -0,0 +1,31 @@ +{ + buildLuarocksPackage, + fetchurl, + lua, + luaAtLeast, + luaOlder, + xsys, +}: +buildLuarocksPackage { + pname = "sci"; + version = "1.0.0.beta12-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/sci-1.0.0.beta12-1.rockspec"; + sha256 = "0lprn9x4zw767hdz8lyxmwrrfyn5xj3x50pm9b4qiwy8992mg00r"; + }) + .outPath; + src = fetchurl { + url = "https://github.com/stepelu/lua-sci/archive/v1.0.0-beta12.tar.gz"; + sha256 = "0a45r7n13gfqckpdp1bmizqvjadn8nc5d6ff9gjw860g3i75sy2h"; + }; + + disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [lua xsys]; + + meta = { + homepage = "https://github.com/stepelu/lua-sci"; + description = "Scientific Computing with LuaJIT"; + license.fullName = "MIT"; + }; +}