refactored shells nix code
This commit is contained in:
parent
37dfc49c58
commit
3f50cde0a6
9
.github/workflows/ci-cachix.yml
vendored
9
.github/workflows/ci-cachix.yml
vendored
|
@ -14,6 +14,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
flake-lints:
|
flake-lints:
|
||||||
|
name: All lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -38,6 +39,7 @@ jobs:
|
||||||
run: nix build .#vscode-lint
|
run: nix build .#vscode-lint
|
||||||
|
|
||||||
flake-packages:
|
flake-packages:
|
||||||
|
name: Builds, tests, and bundles
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: flake-lints
|
needs: flake-lints
|
||||||
steps:
|
steps:
|
||||||
|
@ -63,6 +65,7 @@ jobs:
|
||||||
run: nix build .#components-bundle
|
run: nix build .#components-bundle
|
||||||
|
|
||||||
flake-devshells:
|
flake-devshells:
|
||||||
|
name: Development shell environment
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -76,5 +79,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: quantified-uncertainty
|
name: quantified-uncertainty
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
- name: Build devshell
|
- name: Build js devshell
|
||||||
run: nix develop -c echo "built devshell"
|
run: nix develop .#js -c echo "built js devshell"
|
||||||
|
- name: Build js & wasm devshell
|
||||||
|
run: nix develop -c echo "built js & wasm devshell"
|
||||||
|
|
|
@ -74,8 +74,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# developing
|
# developing
|
||||||
devShells = flake-utils.lib.flattenTree {
|
devShells = let shellNix = import ./nix/shell.nix { inherit pkgs; };
|
||||||
default = (import ./nix/shell.nix { inherit pkgs; }).shell;
|
in flake-utils.lib.flattenTree {
|
||||||
|
default = shellNix.all;
|
||||||
|
js = shellNix.just-js;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in flake-utils.lib.eachDefaultSystem (system:
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
|
|
@ -1,21 +1,25 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
with pkgs; {
|
with pkgs;
|
||||||
shell = mkShell {
|
let
|
||||||
name = "SQUIGGLE_yarn-wasm-devshell";
|
js = [ yarn nodejs nodePackages.ts-node ];
|
||||||
buildInputs = [
|
rust = [
|
||||||
wasm-pack
|
wasm-pack
|
||||||
cargo
|
cargo
|
||||||
yarn
|
|
||||||
nodejs
|
|
||||||
nodePackages.ts-node
|
|
||||||
rustup
|
rustup
|
||||||
pkg-config
|
pkg-config
|
||||||
libressl
|
libressl
|
||||||
nixfmt
|
|
||||||
rustfmt
|
rustfmt
|
||||||
wasmtime
|
wasmtime
|
||||||
binaryen
|
binaryen
|
||||||
wasm-bindgen-cli
|
wasm-bindgen-cli
|
||||||
];
|
];
|
||||||
|
in {
|
||||||
|
all = mkShell {
|
||||||
|
name = "squiggle_yarn-wasm-devshell";
|
||||||
|
buildInputs = builtins.concatLists [ js rust [ nixfmt ] ];
|
||||||
|
};
|
||||||
|
just-js = mkShell {
|
||||||
|
name = "squiggle_yarn-devshell";
|
||||||
|
buildInputs = js ++ [ nixfmt ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user