From 6d2cfa967d7fc4e83811d412c8167a745aae51a2 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 30 Mar 2025 19:54:36 +0200 Subject: [PATCH] haskell.compiler.ghc967: init at 9.6.7 Release notes: https://downloads.haskell.org/ghc/9.6.7/docs/users_guide/9.6.7-notes.html Co-authored-by: sternenseemann --- pkgs/development/compilers/ghc/9.6.7.nix | 4 +++ .../compilers/ghc/common-hadrian.nix | 3 ++- .../tools/haskell/hadrian/hadrian.nix | 3 ++- pkgs/top-level/haskell-packages.nix | 27 +++++++++++++++++-- pkgs/top-level/release-haskell.nix | 1 + 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/compilers/ghc/9.6.7.nix diff --git a/pkgs/development/compilers/ghc/9.6.7.nix b/pkgs/development/compilers/ghc/9.6.7.nix new file mode 100644 index 000000000000..fd264451f4f3 --- /dev/null +++ b/pkgs/development/compilers/ghc/9.6.7.nix @@ -0,0 +1,4 @@ +import ./common-hadrian.nix { + version = "9.6.7"; + sha256 = "sha256-0FO/bOHViKdc/oyTFiaUhunY+4nc32/ZKDb6Lj32EwU="; +} diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index acf434177a2d..bf5f313c2065 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -173,13 +173,14 @@ in # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129 - lib.optionals (lib.versionOlder version "9.8") [ + lib.optionals (lib.versionOlder version "9.6.7") [ ./docs-sphinx-7.patch ] ++ lib.optional ( # 2025-01-16: unix >= 2.8.6.0 is unaffected which is shipped by GHC 9.12.1 and 9.8.4 lib.versionOlder version "9.11" + && !(lib.versionAtLeast version "9.6.7" && lib.versionOlder version "9.8") && !(lib.versionAtLeast version "9.8.4" && lib.versionOlder version "9.9") ) [ # Determine size of time related types using hsc2hs instead of assuming CLong. diff --git a/pkgs/development/tools/haskell/hadrian/hadrian.nix b/pkgs/development/tools/haskell/hadrian/hadrian.nix index 1b1dda74fd45..cdd511e1b66c 100644 --- a/pkgs/development/tools/haskell/hadrian/hadrian.nix +++ b/pkgs/development/tools/haskell/hadrian/hadrian.nix @@ -52,7 +52,8 @@ mkDerivation { # that only seems to affect Windows. We never build GHC natively on Windows. # https://gitlab.haskell.org/ghc/ghc/-/issues/24382 # https://gitlab.haskell.org/ghc/ghc/-/commit/a2c033cf82635c83f3107706634bebee43297b99 - (lib.versionAtLeast ghcVersion "9.12" && lib.versionOlder ghcVersion "9.15"); + (lib.versionAtLeast ghcVersion "9.6.7" && lib.versionOlder ghcVersion "9.7") + || (lib.versionAtLeast ghcVersion "9.12" && lib.versionOlder ghcVersion "9.15"); isLibrary = false; isExecutable = true; executableHaskellDepends = diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 3e5459fd00f4..c363055c4734 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -267,7 +267,25 @@ in buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; llvmPackages = pkgs.llvmPackages_15; }; - ghc96 = compiler.ghc966; + ghc967 = callPackage ../development/compilers/ghc/9.6.7.nix { + bootPkgs = + # For GHC 9.2 no armv7l bindists are available. + if stdenv.buildPlatform.isAarch32 then + bb.packages.ghc928 + else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then + bb.packages.ghc928 + else + bb.packages.ghc924Binary; + inherit (buildPackages.python3Packages) sphinx; + # Need to use apple's patched xattr until + # https://github.com/xattr/xattr/issues/44 and + # https://github.com/xattr/xattr/issues/55 are solved. + inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; + # Support range >= 11 && < 16 + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; + llvmPackages = pkgs.llvmPackages_15; + }; + ghc96 = compiler.ghc967; ghc981 = callPackage ../development/compilers/ghc/9.8.1.nix { bootPkgs = # For GHC 9.6 no armv7l bindists are available. @@ -527,7 +545,12 @@ in ghc = bh.compiler.ghc966; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { }; }; - ghc96 = packages.ghc966; + ghc967 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc967; + ghc = bh.compiler.ghc967; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { }; + }; + ghc96 = packages.ghc967; ghc981 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc981; ghc = bh.compiler.ghc981; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 7341ab72c9b5..a9b0f6ec82fe 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -72,6 +72,7 @@ let ghc964 ghc965 ghc966 + ghc967 ghc981 ghc982 ghc983