diff --git a/README.md b/README.md index 2483296..9dc7b34 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,24 @@ Audio for [Bend 2](https://github.com/bendlang/bend). ## Install -With [Bend](https://github.com/bendlang/bend) alone there is nothing to -install: import ezaudio by its hub name and `bend` fetches it from +ezaudio is built and checked on bend 2.0.34. + +With [Bend](https://github.com/bendlang/bend) alone there is no install +step: import ezaudio by its hub name and `bend` fetches it from [the hub](https://hub.bend-lang.com) into `~/.bend/lib` on the first run. -`0x05eb91b04a37c34a9abe2324661894f5` is ezaudio v0.2.9. +`emerging-ezaudio@0.4.0.0` is ezaudio v0.4.0: ``` -import 0x05eb91b04a37c34a9abe2324661894f5/main.bend as Au +import emerging-ezaudio@0.4.0.0/main.bend as Au ``` +That name resolves to `0xd2dab0fbc9db2e9ba3da65dae724eb41`. +To pin by content instead, import `0xd2dab0fbc9db2e9ba3da65dae724eb41/main.bend`. + +Use 0.4.0 or later. Versions before 0.4.0 on the hub carry no LICENSE +file, so the hub shows them under the default license in its terms, not +this repository's LICENSE. + Or with [ez](https://github.com/Emerging-Patterns/ez), which records the package in `ez.toml` (`ez init` makes one): @@ -33,7 +42,7 @@ the filterbank. `count`, `fill`, `trim`, and `concat` are the raw-frame helpers. Resampling is not in this version. ``` -import 0x05eb91b04a37c34a9abe2324661894f5/main.bend as Au +import emerging-ezaudio@0.4.0.0/main.bend as Au def main() -> U32: Au.rate(Au.clip(8000, 1, Au.s16(), [0, 1])) diff --git a/ez.lock.toml b/ez.lock.toml index d45c797..36a46c0 100644 --- a/ez.lock.toml +++ b/ez.lock.toml @@ -4,8 +4,8 @@ hub = "https://hub.bend-lang.com" [tools] [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "d5a67600a96ba423f2212bd661a30c1fba38eb55" -tag = "v1.9.0" +rev = "91efe4bbaad91953652794ad55be7b49c10a2eff" +tag = "v1.11.0" root = "." -narHash = "sha256-HmJ8J1xDshBdSWXIiEp48GZ9qHsm+bmpHw06ZWwcDVE=" +narHash = "sha256-0xjoxoByI8PKBrbFy4eYGbKQ3ZVscknZLKkWQroYAUI=" entry = "main.bend" diff --git a/ez.toml b/ez.toml index 2173a07..f7c741c 100644 --- a/ez.toml +++ b/ez.toml @@ -1,11 +1,11 @@ [package] name = "ezaudio" entry = "main.bend" - +[tools] [tools.bolt] git = "https://github.com/Emerging-Patterns/bolt" -rev = "d5a67600a96ba423f2212bd661a30c1fba38eb55" -tag = "v1.9.0" +rev = "91efe4bbaad91953652794ad55be7b49c10a2eff" +tag = "v1.11.0" root = "." -narHash = "sha256-HmJ8J1xDshBdSWXIiEp48GZ9qHsm+bmpHw06ZWwcDVE=" +narHash = "sha256-0xjoxoByI8PKBrbFy4eYGbKQ3ZVscknZLKkWQroYAUI=" entry = "main.bend" diff --git a/flake.lock b/flake.lock index 7d468b7..3b6393c 100644 --- a/flake.lock +++ b/flake.lock @@ -21,38 +21,21 @@ "type": "github" } }, - "bend_2": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1790482124, - "narHash": "sha256-Gv309ikt48M8cISbwSo6V0md2572iieIRiyl3noF1cA=", - "owner": "bendlang", - "repo": "bend", - "rev": "af569d4826913b2ce3557e9829ccad31fcf86f94", - "type": "github" - }, - "original": { - "owner": "bendlang", - "repo": "bend", - "rev": "af569d4826913b2ce3557e9829ccad31fcf86f94", - "type": "github" - } - }, "ez": { "inputs": { - "bend": "bend_2", + "bend": [ + "bend" + ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1790514265, - "narHash": "sha256-NrMlq4aruqBVCNsy9TZtcMayDn3HEhb1I8AyiE233Kw=", + "lastModified": 1790728722, + "narHash": "sha256-6SDNpCeAfR66xuSO8vkoBMZAQ24ZUyGYLc9GFadFYy8=", "owner": "Emerging-Patterns", "repo": "ez", - "rev": "f37f6d20dc144cd74bb0cd51f9ec4e6925826548", + "rev": "b5693ce28337e770b2c70c99d53d311cd044dc24", "type": "github" }, "original": { @@ -62,22 +45,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1790578696, - "narHash": "sha256-ZoxIApko70jCdbH3l20HWXOBaT2HZd87orzd2yJ9dVE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7a0f122f5090cf4c2ade2a13a0e229d4e19ba71f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1789921291, "narHash": "sha256-Ft/BRnIqw1MywFoXydKobjjWmDFgDdYtSpJliE8+yUw=", @@ -97,7 +64,7 @@ "inputs": { "bend": "bend", "ez": "ez", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 7209cd0..3b0a84c 100644 --- a/flake.nix +++ b/flake.nix @@ -8,13 +8,12 @@ url = "github:bendlang/bend/777ee0b55c485afdd7e68bd917b3d23a88d77371"; inputs.nixpkgs.follows = "nixpkgs"; }; - # ez and its bolt stay on the bend ez's own flake.lock records until ez - # releases on 2.0.34, so ez's inputs.bend is pinned, not followed. The - # package's own builds and its proofs (checks.proofs) run on 2.0.34. + # ez 1.3.0 runs on bend 2.0.34, so its bend follows this flake's bend: + # ez, `ez prove` and bolt all build on 2.0.34. inputs.ez = { url = "github:Emerging-Patterns/ez"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.bend.url = "github:bendlang/bend/af569d4826913b2ce3557e9829ccad31fcf86f94"; + inputs.bend.follows = "bend"; }; outputs = { self, nixpkgs, ... }@inputs: @@ -25,7 +24,7 @@ ez = inputs.ez.lib.${system}; ezBin = inputs.ez.packages.${system}.default; bend = inputs.bend.packages.${system}.default; - bolt = ez.toolPackage { name = "bolt"; src = self; wrapFlags = [ "--gpu" "off" ]; }; + bolt = ez.toolPackage { name = "bolt"; src = self; inherit bend; wrapFlags = [ "--gpu" "off" ]; }; bend-cc = ez.bend-cc; bench = import ./bench { @@ -42,21 +41,7 @@ apps.${system} = bench.apps; checks.${system} = { - # every PROOF.bend on this flake's bend: its first line must be - # ALL PROOFS CHECK. ez.mkProofs comes back when ez runs on 2.0.34. - proofs = pkgs.runCommand "ezaudio-proofs" { - nativeBuildInputs = [ bend ]; - BEND_LIB = ez.bendLib ./ez.lock.toml; - } '' - export HOME=$TMPDIR - cp -r ${self} src && chmod -R u+w src && cd src - for p in $(find . -name PROOF.bend -not -path './.ez/*' | sort); do - first=$(cd "$(dirname "$p")" && bend "$(basename "$p")" | head -n 1) - echo "$p: $first" - [ "$first" = "ALL PROOFS CHECK" ] || exit 1 - done - touch $out - ''; + proofs = ez.mkProofs { ez = ezBin; src = self; }; lint = ez.mkLint { src = self; }; } // bench.checks;