Skip to content

WIP: Switch to ghc (js) 9.12 via nixpkgs #846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from
Draft
40 changes: 19 additions & 21 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,34 +117,31 @@ let iosSupport = system == "x86_64-darwin";
configureFlags = ["--enable-shared" "--enable-static"];
});
};
zlib = super.zlib.override (lib.optionalAttrs
(self.stdenv.hostPlatform != self.stdenv.buildPlatform)
{ static = true; shared = true; });
#zlib = super.zlib.override (lib.optionalAttrs
# (self.stdenv.hostPlatform != self.stdenv.buildPlatform)
# { static = true; shared = true; });
};

mobileGhcOverlay = import ./nixpkgs-overlays/mobile-ghc { inherit lib; };

allCabalHashesOverlay = import ./nixpkgs-overlays/all-cabal-hashes;

nixpkgsArgs = {
inherit system;
overlays = [
(import ./nixpkgs-overlays/ghc.nix { inherit lib; })
hackGetOverlay
bindHaskellOverlays
forceStaticLibs
splicesEval
mobileGhcOverlay
allCabalHashesOverlay
#allCabalHashesOverlay
(self: super: {

runtimeShellPackage = if (self.stdenv.hostPlatform.isGhcjs || self.stdenv.targetPlatform.isiOS)
then super.buildPackages.runtimeShellPackage
else super.runtimeShellPackage;

polkit = super.polkit.override {
gobject-introspection = super.gobject-introspection-unwrapped;
};
#polkit = super.polkit.override {
# gobject-introspection = super.gobject-introspection-unwrapped;
#};

darwin = super.darwin.overrideScope (dself: dsuper: {
ios-deploy = dsuper.ios-deploy.overrideAttrs (_: {
Expand All @@ -170,10 +167,6 @@ let iosSupport = system == "x86_64-darwin";
'';
});

libiconv = super.libiconv.overrideAttrs (old: lib.optionalAttrs (self.stdenv.hostPlatform.useAndroidPrebuilt or false) {
configureFlags = [ "--disable-shared" "--enable-static" ];
});

libffi = if (self.stdenv.hostPlatform.useAndroidPrebuilt or false) then super.libffi_3_3 else super.libffi;
})
] ++ nixpkgsOverlays;
Expand Down Expand Up @@ -306,7 +299,10 @@ let iosSupport = system == "x86_64-darwin";
})
]);
};
ghcjs = if __useNewerCompiler then ghcjs8_10 else ghcjs8_6;
ghcjs = ghcjs9_12;
ghcjs9_12 = (makeRecursivelyOverridable nixpkgs.pkgsCross.ghcjs.haskell.packages.ghc912).override {
overrides = nixpkgs.haskell.overlays.combined;
};
ghcjs8_6 = (makeRecursivelyOverridable (nixpkgsCross.ghcjs.haskell.packages.ghcjs86.override (old: {
ghc = old.ghc.override {
bootPkgs = old.ghc.bootPkgs // { happy = old.ghc.bootPkgs.happy_1_19_12; };
Expand All @@ -332,7 +328,10 @@ let iosSupport = system == "x86_64-darwin";
overrides = nixpkgsCross.wasm.haskell.overlays.combined;
});

ghc = if __useNewerCompiler then ghc8_10 else ghc8_6;
ghc = ghc9_12;
ghc9_12 = (makeRecursivelyOverridable nixpkgs.haskell.packages.ghc912).override {
overrides = nixpkgs.haskell.overlays.combined;
};
ghcHEAD = (makeRecursivelyOverridable nixpkgs.haskell.packages.ghcHEAD).override {
overrides = nixpkgs.haskell.overlays.combined;
};
Expand Down Expand Up @@ -549,19 +548,18 @@ in let this = rec {
# Tools that are useful for development under both ghc and ghcjs
generalDevTools' = { nativeHaskellPackages ? ghc }: {
inherit (nativeHaskellPackages)
haskell-language-server
Cabal
cabal-install
ghcid
hasktags
stylish-haskell # Recent stylish-haskell only builds with AMP in place
reflex-ghci
;
inherit (nixpkgs)
cabal-install
ghcid
cabal2nix
curl
nix-prefetch-scripts
nodejs
pkgconfig
pkg-config
closurecompiler
;
};
Expand Down
3 changes: 0 additions & 3 deletions haskell-overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ rec {

reflexPackages
profiling
untriaged

(optionalExtension enableExposeAllUnfoldings exposeAllUnfoldings)

Expand Down Expand Up @@ -118,8 +117,6 @@ rec {

combined-ghc = self: super: foldExtensions [
(self: super: {
hoogle = self.callHackage "hoogle" "5.0.18.3" {};
hpack = self.callHackage "hpack" "0.34.5" {};
})
(optionalExtension (versionWildcard [ 8 6 ] super.ghc.version) ghc-8_6)
(optionalExtension (lib.versionOlder "8.11" super.ghc.version) ghc-head)
Expand Down
Loading