From 640cf550ee5fac82f3701af64fa57af3b271117a Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Sun, 12 May 2024 15:02:43 +1000 Subject: [PATCH] haskell.compiler.ghc910: init at 9.10.1 https://www.haskell.org/ghc/blog/20240510-ghc-9.10.1-released.html --- pkgs/development/compilers/ghc/9.10.1.nix | 4 +++ pkgs/top-level/haskell-packages.nix | 32 +++++++++++++++++++++++ pkgs/top-level/release-haskell.nix | 22 +++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/ghc/9.10.1.nix diff --git a/pkgs/development/compilers/ghc/9.10.1.nix b/pkgs/development/compilers/ghc/9.10.1.nix new file mode 100644 index 000000000000..7955661f50e1 --- /dev/null +++ b/pkgs/development/compilers/ghc/9.10.1.nix @@ -0,0 +1,4 @@ +import ./common-hadrian.nix rec { + version = "9.10.1"; + sha256 = "bf386a302d4ee054791ffd51748900f15d71760fd199157922d120cc1f89e2f7"; +} diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index ec050d743178..562c4d732824 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -360,6 +360,32 @@ in { llvmPackages = pkgs.llvmPackages_15; }; ghc98 = compiler.ghc982; + ghc9101 = callPackage ../development/compilers/ghc/9.10.1.nix { + bootPkgs = + # For GHC 9.6 no armv7l bindists are available. + if stdenv.hostPlatform.isAarch32 then + packages.ghc963 + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + packages.ghc963 + else if stdenv.hostPlatform.isDarwin then + # it seems like the GHC 9.6.* bindists are built with a different + # toolchain than we are using (which I'm guessing from the fact + # that 9.6.4 bindists pass linker flags our ld doesn't support). + # With both 9.6.3 and 9.6.4 binary it is impossible to link against + # the clock package (probably a hsc2hs problem). + packages.ghc963 + else + packages.ghc963Binary; + 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; + # 2023-01-15: Support range >= 11 && < 16 + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; + llvmPackages = pkgs.llvmPackages_15; + }; + ghc910 = compiler.ghc9101; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = # For GHC 9.6 no armv7l bindists are available. @@ -525,6 +551,12 @@ in { compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { }; }; ghc98 = packages.ghc982; + ghc9101 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc9101; + ghc = bh.compiler.ghc9101; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.10.x.nix { }; + }; + ghc910 = packages.ghc9101; ghcHEAD = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghcHEAD; ghc = bh.compiler.ghcHEAD; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 0706e5e5a09f..aa44d8370c1c 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -74,6 +74,7 @@ let ghc965 ghc981 ghc982 + ghc9101 ]; # packagePlatforms applied to `haskell.packages.*` @@ -503,22 +504,27 @@ let cabal-install = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; Cabal_3_10_3_0 = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; Cabal-syntax_3_10_3_0 = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; cabal2nix = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; cabal2nix-unstable = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; funcmp = released; haskell-language-server = lib.subtractLists [ @@ -526,25 +532,31 @@ let compilerNames.ghc8107 # Support ceased as of 2.5.0.0 compilerNames.ghc902 + # No support yet (2024-05-12) + compilerNames.ghc9101 ] released; hoogle = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; hlint = lib.subtractLists [ compilerNames.ghc902 compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; hpack = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; hsdns = released; jailbreak-cabal = released; language-nix = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; large-hashable = [ compilerNames.ghc928 @@ -553,6 +565,7 @@ let titlecase = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; ghc-api-compat = [ compilerNames.ghc8107 @@ -564,14 +577,17 @@ let ghc-lib = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; ghc-lib-parser = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; ghc-lib-parser-ex = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; ghc-source-gen = [ # Feel free to remove these as they break, @@ -588,11 +604,15 @@ let hashable = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; - primitive = released; + primitive = lib.subtractLists released [ + compilerNames.ghc9101 + ]; weeder = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982 + compilerNames.ghc9101 ] released; }) {