aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-02-06 00:21:21 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit2f89cc2ded7afdac1b5c8f835eb713db23bb5c1f (patch)
treeb2635091f74c73801a2463223dc6fe56cc3b1a95
parentlib: update midi (diff)
downloadalive-2f89cc2ded7afdac1b5c8f835eb713db23bb5c1f.tar.gz
alive-2f89cc2ded7afdac1b5c8f835eb713db23bb5c1f.zip
update rockspec, proper installable nix outputs
-rw-r--r--.gitignore3
-rwxr-xr-xdist/release.sh2
-rw-r--r--dist/rocks/alive-scm-10.rockspec102
-rw-r--r--flake.nix77
4 files changed, 155 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore
index e4d64ec..e005590 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
luarocks.lock
/*.alv
-!/hello.alv
-!/examples/*
+result
diff --git a/dist/release.sh b/dist/release.sh
index 7cd40d3..265b383 100755
--- a/dist/release.sh
+++ b/dist/release.sh
@@ -101,6 +101,7 @@ build = {
install = {
lua = {
$(list_modules alv)
+ ["alv.copilot.love.main"] = "alv/copilot/love/main.lua",
$(list_modules alv-lib)
},
@@ -108,6 +109,7 @@ $(list_modules alv-lib)
"bin/alv",
"bin/alv-wx",
"bin/alv-fltk",
+ "bin/alv-love",
},
},
}
diff --git a/dist/rocks/alive-scm-10.rockspec b/dist/rocks/alive-scm-10.rockspec
new file mode 100644
index 0000000..b143d06
--- /dev/null
+++ b/dist/rocks/alive-scm-10.rockspec
@@ -0,0 +1,102 @@
+package = "alive"
+version = "scm-10"
+
+source = {
+ url = "git://github.com/s-ol/alive.git",
+}
+
+description = {
+ summary = "Experimental livecoding environment with persistent expressions",
+ detailed = [[
+This is an experimental livecoding language and environment, in which
+expressions persist and update until they are removed from the source code, and
+the interpreter keeps no state that you cannot manipulate directly in the
+source. This yields a direct-manipulation like experience with a purely
+text-based language and works without special editor support.]],
+ homepage = "https://alv.s-ol.nu",
+ license = "GPL-3",
+}
+
+dependencies = {
+ "lua",
+ "moonscript >= 0.5.0",
+ "lpeg",
+ "luafilesystem",
+ "luasystem",
+ "luasocket",
+ "losc",
+}
+
+build = {
+ type = "builtin",
+ modules = {},
+ copy_directories = { "docs" },
+ install = {
+ lua = {
+ ["alv.ast"] = "alv/ast.moon",
+ ["alv.base.builtin"] = "alv/base/builtin.moon",
+ ["alv.base.fndef"] = "alv/base/fndef.moon",
+ ["alv.base.init"] = "alv/base/init.moon",
+ ["alv.base.input"] = "alv/base/input.moon",
+ ["alv.base.match"] = "alv/base/match.moon",
+ ["alv.base.op"] = "alv/base/op.moon",
+ ["alv.base.pureop"] = "alv/base/pureop.moon",
+ ["alv.builtins"] = "alv/builtins.moon",
+ ["alv.cell"] = "alv/cell.moon",
+ ["alv.copilot.base"] = "alv/copilot/base.moon",
+ ["alv.copilot.cli"] = "alv/copilot/cli.moon",
+ ["alv.copilot.fltk"] = "alv/copilot/fltk.moon",
+ ["alv.copilot.love.init"] = "alv/copilot/love/init.moon",
+ ["alv.copilot.udp"] = "alv/copilot/udp.moon",
+ ["alv.copilot.wx"] = "alv/copilot/wx.moon",
+ ["alv.cycle"] = "alv/cycle.moon",
+ ["alv.dummy"] = "alv/dummy.moon",
+ ["alv.error"] = "alv/error.moon",
+ ["alv.init"] = "alv/init.moon",
+ ["alv.invoke"] = "alv/invoke.moon",
+ ["alv.logger"] = "alv/logger.moon",
+ ["alv.module"] = "alv/module.moon",
+ ["alv.parsing"] = "alv/parsing.moon",
+ ["alv.registry"] = "alv/registry.moon",
+ ["alv.result.base"] = "alv/result/base.moon",
+ ["alv.result.const"] = "alv/result/const.moon",
+ ["alv.result.evt"] = "alv/result/evt.moon",
+ ["alv.result.init"] = "alv/result/init.moon",
+ ["alv.result.sig"] = "alv/result/sig.moon",
+ ["alv.rtnode"] = "alv/rtnode.moon",
+ ["alv.scope"] = "alv/scope.moon",
+ ["alv.tag"] = "alv/tag.moon",
+ ["alv.type"] = "alv/type.moon",
+ ["alv.util"] = "alv/util.moon",
+ ["alv.version"] = "alv/version.moon",
+ ["alv.copilot.love.main"] = "alv/copilot/love/main.lua",
+
+ ["alv-lib._midi"] = "alv-lib/_midi.moon",
+ ["alv-lib._osc"] = "alv-lib/_osc.moon",
+ ["alv-lib.array-"] = "alv-lib/array-.moon",
+ ["alv-lib.logic"] = "alv-lib/logic.moon",
+ ["alv-lib.love"] = "alv-lib/love.moon",
+ ["alv-lib.mat4"] = "alv-lib/mat4.moon",
+ ["alv-lib.math-simple"] = "alv-lib/math-simple.moon",
+ ["alv-lib.math"] = "alv-lib/math.moon",
+ ["alv-lib.midi"] = "alv-lib/midi.moon",
+ ["alv-lib.osc"] = "alv-lib/osc.moon",
+ ["alv-lib.pilot"] = "alv-lib/pilot.moon",
+ ["alv-lib.random"] = "alv-lib/random.moon",
+ ["alv-lib.rhythm"] = "alv-lib/rhythm.moon",
+ ["alv-lib.sc"] = "alv-lib/sc.moon",
+ ["alv-lib.string"] = "alv-lib/string.moon",
+ ["alv-lib.struct-"] = "alv-lib/struct-.moon",
+ ["alv-lib.testing"] = "alv-lib/testing.moon",
+ ["alv-lib.time"] = "alv-lib/time.moon",
+ ["alv-lib.util"] = "alv-lib/util.moon",
+ ["alv-lib.vis"] = "alv-lib/vis.moon",
+ },
+ bin = {
+ "bin/alv",
+ "bin/alv-wx",
+ "bin/alv-fltk",
+ "bin/alv-love",
+ },
+ },
+}
diff --git a/flake.nix b/flake.nix
index c2a3de8..35779fe 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,7 +10,7 @@
flake-utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; };
let
- mkLua = { lua, luaPkgs }:
+ mkDeps = { lua, luaPkgs }:
let
luarocks-build-cpp = luaPkgs.buildLuarocksPackage rec {
pname = "luarocks-build-cpp";
@@ -169,42 +169,65 @@
};
};
in
- (lua.withPackages (p: with p; [
+ with luaPkgs; [
moonscript lpeg
luafilesystem luasocket luasystem fltk4lua losc bit32
ldoc busted discount
lua-rtmidi
- ]));
+ ];
in rec {
- packages.alive-env-lua53 = stdenv.mkDerivation {
- name = "alive-env-lua53";
- src = self;
-
- nativeBuildInputs = with pkgs; [ (mkLua { lua = lua5_3; luaPkgs = lua53Packages; }) ];
-
- shellHook = ''
- export LUA_PATH="?.lua;?/init.lua"
- '';
- };
+ packages.alive = lua53Packages.buildLuarocksPackage rec {
+ pname = "alive";
+ version = "scm-10";
- packages.alive-env-luajit = stdenv.mkDerivation {
- name = "alive-env-luajit";
- src = self;
+ src = ./.;
+ knownRockspec = ./dist/rocks/${pname}-${version}.rockspec;
- nativeBuildInputs = with pkgs; [
- (mkLua { lua = luajit; luaPkgs = luajitPackages; })
- love_11
- ];
+ propagatedBuildInputs = with pkgs; [ lua5_3 ]
+ ++ (mkDeps { lua = lua5_3; luaPkgs = lua53Packages; });
- shellHook = ''
- source <(
- LUA_PATH="?.lua;?/init.lua" luajit -e \
- "print(string.format('export LUA_PATH=%q; export LUA_CPATH=%q', package.path, package.cpath))"
- )
- '';
+ meta = {
+ homepage = "https://github.com/s-ol/lua-rtmidi";
+ description = "Lua bindings for RtMidi";
+ license = lib.licenses.bsd2;
+ };
};
+ defaultPackage = packages.alive;
+ defaultApp = { type = "app"; program = "${defaultPackage}/bin/alv-fltk"; };
+
+ devShells.lua53 =
+ let
+ lua = pkgs.lua5_3;
+ deps = (mkDeps { lua = lua; luaPkgs = pkgs.lua53Packages; });
+ in stdenv.mkDerivation {
+ name = "alive-env-lua53";
+ src = self;
+
+ propagatedBuildInputs = [ (lua.withPackages (o: deps)) ] ++ deps;
+
+ shellHook = ''
+ export LUA_PATH="?.lua;?/init.lua"
+ '';
+ };
- defaultPackage = packages.alive-env-luajit;
+ devShells.luajit =
+ let
+ lua = pkgs.lua5_3;
+ deps = (mkDeps { lua = lua; luaPkgs = pkgs.lua53Packages; });
+ in stdenv.mkDerivation {
+ name = "alive-env-luajit";
+ src = self;
+
+ propagatedBuildInputs = [ (lua.withPackages (o: deps)) love_11 ] ++ deps;
+
+ shellHook = ''
+ source <(
+ LUA_PATH="?.lua;?/init.lua" luajit -e \
+ "print(string.format('export LUA_PATH=%q; export LUA_CPATH=%q', package.path, package.cpath))"
+ )
+ '';
+ };
+ devShell = devShells.lua53;
}
);
}