-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
51 lines (47 loc) · 1.23 KB
/
flake.nix
File metadata and controls
51 lines (47 loc) · 1.23 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
40
41
42
43
44
45
46
47
48
49
50
51
{
description = "Flake for development workflows.";
inputs = {
rainix.url = "github:rainprotocol/rainix";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
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 {
inherit (rainix.devShells.${system}.default) shellHook;
packages = [
packages.test-wasm-build
packages.test-js-bindings
];
inputsFrom = [ rainix.devShells.${system}.default ];
};
}
);
}