haskell{,Packages}: use recurseIntoAttrs (#437195)

This commit is contained in:
jopejoe1
2025-09-02 09:25:48 +00:00
committed by GitHub
parent 9e47491322
commit 99c050020c
4 changed files with 24 additions and 31 deletions
+2 -2
View File
@@ -5155,10 +5155,10 @@ with pkgs;
# Haskell and GHC
haskell = callPackage ./haskell-packages.nix { };
haskell = recurseIntoAttrs (callPackage ./haskell-packages.nix { });
haskellPackages =
dontRecurseIntoAttrs
recurseIntoAttrs
# Prefer native-bignum to avoid linking issues with gmp
# GHC 9.6 rts can't be built statically with hadrian, so we need to use 9.4
# until 9.8 is ready
+3 -2
View File
@@ -78,7 +78,7 @@ in
# `name: pkgs: pkgs.haskell.packages.${name}.ghc == pkgs.buildPackages.haskell.compiler.${name}.ghc`.
# This isn't problematic since pkgsBuildBuild.buildPackages is also build->build,
# just something to keep in mind.
compiler =
compiler = pkgs.lib.recurseIntoAttrs (
let
bb = pkgsBuildBuild.haskell;
in
@@ -496,7 +496,8 @@ in
name: compiler.${name}.override { enableNativeBignum = true; }
)
);
};
}
);
# Default overrides that are applied to all package sets.
packageOverrides = self: super: { };
-8
View File
@@ -13,19 +13,11 @@
inherit (super)
fusePackages
gns3Packages
haskellPackages
platformioPackages
rPackages
sourceHanPackages
;
# Make sure haskell.compiler is included, so alternative GHC versions show up,
# but don't add haskell.packages.* since they contain the same packages (at
# least by name) as haskellPackages.
haskell = super.haskell // {
compiler = recurseIntoAttrs super.haskell.compiler;
};
# emacsPackages is an alias for emacs.pkgs
# Re-introduce emacsPackages here so that emacs.pkgs can be searched.
emacsPackages = emacs.pkgs;
+19 -19
View File
@@ -359,27 +359,27 @@ let
if attrNamesOnly then id else release-lib.getPlatforms
);
packageJobs = packagePlatforms pkgs // {
haskell.compiler = packagePlatforms pkgs.haskell.compiler;
haskellPackages = packagePlatforms pkgs.haskellPackages;
# Build selected packages (HLS) for multiple Haskell compilers to rebuild
# the cache after a staging merge
haskell.packages =
genAttrs
[
# TODO: share this list between release.nix and release-haskell.nix
"ghc90"
"ghc92"
"ghc94"
"ghc96"
"ghc98"
"ghc910"
"ghc912"
]
(compilerName: {
inherit (packagePlatforms pkgs.haskell.packages.${compilerName})
haskell-language-server
;
});
haskell = packagePlatforms pkgs.haskell // {
packages =
genAttrs
[
# TODO: share this list between release.nix and release-haskell.nix
"ghc90"
"ghc92"
"ghc94"
"ghc96"
"ghc98"
"ghc910"
"ghc912"
]
(compilerName: {
inherit (packagePlatforms pkgs.haskell.packages.${compilerName})
haskell-language-server
;
});
};
pkgsLLVM.stdenv = [
"x86_64-linux"