-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
39 lines (35 loc) · 1.15 KB
/
flake.nix
File metadata and controls
39 lines (35 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
description = "Flake for development workflows.";
inputs = {
rainix.url = "github:rainprotocol/rainix";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, flake-utils, rainix }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = rainix.pkgs.${system};
in rec {
packages = rainix.packages.${system} // {
test-wasm-build = rainix.mkTask.${system} {
name = "test-wasm-build";
body = ''
set -euxo pipefail
cargo build -r --target wasm32-unknown-unknown --lib --workspace
'';
};
test-js-bindings = rainix.mkTask.${system} {
name = "test-js-bindings";
body = ''
set -euxo pipefail
npm install --no-check
npm run build
npm test
'';
};
};
devShells.default = pkgs.mkShell {
shellHook = rainix.devShells.${system}.default.shellHook;
packages = [ packages.test-wasm-build packages.test-js-bindings ];
inputsFrom = [ rainix.devShells.${system}.default ];
};
});
}