git.s-ol.nu alive / 149faf8
update rockspec, proper installable nix outputs s-ol 6 months ago
4 changed file(s) with 159 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
00 luarocks.lock
11 /*.alv
2 !/hello.alv
3 !/examples/*
2 result
100100 install = {
101101 lua = {
102102 $(list_modules alv)
103 ["alv.copilot.love.main"] = "alv/copilot/love/main.lua",
103104
104105 $(list_modules alv-lib)
105106 },
107108 "bin/alv",
108109 "bin/alv-wx",
109110 "bin/alv-fltk",
111 "bin/alv-love",
110112 },
111113 },
112114 }
0 package = "alive"
1 version = "scm-10"
2
3 source = {
4 url = "git://github.com/s-ol/alive.git",
5 }
6
7 description = {
8 summary = "Experimental livecoding environment with persistent expressions",
9 detailed = [[
10 This is an experimental livecoding language and environment, in which
11 expressions persist and update until they are removed from the source code, and
12 the interpreter keeps no state that you cannot manipulate directly in the
13 source. This yields a direct-manipulation like experience with a purely
14 text-based language and works without special editor support.]],
15 homepage = "https://alv.s-ol.nu",
16 license = "GPL-3",
17 }
18
19 dependencies = {
20 "lua",
21 "moonscript >= 0.5.0",
22 "lpeg",
23 "luafilesystem",
24 "luasystem",
25 "luasocket",
26 "losc",
27 }
28
29 build = {
30 type = "builtin",
31 modules = {},
32 copy_directories = { "docs" },
33 install = {
34 lua = {
35 ["alv.ast"] = "alv/ast.moon",
36 ["alv.base.builtin"] = "alv/base/builtin.moon",
37 ["alv.base.fndef"] = "alv/base/fndef.moon",
38 ["alv.base.init"] = "alv/base/init.moon",
39 ["alv.base.input"] = "alv/base/input.moon",
40 ["alv.base.match"] = "alv/base/match.moon",
41 ["alv.base.op"] = "alv/base/op.moon",
42 ["alv.base.pureop"] = "alv/base/pureop.moon",
43 ["alv.builtins"] = "alv/builtins.moon",
44 ["alv.cell"] = "alv/cell.moon",
45 ["alv.copilot.base"] = "alv/copilot/base.moon",
46 ["alv.copilot.cli"] = "alv/copilot/cli.moon",
47 ["alv.copilot.fltk"] = "alv/copilot/fltk.moon",
48 ["alv.copilot.love.init"] = "alv/copilot/love/init.moon",
49 ["alv.copilot.udp"] = "alv/copilot/udp.moon",
50 ["alv.copilot.wx"] = "alv/copilot/wx.moon",
51 ["alv.cycle"] = "alv/cycle.moon",
52 ["alv.dummy"] = "alv/dummy.moon",
53 ["alv.error"] = "alv/error.moon",
54 ["alv.init"] = "alv/init.moon",
55 ["alv.invoke"] = "alv/invoke.moon",
56 ["alv.logger"] = "alv/logger.moon",
57 ["alv.module"] = "alv/module.moon",
58 ["alv.parsing"] = "alv/parsing.moon",
59 ["alv.registry"] = "alv/registry.moon",
60 ["alv.result.base"] = "alv/result/base.moon",
61 ["alv.result.const"] = "alv/result/const.moon",
62 ["alv.result.evt"] = "alv/result/evt.moon",
63 ["alv.result.init"] = "alv/result/init.moon",
64 ["alv.result.sig"] = "alv/result/sig.moon",
65 ["alv.rtnode"] = "alv/rtnode.moon",
66 ["alv.scope"] = "alv/scope.moon",
67 ["alv.tag"] = "alv/tag.moon",
68 ["alv.type"] = "alv/type.moon",
69 ["alv.util"] = "alv/util.moon",
70 ["alv.version"] = "alv/version.moon",
71 ["alv.copilot.love.main"] = "alv/copilot/love/main.lua",
72
73 ["alv-lib._midi"] = "alv-lib/_midi.moon",
74 ["alv-lib._osc"] = "alv-lib/_osc.moon",
75 ["alv-lib.array-"] = "alv-lib/array-.moon",
76 ["alv-lib.logic"] = "alv-lib/logic.moon",
77 ["alv-lib.love"] = "alv-lib/love.moon",
78 ["alv-lib.mat4"] = "alv-lib/mat4.moon",
79 ["alv-lib.math-simple"] = "alv-lib/math-simple.moon",
80 ["alv-lib.math"] = "alv-lib/math.moon",
81 ["alv-lib.midi"] = "alv-lib/midi.moon",
82 ["alv-lib.osc"] = "alv-lib/osc.moon",
83 ["alv-lib.pilot"] = "alv-lib/pilot.moon",
84 ["alv-lib.random"] = "alv-lib/random.moon",
85 ["alv-lib.rhythm"] = "alv-lib/rhythm.moon",
86 ["alv-lib.sc"] = "alv-lib/sc.moon",
87 ["alv-lib.string"] = "alv-lib/string.moon",
88 ["alv-lib.struct-"] = "alv-lib/struct-.moon",
89 ["alv-lib.testing"] = "alv-lib/testing.moon",
90 ["alv-lib.time"] = "alv-lib/time.moon",
91 ["alv-lib.util"] = "alv-lib/util.moon",
92 ["alv-lib.vis"] = "alv-lib/vis.moon",
93 },
94 bin = {
95 "bin/alv",
96 "bin/alv-wx",
97 "bin/alv-fltk",
98 "bin/alv-love",
99 },
100 },
101 }
99 flake-utils.lib.eachDefaultSystem (system:
1010 with import nixpkgs { inherit system; };
1111 let
12 mkLua = { lua, luaPkgs }:
12 mkDeps = { lua, luaPkgs }:
1313 let
1414 luarocks-build-cpp = luaPkgs.buildLuarocksPackage rec {
1515 pname = "luarocks-build-cpp";
168168 };
169169 };
170170 in
171 (lua.withPackages (p: with p; [
171 with luaPkgs; [
172172 moonscript lpeg
173173 luafilesystem luasocket luasystem fltk4lua losc bit32
174174 ldoc busted discount
175175 lua-rtmidi
176 ]));
176 ];
177177 in rec {
178 packages.alive-env-lua53 = stdenv.mkDerivation {
179 name = "alive-env-lua53";
180 src = self;
181
182 nativeBuildInputs = with pkgs; [ (mkLua { lua = lua5_3; luaPkgs = lua53Packages; }) ];
183
184 shellHook = ''
185 export LUA_PATH="?.lua;?/init.lua"
186 '';
178 packages.alive = lua53Packages.buildLuarocksPackage rec {
179 pname = "alive";
180 version = "scm-10";
181
182 src = ./.;
183 knownRockspec = ./dist/rocks/${pname}-${version}.rockspec;
184
185 propagatedBuildInputs = with pkgs; [ lua5_3 ]
186 ++ (mkDeps { lua = lua5_3; luaPkgs = lua53Packages; });
187
188 meta = {
189 homepage = "https://github.com/s-ol/lua-rtmidi";
190 description = "Lua bindings for RtMidi";
191 license = lib.licenses.bsd2;
192 };
187193 };
188
189 packages.alive-env-luajit = stdenv.mkDerivation {
190 name = "alive-env-luajit";
191 src = self;
192
193 nativeBuildInputs = with pkgs; [
194 (mkLua { lua = luajit; luaPkgs = luajitPackages; })
195 love_11
196 ];
197
198 shellHook = ''
199 source <(
200 LUA_PATH="?.lua;?/init.lua" luajit -e \
201 "print(string.format('export LUA_PATH=%q; export LUA_CPATH=%q', package.path, package.cpath))"
202 )
203 '';
204 };
205
206 defaultPackage = packages.alive-env-luajit;
194 defaultPackage = packages.alive;
195 defaultApp = { type = "app"; program = "${defaultPackage}/bin/alv-fltk"; };
196
197 devShells.lua53 =
198 let
199 lua = pkgs.lua5_3;
200 deps = (mkDeps { lua = lua; luaPkgs = pkgs.lua53Packages; });
201 in stdenv.mkDerivation {
202 name = "alive-env-lua53";
203 src = self;
204
205 propagatedBuildInputs = [ (lua.withPackages (o: deps)) ] ++ deps;
206
207 shellHook = ''
208 export LUA_PATH="?.lua;?/init.lua"
209 '';
210 };
211
212 devShells.luajit =
213 let
214 lua = pkgs.lua5_3;
215 deps = (mkDeps { lua = lua; luaPkgs = pkgs.lua53Packages; });
216 in stdenv.mkDerivation {
217 name = "alive-env-luajit";
218 src = self;
219
220 propagatedBuildInputs = [ (lua.withPackages (o: deps)) love_11 ] ++ deps;
221
222 shellHook = ''
223 source <(
224 LUA_PATH="?.lua;?/init.lua" luajit -e \
225 "print(string.format('export LUA_PATH=%q; export LUA_CPATH=%q', package.path, package.cpath))"
226 )
227 '';
228 };
229 devShell = devShells.lua53;
207230 }
208231 );
209232 }