Skip to content

Commit

Permalink
Don't configure ghc-platform and ghc-toolchain for old GHC versions
Browse files Browse the repository at this point in the history
Both packages were added pretty recently.
  • Loading branch information
supersven committed Nov 26, 2023
1 parent bae5d29 commit 5116dbb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ghc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,15 @@ let
then
hspkgs.callCabal2nix "hadrian" hadrianCabal
(
let
guessedGhcSrcDir = dirOf (dirOf hadrianCabal);
in
rec {
ghc-platform = hspkgs.callCabal2nix "ghc-platform" (/. + guessedGhcSrcDir + "/libraries/ghc-platform") { };
ghc-toolchain = hspkgs.callCabal2nix "ghc-toolchain" (/. + guessedGhcSrcDir + "/utils/ghc-toolchain") { inherit ghc-platform; };
}
if lib.versionAtLeast version "9.9" then
let
guessedGhcSrcDir = dirOf (dirOf hadrianCabal);
in
rec {
ghc-platform = hspkgs.callCabal2nix "ghc-platform" (/. + guessedGhcSrcDir + "/libraries/ghc-platform") { };
ghc-toolchain = hspkgs.callCabal2nix "ghc-toolchain" (/. + guessedGhcSrcDir + "/utils/ghc-toolchain") { inherit ghc-platform; };
}
else {}
)
else
(hspkgs.mkDerivation {
Expand Down

0 comments on commit 5116dbb

Please sign in to comment.