aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-10-20 13:44:26 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit4c8f79e165fbe099c445b747c0ab719b71211fa3 (patch)
treecf48f8cc989dc883cd3c7cb2362d6c87cd886939
parentuse testing module for lib/logic tests (diff)
downloadalive-4c8f79e165fbe099c445b747c0ab719b71211fa3.tar.gz
alive-4c8f79e165fbe099c445b747c0ab719b71211fa3.zip
update flake
-rw-r--r--flake.lock12
-rw-r--r--flake.nix389
2 files changed, 211 insertions, 190 deletions
diff --git a/flake.lock b/flake.lock
index 99357ae..d21d1ec 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
- "lastModified": 1619345332,
- "narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=",
+ "lastModified": 1659877975,
+ "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28",
+ "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1643805626,
- "narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=",
+ "lastModified": 1666198336,
+ "narHash": "sha256-VTrWD8Bb48h2pi57P1++LuvZIgum3gSLiRzZ/8q3rg0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "554d2d8aa25b6e583575459c297ec23750adb6cb",
+ "rev": "db25c4da285c5989b39e4ce13dea651a88b7a9d4",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 35779fe..f097ace 100644
--- a/flake.nix
+++ b/flake.nix
@@ -6,219 +6,239 @@
flake-utils.url = "github:numtide/flake-utils";
};
- outputs = { self, nixpkgs, flake-utils, ... } @ inputs:
- flake-utils.lib.eachDefaultSystem (system:
- with import nixpkgs { inherit system; };
- let
- mkDeps = { lua, luaPkgs }:
- let
- luarocks-build-cpp = luaPkgs.buildLuarocksPackage rec {
- pname = "luarocks-build-cpp";
- version = "0.2.0-1";
-
- knownRockspec = (pkgs.fetchurl {
- url = "mirror://luarocks/${pname}-${version}.rockspec";
- hash = "sha256-AzDZV9u6V71YNJFBfj3cR1COjFFWhGmsJkGsUMErSZs=";
- }).outPath;
-
- src = pkgs.fetchFromGitHub {
- owner = "osch";
- repo = pname;
- rev = "v0.2.0";
- hash = "sha256-PamppWdV3cQMDK+t2V09/cNRskGuRNeuyvUODmopLaQ=";
+ outputs = {
+ self,
+ nixpkgs,
+ flake-utils,
+ ...
+ } @ inputs:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ with import nixpkgs {inherit system;}; let
+ mkDeps = luaPkgs: let
+ luarocks-build-cpp = luaPkgs.buildLuarocksPackage rec {
+ pname = "luarocks-build-cpp";
+ version = "0.2.0-1";
+
+ knownRockspec =
+ (pkgs.fetchurl {
+ url = "mirror://luarocks/${pname}-${version}.rockspec";
+ hash = "sha256-AzDZV9u6V71YNJFBfj3cR1COjFFWhGmsJkGsUMErSZs=";
+ })
+ .outPath;
+
+ src = pkgs.fetchFromGitHub {
+ owner = "osch";
+ repo = pname;
+ rev = "v0.2.0";
+ hash = "sha256-PamppWdV3cQMDK+t2V09/cNRskGuRNeuyvUODmopLaQ=";
+ };
+ propagatedBuildInputs = [luaPkgs.lua];
+
+ meta = {
+ homepage = "https://github.com/osch/luarocks-build-cpp";
+ description = "A fork of built-in build system for C++ rocks";
+ license = lib.licenses.mit;
+ };
};
- propagatedBuildInputs = [ lua ];
- meta = {
- homepage = "https://github.com/osch/luarocks-build-cpp";
- description = "A fork of built-in build system for C++ rocks";
- license = lib.licenses.mit;
- };
- };
+ luarocks-fetch-gitrec = luaPkgs.buildLuarocksPackage rec {
+ pname = "luarocks-fetch-gitrec";
+ version = "0.2-2";
- luarocks-fetch-gitrec = luaPkgs.buildLuarocksPackage rec {
- pname = "luarocks-fetch-gitrec";
- version = "0.2-2";
-
- src = pkgs.fetchurl {
- url = "mirror://luarocks/${pname}-${version}.src.rock";
- hash = "sha256-Dp3bKIG4swrD4+1NNtRTgyj68Di2cSUlh1r7Z2Rkzn0=";
- };
- postUnpack = "sourceRoot=$sourceRoot/luarocks-fetch-gitrec-0.2";
+ src = pkgs.fetchurl {
+ url = "mirror://luarocks/${pname}-${version}.src.rock";
+ hash = "sha256-Dp3bKIG4swrD4+1NNtRTgyj68Di2cSUlh1r7Z2Rkzn0=";
+ };
+ postUnpack = "sourceRoot=$sourceRoot/luarocks-fetch-gitrec-0.2";
- propagatedBuildInputs = with pkgs; [ lua git ];
+ propagatedBuildInputs = with pkgs; [luaPkgs.lua git];
- meta = {
- homepage = "https://github.com/siffiejoe/luarocks-fetch-gitrec";
- description = "Lua binding to FLTK, the Fast Light ToolKit";
- license = lib.licenses.mit;
+ meta = {
+ homepage = "https://github.com/siffiejoe/luarocks-fetch-gitrec";
+ description = "Lua binding to FLTK, the Fast Light ToolKit";
+ license = lib.licenses.mit;
+ };
};
- };
- fltk4lua = luaPkgs.buildLuarocksPackage rec {
- pname = "fltk4lua";
- version = "0.2-1";
-
- src = pkgs.fetchurl {
- url = "mirror://luarocks/${pname}-${version}.src.rock";
- hash = "sha256-fD31FruqVriMecFcvSV4W7JRia38+bg7j3T5k5pFZec=";
+ fltk4lua = luaPkgs.buildLuarocksPackage rec {
+ pname = "fltk4lua";
+ version = "0.2-1";
+
+ src = pkgs.fetchurl {
+ url = "mirror://luarocks/${pname}-${version}.src.rock";
+ hash = "sha256-fD31FruqVriMecFcvSV4W7JRia38+bg7j3T5k5pFZec=";
+ };
+ postUnpack = "sourceRoot=$sourceRoot/lua-fltk4lua";
+ buildInputs = with pkgs; [fltk libjpeg];
+ propagatedBuildInputs = [luaPkgs.lua luarocks-build-cpp luarocks-fetch-gitrec];
+
+ meta = {
+ homepage = "https://github.com/siffiejoe/lua-fltk4lua";
+ description = "Lua binding to FLTK, the Fast Light ToolKit";
+ license = lib.licenses.mit;
+ };
};
- postUnpack = "sourceRoot=$sourceRoot/lua-fltk4lua";
- buildInputs = with pkgs; [ fltk libjpeg ];
- propagatedBuildInputs = [ lua luarocks-build-cpp luarocks-fetch-gitrec ];
- meta = {
- homepage = "https://github.com/siffiejoe/lua-fltk4lua";
- description = "Lua binding to FLTK, the Fast Light ToolKit";
- license = lib.licenses.mit;
- };
- };
+ losc = luaPkgs.buildLuarocksPackage rec {
+ pname = "losc";
+ version = "1.0.0-1";
- losc = luaPkgs.buildLuarocksPackage rec {
- pname = "losc";
- version = "1.0.0-1";
-
- src = pkgs.fetchurl {
- url = "mirror://luarocks/${pname}-${version}.src.rock";
- hash = "sha256-MArhj51V1awF5k2zToFYEXpS2c6o8bnNDn4wLhooHos=";
- };
- postUnpack = "sourceRoot=$sourceRoot/losc";
+ src = pkgs.fetchurl {
+ url = "mirror://luarocks/${pname}-${version}.src.rock";
+ hash = "sha256-MArhj51V1awF5k2zToFYEXpS2c6o8bnNDn4wLhooHos=";
+ };
+ postUnpack = "sourceRoot=$sourceRoot/losc";
- buildInputs = with pkgs; [ stdenv.cc.cc.lib ];
- propagatedBuildInputs = [ lua ];
+ buildInputs = with pkgs; [stdenv.cc.cc.lib];
+ propagatedBuildInputs = [luaPkgs.lua];
- meta = {
- homepage = "https://github.com/davidgranstrom/losc";
- description = "Open Sound Control (OSC) for lua/luajit with no external dependencies.";
- license = lib.licenses.mit;
+ meta = {
+ homepage = "https://github.com/davidgranstrom/losc";
+ description = "Open Sound Control (OSC) for lua/luajit with no external dependencies.";
+ license = lib.licenses.mit;
+ };
};
- };
-
- discount = luaPkgs.buildLuarocksPackage {
- pname = "discount";
- version = "0.4-1";
-
- knownRockspec = (pkgs.fetchurl {
- url = mirror://luarocks/discount-0.4-1.rockspec;
- hash = "sha256-7bIW6KKFNPGNiVB3m1DasIPI8znq7ZC2iBS5fCevglU=";
- }).outPath;
- src = pkgs.fetchurl {
- url = https://craigbarnes.gitlab.io/dist/lua-discount/lua-discount-0.4.tar.gz;
- hash = "sha256-NTHu3d5KidW3pKubNZp/AaiKyF3U+sYVVOsZkWXP3q0=";
+ discount = luaPkgs.buildLuarocksPackage {
+ pname = "discount";
+ version = "0.4-1";
+
+ knownRockspec =
+ (pkgs.fetchurl {
+ url = mirror://luarocks/discount-0.4-1.rockspec;
+ hash = "sha256-7bIW6KKFNPGNiVB3m1DasIPI8znq7ZC2iBS5fCevglU=";
+ })
+ .outPath;
+
+ src = pkgs.fetchurl {
+ url = https://craigbarnes.gitlab.io/dist/lua-discount/lua-discount-0.4.tar.gz;
+ hash = "sha256-NTHu3d5KidW3pKubNZp/AaiKyF3U+sYVVOsZkWXP3q0=";
+ };
+
+ buildInputs = [pkgs.discount];
+ propagatedBuildInputs = [luaPkgs.lua];
+
+ meta = {
+ homepage = "https://github.com/craigbarnes/lua-discount";
+ description = "Lua bindings for the Discount Markdown library";
+ license = lib.licenses.isc;
+ };
};
- buildInputs = [ pkgs.discount ];
- propagatedBuildInputs = [ lua ];
-
- meta = {
- homepage = "https://github.com/craigbarnes/lua-discount";
- description = "Lua bindings for the Discount Markdown library";
- license = lib.licenses.isc;
+ ldoc = luaPkgs.buildLuarocksPackage rec {
+ pname = "ldoc";
+ version = "scm-2";
+
+ knownRockspec =
+ (pkgs.fetchurl {
+ url = "mirror://luarocks/${pname}-${version}.rockspec";
+ hash = "sha256-PHQhpQPfmlPhwIXoce5WZ+eoARmSecy1ac7Bfu4zg38=";
+ })
+ .outPath;
+
+ src = pkgs.fetchFromGitHub {
+ owner = "s-ol";
+ repo = "LDoc";
+ rev = "moonscript";
+ hash = "sha256-3jieGp9++cWtLMKccP+xqrtdCiNG/9BYZlHmH1l8XV8=";
+ };
+ propagatedBuildInputs = with luaPkgs; [
+ lua
+ penlight
+ markdown
+ ];
+
+ meta = {
+ homepage = "https://github.com/s-ol/LDoc";
+ description = "A Lua Documentation Tool";
+ license = lib.licenses.mit;
+ };
};
- };
-
- ldoc = luaPkgs.buildLuarocksPackage rec {
- pname = "ldoc";
- version = "scm-2";
- knownRockspec = (pkgs.fetchurl {
- url = "mirror://luarocks/${pname}-${version}.rockspec";
- hash = "sha256-PHQhpQPfmlPhwIXoce5WZ+eoARmSecy1ac7Bfu4zg38=";
- }).outPath;
-
- src = pkgs.fetchFromGitHub {
- owner = "s-ol";
- repo = "LDoc";
- rev = "moonscript";
- hash = "sha256-3jieGp9++cWtLMKccP+xqrtdCiNG/9BYZlHmH1l8XV8=";
+ lua-rtmidi = luaPkgs.buildLuarocksPackage rec {
+ pname = "lua-rtmidi";
+ version = "1.0.0-1";
+
+ # src = pkgs.fetchurl {
+ # url = "mirror://luarocks/${pname}-${version}.src.rock";
+ # hash = "sha256-DmSfrQRX8oziH+vvwq3KIdvjTX7P4zeKc6NeTygoU3A=";
+ # };
+ src = pkgs.fetchFromGitHub {
+ owner = "s-ol";
+ repo = "lua-rtmidi";
+ rev = "v1.0.0";
+ hash = "sha256-DmSfrQRX8oziH+vvwq3KIdvjTX7P4zeKc6NeTygoU3A=";
+ };
+
+ buildInputs = with pkgs; [stdenv.cc.cc.lib];
+ propagatedBuildInputs = with pkgs; [luaPkgs.lua alsa-lib libjack2];
+
+ meta = {
+ homepage = "https://github.com/s-ol/lua-rtmidi";
+ description = "Lua bindings for RtMidi";
+ license = lib.licenses.bsd2;
+ };
};
- propagatedBuildInputs = with luaPkgs; [
- lua penlight markdown
- ];
-
- meta = {
- homepage = "https://github.com/s-ol/LDoc";
- description = "A Lua Documentation Tool";
- license = lib.licenses.mit;
+ in
+ with luaPkgs;
+ [
+ moonscript
+ lpeg
+ luafilesystem
+ luasocket
+ luasystem
+ fltk4lua
+ losc
+ busted
+ discount
+ lua-rtmidi
+ ]
+ ++ (
+ if lib.strings.versionAtLeast luaPkgs.lua.version "5.4"
+ then []
+ else [bit32 ldoc]
+ );
+ mkEnv = lua:
+ stdenv.mkDerivation {
+ name = "alive-env-${lua.name}";
+ src = self;
+
+ propagatedBuildInputs = [(lua.withPackages mkDeps)];
+
+ shellHook = ''
+ export LUA_PATH="?.lua;?/init.lua"
+ '';
};
- };
+ in rec {
+ packages.alive = lua53Packages.buildLuarocksPackage rec {
+ pname = "alive";
+ version = "scm-10";
- lua-rtmidi = luaPkgs.buildLuarocksPackage rec {
- pname = "lua-rtmidi";
- version = "1.0.0-1";
-
- # src = pkgs.fetchurl {
- # url = "mirror://luarocks/${pname}-${version}.src.rock";
- # hash = "sha256-DmSfrQRX8oziH+vvwq3KIdvjTX7P4zeKc6NeTygoU3A=";
- # };
- src = pkgs.fetchFromGitHub {
- owner = "s-ol";
- repo = "lua-rtmidi";
- rev = "v1.0.0";
- hash = "sha256-DmSfrQRX8oziH+vvwq3KIdvjTX7P4zeKc6NeTygoU3A=";
- };
+ src = ./.;
+ knownRockspec = ./dist/rocks/${pname}-${version}.rockspec;
- buildInputs = with pkgs; [ stdenv.cc.cc.lib ];
- propagatedBuildInputs = with pkgs; [ lua alsa-lib libjack2 ];
+ propagatedBuildInputs = [(pkgs.lua5_3.withPackages mkDeps)];
meta = {
- homepage = "https://github.com/s-ol/lua-rtmidi";
- description = "Lua bindings for RtMidi";
- license = lib.licenses.bsd2;
+ homepage = "https://alv.s-ol.nu";
+ description = "experimental livecoding environment with persistent expressions";
+ license = lib.licenses.gpl3;
};
};
- in
- with luaPkgs; [
- moonscript lpeg
- luafilesystem luasocket luasystem fltk4lua losc bit32
- ldoc busted discount
- lua-rtmidi
- ];
- in rec {
- packages.alive = lua53Packages.buildLuarocksPackage rec {
- pname = "alive";
- version = "scm-10";
-
- src = ./.;
- knownRockspec = ./dist/rocks/${pname}-${version}.rockspec;
-
- propagatedBuildInputs = with pkgs; [ lua5_3 ]
- ++ (mkDeps { lua = lua5_3; luaPkgs = lua53Packages; });
-
- 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;
+ defaultApp = {
+ type = "app";
+ program = "${defaultPackage}/bin/alv-fltk";
};
- devShells.luajit =
- let
- lua = pkgs.lua5_3;
- deps = (mkDeps { lua = lua; luaPkgs = pkgs.lua53Packages; });
- in stdenv.mkDerivation {
+ devShells.lua53 = mkEnv pkgs.lua5_3;
+ devShells.lua54 = mkEnv pkgs.lua5_4;
+ devShells.luajit = stdenv.mkDerivation {
name = "alive-env-luajit";
src = self;
- propagatedBuildInputs = [ (lua.withPackages (o: deps)) love_11 ] ++ deps;
+ propagatedBuildInputs = [(luajit.withPackages mkDeps) love_11];
shellHook = ''
source <(
@@ -227,7 +247,8 @@
)
'';
};
- devShell = devShells.lua53;
- }
+
+ devShell = devShells.lua53;
+ }
);
}