Skip to content

Commit

Permalink
haskell.compiler: ghc923 -> ghc924
Browse files Browse the repository at this point in the history
  • Loading branch information
sternenseemann authored and j6carey committed Nov 8, 2023
1 parent 974e894 commit 69f4775
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 30 deletions.
2 changes: 1 addition & 1 deletion lib/options.nix
Expand Up @@ -121,7 +121,7 @@ rec {
Example:
mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.packages.ghc924.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 = { ... }; }
*/
Expand Down
4 changes: 2 additions & 2 deletions nixos/doc/manual/development/option-declarations.section.md
Expand Up @@ -127,14 +127,14 @@ lib.mkOption {
```nix
lib.mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskell.packages.ghc924.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.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = lib.literalExpression "pkgs.haskell.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])";
description = "The GHC package to use.";
}
```
Expand Down
Expand Up @@ -193,14 +193,14 @@ lib.mkOption {
<programlisting language="bash">
lib.mkPackageOption pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ];
example = &quot;pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = &quot;pkgs.haskell.packages.ghc924.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.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
example = lib.literalExpression &quot;pkgs.haskell.packages.ghc924.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
description = &quot;The GHC package to use.&quot;;
}
</programlisting>
Expand Down
Expand Up @@ -6,8 +6,6 @@
, xattr, autoSignDarwinBinariesHook
, bash

, autoreconfHook # GHC 9.2.3 tarballs don't have autoconf run on them

, libiconv ? null, ncurses
, glibcLocales ? null

Expand Down Expand Up @@ -176,12 +174,12 @@ assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;

stdenv.mkDerivation (rec {
version = "9.2.3";
version = "9.2.4";
pname = "${targetPrefix}ghc${variantSuffix}";

src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "50ecdc2bef013e518f9a62a15245d7db0e4409d737c43b1cea7306fd82e1669e";
sha256 = "15213888064a0ec4e7723d075f31b87a678ce0851773d58b44ef7aa3de996458";
};

enableParallelBuilding = true;
Expand Down Expand Up @@ -221,12 +219,7 @@ stdenv.mkDerivation (rec {
# LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
'' + ''
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"
'' + lib.optionalString (!stdenv.isDarwin) ''
Expand Down Expand Up @@ -291,7 +284,6 @@ 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) [
Expand Down
@@ -1,6 +1,6 @@
{ lib
, stdenv
, supportedGhcVersions ? [ "884" "8107" "902" "923" ]
, supportedGhcVersions ? [ "884" "8107" "902" "924" ]
, dynamic ? false
, haskellPackages
, haskell
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -14527,7 +14527,7 @@ with pkgs;
stdenv = clangStdenv;
};

jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc923.jacinda;
jacinda = haskell.lib.compose.justStaticExecutables haskell.packages.ghc924.jacinda;

janet = callPackage ../development/interpreters/janet {};

Expand Down
12 changes: 6 additions & 6 deletions pkgs/top-level/haskell-packages.nix
Expand Up @@ -15,14 +15,14 @@ let
"integer-simple"
"native-bignum"
"ghc902"
"ghc923"
"ghc924"
"ghc941"
"ghcHEAD"
];

nativeBignumIncludes = [
"ghc902"
"ghc923"
"ghc924"
"ghc941"
"ghcHEAD"
];
Expand Down Expand Up @@ -135,7 +135,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc923 = callPackage ../development/compilers/ghc/9.2.3.nix {
ghc924 = callPackage ../development/compilers/ghc/9.2.4.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
if stdenv.isAarch64 || stdenv.isAarch32 then
Expand Down Expand Up @@ -268,9 +268,9 @@ in {
ghc = bh.compiler.ghc902;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
ghc923 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc923;
ghc = bh.compiler.ghc923;
ghc924 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924;
ghc = bh.compiler.ghc924;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc941 = callPackage ../development/haskell-modules {
Expand Down
14 changes: 7 additions & 7 deletions pkgs/top-level/release-haskell.nix
Expand Up @@ -52,7 +52,7 @@ let
ghc884
ghc8107
ghc902
ghc923
ghc924
];

# packagePlatforms applied to `haskell.packages.*`
Expand Down Expand Up @@ -330,8 +330,8 @@ let
;
};

haskell.packages.native-bignum.ghc923 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc923)
haskell.packages.native-bignum.ghc924 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc924)
hello
lens
random
Expand Down Expand Up @@ -381,7 +381,7 @@ let
weeder = [
compilerNames.ghc8107
compilerNames.ghc902
compilerNames.ghc923
compilerNames.ghc924
];
purescript = [
compilerNames.ghc8107
Expand Down Expand Up @@ -458,11 +458,11 @@ let
jobs.pkgsMusl.haskell.compiler.ghc884
jobs.pkgsMusl.haskell.compiler.ghc8107
jobs.pkgsMusl.haskell.compiler.ghc902
jobs.pkgsMusl.haskell.compiler.ghc923
jobs.pkgsMusl.haskell.compiler.ghc924
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.ghc923
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc924
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};
Expand All @@ -478,7 +478,7 @@ let
};
constituents = accumulateDerivations [
jobs.pkgsStatic.haskellPackages
jobs.pkgsStatic.haskell.packages.native-bignum.ghc923
jobs.pkgsStatic.haskell.packages.native-bignum.ghc924
];
};
}
Expand Down

0 comments on commit 69f4775

Please sign in to comment.