diff --git a/flake.lock b/flake.lock index 30e4966..af14f1c 100644 --- a/flake.lock +++ b/flake.lock @@ -83,11 +83,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1770399320, - "narHash": "sha256-ZeYsgvxLG0peMQsmzPLvFjp0ZNVI9NuxZSG3dUQpZ7w=", + "lastModified": 1772218272, + "narHash": "sha256-58OxqvVmSo7y5GuLrt1ogU8tmGvGgtijmaurHPZMSBs=", "owner": "DeterminateSystems", "repo": "nix-src", - "rev": "c9f71f35b00972bec5af4fe6d3cf3980c66a2372", + "rev": "fe3515c2e42b95fb250c22549367285191fb9f5d", "type": "github" }, "original": { diff --git a/nix-wasm-plugin-fib/tests/fib.nix b/nix-wasm-plugin-fib/tests/fib.nix index a82cb10..3292aa3 100644 --- a/nix-wasm-plugin-fib/tests/fib.nix +++ b/nix-wasm-plugin-fib/tests/fib.nix @@ -1 +1 @@ -builtins.wasm "fib" 33 +builtins.wasm { path = ; function = "fib"; } 33 diff --git a/nix-wasm-plugin-grep/tests/grep.nix b/nix-wasm-plugin-grep/tests/grep.nix index 864f2d7..e9211cf 100644 --- a/nix-wasm-plugin-grep/tests/grep.nix +++ b/nix-wasm-plugin-grep/tests/grep.nix @@ -1,4 +1,4 @@ let - grep = builtins.wasm "grep"; + grep = builtins.wasm { path = ; function = "grep"; }; in map builtins.baseNameOf (grep { path = ../..; pattern = "hello 123"; inherit builtins; }) diff --git a/nix-wasm-plugin-ini/tests/test1.nix b/nix-wasm-plugin-ini/tests/test1.nix index 57299b4..3508977 100644 --- a/nix-wasm-plugin-ini/tests/test1.nix +++ b/nix-wasm-plugin-ini/tests/test1.nix @@ -1 +1 @@ -builtins.wasm "fromINI" (builtins.readFile ./test1.ini) +builtins.wasm { path = ; function = "fromINI"; } (builtins.readFile ./test1.ini) diff --git a/nix-wasm-plugin-mandelbrot/tests/test1.nix b/nix-wasm-plugin-mandelbrot/tests/test1.nix index 321009c..cb0e703 100644 --- a/nix-wasm-plugin-mandelbrot/tests/test1.nix +++ b/nix-wasm-plugin-mandelbrot/tests/test1.nix @@ -1 +1 @@ -builtins.wasm "mandelbrot" { width = 160; } \ No newline at end of file +builtins.wasm { path = ; function = "mandelbrot"; } { width = 160; } diff --git a/nix-wasm-plugin-test/tests/call.nix b/nix-wasm-plugin-test/tests/call.nix index 61ad7c6..858b2f9 100644 --- a/nix-wasm-plugin-test/tests/call.nix +++ b/nix-wasm-plugin-test/tests/call.nix @@ -1,8 +1,7 @@ let - wasm = builtins.wasm ; - strictMap = wasm "strictMap"; - range = wasm "range"; - sum = wasm "sum"; - double = wasm "double"; + strictMap = builtins.wasm { path = ; function = "strictMap"; }; + range = builtins.wasm { path = ; function = "range"; }; + sum = builtins.wasm { path = ; function = "sum"; }; + double = builtins.wasm { path = ; function = "double"; }; in sum (strictMap { list = range { start = 0; end = 100000; }; fun = double; }) diff --git a/nix-wasm-plugin-test/tests/lazy.nix b/nix-wasm-plugin-test/tests/lazy.nix index 8afb4e7..a29a294 100644 --- a/nix-wasm-plugin-test/tests/lazy.nix +++ b/nix-wasm-plugin-test/tests/lazy.nix @@ -1,5 +1,4 @@ let - wasm = builtins.wasm ; - lazyMap = wasm "lazyMap"; + lazyMap = builtins.wasm { path = ; function = "lazyMap"; }; in builtins.elemAt (lazyMap { fun = (x: x * 2); list = [1 2 3 (throw "foo")]; }) 2 diff --git a/nix-wasm-plugin-test/tests/pure.nix b/nix-wasm-plugin-test/tests/pure.nix index 3b98d89..3dc3673 100644 --- a/nix-wasm-plugin-test/tests/pure.nix +++ b/nix-wasm-plugin-test/tests/pure.nix @@ -1,5 +1,4 @@ let - wasm = builtins.wasm ; - counter = wasm "counter"; + counter = builtins.wasm { path = ; function = "counter"; }; in [ (counter "x") (counter "y") (counter "z") ] diff --git a/nix-wasm-plugin-yaml/tests/fromYAML.nix b/nix-wasm-plugin-yaml/tests/fromYAML.nix index 16e1366..98a55f1 100644 --- a/nix-wasm-plugin-yaml/tests/fromYAML.nix +++ b/nix-wasm-plugin-yaml/tests/fromYAML.nix @@ -1 +1 @@ -builtins.wasm "fromYAML" (builtins.readFile ./test1.yaml) +builtins.wasm { path = ; function = "fromYAML"; } (builtins.readFile ./test1.yaml) diff --git a/nix-wasm-plugin-yaml/tests/toYAML.nix b/nix-wasm-plugin-yaml/tests/toYAML.nix index 723038b..674f3d7 100644 --- a/nix-wasm-plugin-yaml/tests/toYAML.nix +++ b/nix-wasm-plugin-yaml/tests/toYAML.nix @@ -1,3 +1,3 @@ -builtins.wasm "toYAML" - (builtins.wasm "fromYAML" +builtins.wasm { path = ; function = "toYAML"; } + (builtins.wasm { path = ; function = "fromYAML"; } (builtins.readFile ./test1.yaml)) diff --git a/nix-wasm-plugin-yaml/tests/toYAML2.nix b/nix-wasm-plugin-yaml/tests/toYAML2.nix index 6f814bb..b9f8273 100644 --- a/nix-wasm-plugin-yaml/tests/toYAML2.nix +++ b/nix-wasm-plugin-yaml/tests/toYAML2.nix @@ -1 +1 @@ -builtins.wasm "toYAML" [{foo = 123; bar = null; xyzzy = "bla"; a.b.c = "abc";}] +builtins.wasm { path = ; function = "toYAML"; } [{foo = 123; bar = null; xyzzy = "bla"; a.b.c = "abc";}] diff --git a/wasi/flake.lock b/wasi/flake.lock index 0e3a605..8ea60bf 100644 --- a/wasi/flake.lock +++ b/wasi/flake.lock @@ -145,16 +145,15 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1771600547, - "narHash": "sha256-3Q/azBE+UgGYL3W5UE0nXCLxLo2MLiAG0NZi2vzG5mQ=", + "lastModified": 1772218272, + "narHash": "sha256-58OxqvVmSo7y5GuLrt1ogU8tmGvGgtijmaurHPZMSBs=", "owner": "DeterminateSystems", "repo": "nix-src", - "rev": "13061498efb05dd2895a88b966093b511272bf2d", + "rev": "fe3515c2e42b95fb250c22549367285191fb9f5d", "type": "github" }, "original": { "owner": "DeterminateSystems", - "ref": "eelcodolstra/nix-282-allow-wasm-plugins-to-use-wasi", "repo": "nix-src", "type": "github" } diff --git a/wasi/flake.nix b/wasi/flake.nix index 4fce2d9..28ec373 100644 --- a/wasi/flake.nix +++ b/wasi/flake.nix @@ -8,7 +8,6 @@ type = "github"; owner = "DeterminateSystems"; repo = "nix-src"; - ref = "eelcodolstra/nix-282-allow-wasm-plugins-to-use-wasi"; }; fenix = { url = "https://flakehub.com/f/nix-community/fenix/0.1.*.tar.gz"; @@ -92,7 +91,7 @@ } '' [[ $(nix eval --store dummy:// --offline --json --show-trace -I plugins=${self.packages.${system}.nix-wasi-plugins}/bin --impure --eval-cores 0 \ - --expr 'builtins.wasi 33') = 5702887 ]] + --expr 'builtins.wasm { path = ; } 33') = 5702887 ]] mkdir -p $out ''; });