haskell.compiler: ghc922 -> ghc923

https://www.haskell.org/ghc/download_ghc_9_2_3.html

Since the tarball is generated by Hadrian, neither autoreconf nor ./boot
is executed so ./configure and ghc.mk is missing.
This commit is contained in:
sternenseemann 2022-05-28 20:35:49 +02:00
parent 7dc61b9991
commit 90099ac5fa
8 changed files with 28 additions and 22 deletions

View File

@ -120,7 +120,7 @@ rec {
Example:
mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
=> { _type = "option"; default = «derivation /nix/store/jxx55cxsjrf8kyh3fp2ya17q99w7541r-ghc-8.10.7.drv»; defaultText = { ... }; description = "The GHC package to use."; example = { ... }; type = { ... }; }
*/

View File

@ -120,14 +120,14 @@ lib.mkOption {
```nix
lib.mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
# is like
lib.mkOption {
type = lib.types.package;
default = pkgs.ghc;
defaultText = lib.literalExpression "pkgs.ghc";
example = lib.literalExpression "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = lib.literalExpression "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
description = "The GHC package to use.";
}
```

View File

@ -183,14 +183,14 @@ lib.mkOption {
<programlisting language="bash">
lib.mkPackageOption pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ];
example = &quot;pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = &quot;pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
}
# is like
lib.mkOption {
type = lib.types.package;
default = pkgs.ghc;
defaultText = lib.literalExpression &quot;pkgs.ghc&quot;;
example = lib.literalExpression &quot;pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = lib.literalExpression &quot;pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
description = &quot;The GHC package to use.&quot;;
}
</programlisting>

View File

@ -6,6 +6,8 @@
, xattr, autoSignDarwinBinariesHook
, bash
, autoreconfHook # GHC 9.2.3 tarballs don't have autoconf run on them
, libiconv ? null, ncurses
, glibcLocales ? null
@ -171,12 +173,12 @@ assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
stdenv.mkDerivation (rec {
version = "9.2.2";
version = "9.2.3";
pname = "${targetPrefix}ghc${variantSuffix}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "902463a4cc6ee479af9358b9f8b2ee3237b03e934a1ea65b6d1fcf3e0d749ea6";
sha256 = "50ecdc2bef013e518f9a62a15245d7db0e4409d737c43b1cea7306fd82e1669e";
};
enableParallelBuilding = true;
@ -218,6 +220,9 @@ stdenv.mkDerivation (rec {
'' + ''
echo -n "${buildMK}" > mk/build.mk
# GHC 9.2.3 tarball is not properly prepared
./boot
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
@ -283,6 +288,7 @@ stdenv.mkDerivation (rec {
dontAddExtraLibs = true;
nativeBuildInputs = [
autoreconfHook # GHC 9.2.3 tarball hasn't autoconf run on it
perl autoconf automake m4 python3
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [

View File

@ -1,6 +1,6 @@
{ lib
, stdenv
, supportedGhcVersions ? [ "884" "8107" "902" "922" ]
, supportedGhcVersions ? [ "884" "8107" "902" "923" ]
, dynamic ? false
, haskellPackages
, haskell
@ -8,7 +8,7 @@
#
# The recommended way to override this package is
#
# pkgs.haskell-language-server.override { supportedGhcVersions = [ "901" ]; }
# pkgs.haskell-language-server.override { supportedGhcVersions = [ "902" ]; }
#
# for example. Read more about this in the haskell-language-server section of the nixpkgs manual.
#

View File

@ -14281,7 +14281,7 @@ with pkgs;
stdenv = clangStdenv;
};
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc922.jacinda;
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc923.jacinda;
janet = callPackage ../development/interpreters/janet {};

View File

@ -13,13 +13,13 @@ let
"integer-simple"
"native-bignum"
"ghc902"
"ghc922"
"ghc923"
"ghcHEAD"
];
nativeBignumIncludes = [
"ghc902"
"ghc922"
"ghc923"
"ghcHEAD"
];
@ -121,7 +121,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc922 = callPackage ../development/compilers/ghc/9.2.2.nix {
ghc923 = callPackage ../development/compilers/ghc/9.2.3.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.isAarch64 || stdenv.isAarch32 then
@ -227,9 +227,9 @@ in {
ghc = bh.compiler.ghc902;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
ghc922 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc922;
ghc = bh.compiler.ghc922;
ghc923 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc923;
ghc = bh.compiler.ghc923;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghcHEAD = callPackage ../development/haskell-modules {

View File

@ -52,7 +52,7 @@ let
ghc884
ghc8107
ghc902
ghc922
ghc923
];
# packagePlatforms applied to `haskell.packages.*`
@ -329,8 +329,8 @@ let
;
};
haskell.packages.native-bignum.ghc922 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc922)
haskell.packages.native-bignum.ghc923 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc923)
hello
lens
random
@ -442,11 +442,11 @@ let
jobs.pkgsMusl.haskell.compiler.ghc884
jobs.pkgsMusl.haskell.compiler.ghc8107
jobs.pkgsMusl.haskell.compiler.ghc902
jobs.pkgsMusl.haskell.compiler.ghc922
jobs.pkgsMusl.haskell.compiler.ghc923
jobs.pkgsMusl.haskell.compiler.ghcHEAD
jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc922
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc923
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};
@ -462,7 +462,7 @@ let
};
constituents = accumulateDerivations [
jobs.pkgsStatic.haskellPackages
jobs.pkgsStatic.haskell.packages.native-bignum.ghc922
jobs.pkgsStatic.haskell.packages.native-bignum.ghc923
];
};
}