From 3736dc4cf4fecfdbcdbfdf971d79e9954b6c4a18 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 2 Dec 2019 17:20:02 -0500 Subject: [PATCH 1/4] Add busybox-sandbox-shell override Weird issue happens when combining cross overlays and pkgsStatic together. Some issue when combining the two together. This was introduced in https://github.com/NixOS/nixpkgs/commit/39769df9dfa63263850e9c4f6f771873b89198b5. /cc @ericson2314 --- default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/default.nix b/default.nix index d154f37..a28bac5 100644 --- a/default.nix +++ b/default.nix @@ -24,6 +24,11 @@ ''; build-wasm-app = self.callPackage ./build-wasm-app.nix {}; + + # Issue happens when combining pkgsStatic & custom cross stdenv. + # We need to force a normal busybox here to avoid hitting a + # weird bootstrapping issue. + busybox-sandbox-shell = super.busybox-sandbox-shell.override { busybox = self.busybox; }; })] ++ overlays; }; nixpkgsCrossArgs = project.nixpkgsArgs // { From f317e2c11c9e7a976d6bf18b7e4de1004491bcbe Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 2 Dec 2019 16:19:12 -0500 Subject: [PATCH 2/4] build-wasm-app only works on wasm32 --- build-wasm-app.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/build-wasm-app.nix b/build-wasm-app.nix index 5bbc8f9..19c38a8 100644 --- a/build-wasm-app.nix +++ b/build-wasm-app.nix @@ -26,6 +26,7 @@ let in { ename, pkg, assets ? [], scripts ? [], styles ? [] }: runCommand "wasm-app-${ename}" { nativeBuildInputs = [ buildPackages.xorg.lndir buildPackages.binaryen ]; passthru = { inherit pkg; }; + meta.platforms = ["wasm32-unknown"]; } '' mkdir -p $out lndir ${buildPackages.webabi}/lib/node_modules/webabi/build $out From 02aaae7247af81d4a9ba55e6d5495cd56577dc2c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 2 Dec 2019 17:38:01 -0500 Subject: [PATCH 3/4] Allow unsupported system in nixpkgs config wasm32-unknown is not in , so we need to allow it manually. --- default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/default.nix b/default.nix index a28bac5..53c7188 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,7 @@ # weird bootstrapping issue. busybox-sandbox-shell = super.busybox-sandbox-shell.override { busybox = self.busybox; }; })] ++ overlays; + config = { allowUnsupportedSystem = true; }; }; nixpkgsCrossArgs = project.nixpkgsArgs // { stdenvStages = import ./cross.nix haskellProfiling; From aab736a06f303933b439147d02210ef1d53d164f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 2 Dec 2019 17:38:47 -0500 Subject: [PATCH 4/4] ghc863 -> ghc865 fixes eval --- release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.nix b/release.nix index 1e980f0..3c08a10 100644 --- a/release.nix +++ b/release.nix @@ -8,7 +8,7 @@ let inherit (pkgs) musl-cross; fib-example = pkgs.fib-example.pkg; hello-example = pkgs.hello-example.pkg; - inherit (pkgs.haskell.packages.integer-simple.ghc863) hello ghc; + inherit (pkgs.haskell.packages.integer-simple.ghc865) hello ghc; }; in { inherit (nixpkgs.llvmPackages_HEAD) llvm clang clang-unwrapped compiler-rt