Skip to content

Commit

Permalink
add flake
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Feb 12, 2024
1 parent c12aa89 commit 6d1902f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 84 deletions.
52 changes: 52 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
rainix.url = "github:rainprotocol/rainix";
};

outputs = { self, flake-utils, rainix }:

flake-utils.lib.eachDefaultSystem (system:
let
pkgs = rainix.pkgs.${system};
in rec {
packages = {
build = rainix.mkTask.${system} {
name = "build";
body = ''
set -euxo pipefail
npm install
'';
additionalBuildInputs = [
pkgs.wasm-bindgen-cli
rainix.rust-toolchain.${system}
rainix.rust-build-inputs.${system}
rainix.node-build-inputs.${system}
];
};

test = rainix.mkTask.${system} {
name = "test";
body = ''
set -euxo pipefail
npm test
'';
additionalBuildInputs = [
rainix.node-build-inputs.${system}
];
};
};

# For `nix develop`:
devShell = pkgs.mkShell {
nativeBuildInputs = [
rainix.rust-toolchain.${system}
rainix.rust-build-inputs.${system}
rainix.node-build-inputs.${system}
] ++ (with pkgs; [
wasm-bindgen-cli
]);
};
}
);
}
84 changes: 0 additions & 84 deletions shell.nix

This file was deleted.

0 comments on commit 6d1902f

Please sign in to comment.