attempted to fix the herc part of the flake
This commit is contained in:
parent
84f0cfd3b0
commit
94d57491bd
42
flake.nix
42
flake.nix
|
@ -34,24 +34,30 @@
|
|||
system = "wasm32-wasi";
|
||||
useLLVM = true;
|
||||
};
|
||||
overlays = [
|
||||
cargo2nix.overlays.default
|
||||
(final: prev: {
|
||||
# set the node version here
|
||||
nodejs = prev.nodejs-18_x;
|
||||
# The override is the only way to get it into mkYarnModules
|
||||
})
|
||||
];
|
||||
overlays = [
|
||||
cargo2nix.overlays.default
|
||||
(final: prev: {
|
||||
# set the node version here
|
||||
nodejs = prev.nodejs-18_x;
|
||||
# The override is the only way to get it into mkYarnModules
|
||||
})
|
||||
];
|
||||
|
||||
commonFn = pkgs: {
|
||||
buildInputs = with pkgs; [ nodejs yarn ];
|
||||
prettier = with pkgs.nodePackages; [ prettier ];
|
||||
which = [ pkgs.which ];
|
||||
};
|
||||
naerskFn = { pkgs, rust, ... }: pkgs.callPackage naersk { cargo = rust; rustc = rust; };
|
||||
naerskFn = { pkgs, rust, ... }:
|
||||
pkgs.callPackage naersk {
|
||||
cargo = rust;
|
||||
rustc = rust;
|
||||
};
|
||||
gentypeOutputFn = pkgs: gentype.outputs.packages.${pkgs.system}.default;
|
||||
mcFn = { pkgs, wasmPkgs, ... }:
|
||||
import ./nix/squiggle-mc.nix { inherit pkgs wasmPkgs commonFn naerskFn; };
|
||||
import ./nix/squiggle-mc.nix {
|
||||
inherit pkgs wasmPkgs commonFn naerskFn;
|
||||
};
|
||||
langFn = { pkgs, ... }:
|
||||
import ./nix/squiggle-lang.nix {
|
||||
inherit pkgs commonFn mcFn gentypeOutputFn;
|
||||
|
@ -105,9 +111,16 @@
|
|||
herc = let
|
||||
hciSystem = "x86_64-linux";
|
||||
hciPkgs = import nixpkgs { system = hciSystem; };
|
||||
hciPkgsWasm = import nixpkgs { system = hciSystem; crossSystem = crossSystemForWasmPkgs; overlays = overlays; };
|
||||
hciPkgsWasm = import nixpkgs {
|
||||
system = hciSystem;
|
||||
crossSystem = crossSystemForWasmPkgs;
|
||||
overlays = overlays;
|
||||
};
|
||||
effects = hercules-ci-effects.lib.withPkgs hciPkgs;
|
||||
mc = mcFn hciPkgs hciPkgsWasm;
|
||||
mc = mcFn {
|
||||
pkgs = hciPkgs;
|
||||
wasmPkgs = hciPkgsWasm;
|
||||
};
|
||||
lang = langFn hciPkgs;
|
||||
components = componentsFn hciPkgs;
|
||||
website = websiteFn hciPkgs;
|
||||
|
@ -151,5 +164,8 @@
|
|||
crossSystem = crossSystemForWasmPkgs;
|
||||
};
|
||||
|
||||
in localFlake { pkgs = pkgs; wasmPkgs = pkgsWasm; }) // herc;
|
||||
in localFlake {
|
||||
pkgs = pkgs;
|
||||
wasmPkgs = pkgsWasm;
|
||||
}) // herc;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,8 @@ rec {
|
|||
firefox-test = pkgs.stdenv.mkDerivation {
|
||||
name = "squiggle-mc-test";
|
||||
src = yarn-source + "/libexec/@quri/squiggle-mc/deps/@quri/squiggle-mc";
|
||||
buildInputs = common.buildInputs ++ (with pkgs; [ geckodriver cargo wasm-pack ]);
|
||||
buildInputs = common.buildInputs
|
||||
++ (with pkgs; [ geckodriver cargo wasm-pack ]);
|
||||
buildPhase = "yarn --offline test -- --firefox";
|
||||
installPhase = "mkdir -p $out";
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user