Skip to content

Commit

Permalink
ghc8102-plutus
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Sep 23, 2020
1 parent 79bcf44 commit 1842f8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ci.nix
Expand Up @@ -29,6 +29,7 @@
ghc884 = true;
ghc8101 = false;
ghc8102 = true;
ghc8102-plutus = true;
});
systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
# I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
Expand All @@ -39,7 +40,7 @@
# We need to use the actual nixpkgs version we're working with here, since the values
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (system == "x86_64-linux" && compiler-nix-name != "ghc8101" && compiler-nix-name != "ghc8102") {
in lib.optionalAttrs (system == "x86_64-linux" && compiler-nix-name != "ghc8101" && compiler-nix-name != "ghc8102" && compiler-nix-name != "ghc8102-plutus") {
# Windows cross compilation is currently broken on macOS
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (system == "x86_64-linux") {
Expand Down
27 changes: 21 additions & 6 deletions overlays/bootstrap.nix
Expand Up @@ -135,12 +135,6 @@ in {
++ final.lib.optional (versionAtLeast "8.6.4" && versionLessThan "8.8") ./patches/ghc/ghc-no-system-linker.patch

++ fromUntil "8.10.2" "8.12" ./patches/ghc/MR3714-backported-to-8.10.2.patch

++ fromUntil "8.8.3" "8.9" ./patches/ghc/ghc-8.8-ubxt.patch
++ fromUntil "8.10.1" "8.11" ./patches/ghc/ghc-8.10-ubxt.patch

++ fromUntil "8.10.2" "8.12" ./patches/ghc/core-field.patch
++ fromUntil "8.10.2" "8.12" ./patches/ghc/noinline-set-bit-if.patch
;
in ({
ghc844 = final.callPackage ../compiler/ghc {
Expand Down Expand Up @@ -371,6 +365,27 @@ in {

ghc-patches = ghc-patches "8.10.2";
};
# ghc 8.10.2 with patches needed by plutus
ghc8102-plutus = final.callPackage ../compiler/ghc {
extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8102; };

bootPkgs = bootPkgs // {
ghc = final.buildPackages.buildPackages.haskell-nix.compiler.ghc884;
};
inherit sphinx installDeps;

buildLlvmPackages = final.buildPackages.llvmPackages_9;
llvmPackages = final.llvmPackages_9;

src-spec = rec {
version = "8.10.2";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "02w8n085bw38vyp694j0lfk5wcnwkdaj7hhp0saj71x74533lmww";
};

ghc-patches = ghc-patches "8.10.2"
++ [ ./patches/ghc/ghc-8.10-ubxt.patch ];
};
} // final.lib.optionalAttrs (final.targetPlatform.isGhcjs or false)
# This will inject `exactDeps` and `envDeps` into the ghcjs
# compiler defined below. This is crucial to build packages
Expand Down

0 comments on commit 1842f8a

Please sign in to comment.