Skip to content

Commit

Permalink
Merge pull request #167956 from cdepillabout/haskell-bignum-dont-lose…
Browse files Browse the repository at this point in the history
…-overrides

haskell: don't lose packageOverrides for native-bignum and integer-simple
  • Loading branch information
sternenseemann authored Apr 12, 2022
2 parents 51131f7 + 1be5cae commit 88d8a0f
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions pkgs/top-level/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -245,29 +245,36 @@ in {

# The integer-simple attribute set contains package sets for all the GHC compilers
# using integer-simple instead of integer-gmp.
integer-simple = let
integerSimpleGhcNames = pkgs.lib.filter
(name: ! builtins.elem name integerSimpleExcludes)
(pkgs.lib.attrNames packages);
in pkgs.lib.genAttrs integerSimpleGhcNames (name: packages.${name}.override {
ghc = bh.compiler.integer-simple.${name};
buildHaskellPackages = bh.packages.integer-simple.${name};
overrides = _self : _super : {
integer-simple = null;
integer-gmp = null;
};
});
integer-simple =
let
integerSimpleGhcNames = pkgs.lib.filter
(name: ! builtins.elem name integerSimpleExcludes)
(pkgs.lib.attrNames packages);
in
pkgs.lib.genAttrs integerSimpleGhcNames
(name:
packages.${name}.override (oldAttrs: {
ghc = bh.compiler.integer-simple.${name};
buildHaskellPackages = bh.packages.integer-simple.${name};
overrides =
pkgs.lib.composeExtensions
(oldAttrs.overrides or (_: _: {}))
(_: _: { integer-simple = null; });
})
);

native-bignum = let
nativeBignumGhcNames = pkgs.lib.filter
(name: builtins.elem name nativeBignumIncludes)
(pkgs.lib.attrNames compiler);
in pkgs.lib.genAttrs nativeBignumGhcNames (name: packages.${name}.override {
ghc = bh.compiler.native-bignum.${name};
buildHaskellPackages = bh.packages.native-bignum.${name};
overrides = _self : _super : {
integer-gmp = null;
};
});
native-bignum =
let
nativeBignumGhcNames = pkgs.lib.filter
(name: builtins.elem name nativeBignumIncludes)
(pkgs.lib.attrNames compiler);
in
pkgs.lib.genAttrs nativeBignumGhcNames
(name:
packages.${name}.override {
ghc = bh.compiler.native-bignum.${name};
buildHaskellPackages = bh.packages.native-bignum.${name};
}
);
};
}

0 comments on commit 88d8a0f

Please sign in to comment.