Skip to content

Commit 68a318b

Browse files
committed
wip
1 parent c30dc40 commit 68a318b

File tree

3 files changed

+3
-49
lines changed

3 files changed

+3
-49
lines changed

compiler/ghc-configure-src/default.nix

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ let self =
7474
, ghc-commit-id ? null
7575
, src-spec
7676
, ghc-patches ? []
77+
, hadrian
7778

7879
# extra values we want to have available as passthru values.
7980
, extra-passthru ? {}
@@ -236,54 +237,6 @@ let
236237
# value for us.
237238
installStage1 = useHadrian && (haskell-nix.haskellLib.isCrossTarget || stdenv.targetPlatform.isMusl);
238239

239-
hadrian =
240-
let
241-
compiler-nix-name =
242-
if builtins.compareVersions ghc-version "9.4.7" < 0
243-
then "ghc928"
244-
else "ghc962";
245-
in
246-
buildPackages.pinned-haskell-nix.tool compiler-nix-name "hadrian" {
247-
compilerSelection = p: p.haskell.compiler;
248-
index-state = buildPackages.haskell-nix.internalHackageIndexState;
249-
# Verions of hadrian that comes with 9.6 depends on `time`
250-
materialized =
251-
if builtins.compareVersions ghc-version "9.4" < 0
252-
then ../../materialized/${compiler-nix-name}/hadrian-ghc92
253-
else if builtins.compareVersions ghc-version "9.6" < 0
254-
then ../../materialized/${compiler-nix-name}/hadrian-ghc94
255-
else if builtins.compareVersions ghc-version "9.8" < 0
256-
then ../../materialized/${compiler-nix-name}/hadrian-ghc96
257-
else if builtins.compareVersions ghc-version "9.9" < 0
258-
then ../../materialized/${compiler-nix-name}/hadrian-ghc98
259-
else ../../materialized/${compiler-nix-name}/hadrian-ghc99;
260-
modules = [{
261-
# Apply the patches in a way that does not require using something
262-
# like `srcOnly`. The problem with `pkgs.srcOnly` was that it had to run
263-
# on a platform at eval time.
264-
packages.hadrian.prePatch = ''
265-
cd ..
266-
'';
267-
packages.hadrian.patches = ghc-patches;
268-
packages.hadrian.postPatch = ''
269-
cd hadrian
270-
'';
271-
}];
272-
cabalProjectLocal = null;
273-
cabalProjectFreeze = null;
274-
src = haskell-nix.haskellLib.cleanSourceWith {
275-
src = {
276-
outPath = buildPackages.srcOnly {
277-
name = "hadrian";
278-
inherit src;
279-
};
280-
filterPath = { path, ... }: path;
281-
};
282-
subDir = "hadrian";
283-
includeSiblings = true;
284-
};
285-
};
286-
287240
# For a discription of hadrian command line args
288241
# see https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md
289242
# For build flavours and flavour transformers

nix-tools/overlay.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
final: _prev:
22

33
let
4-
compiler-nix-name = "ghc8107";
4+
compiler-nix-name = "ghc982";
55

66
nix-tools = nix-tools-set {
77
materialized = ./materialized;

overlays/bootstrap.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ in {
3838
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
3939
sha256 = "sha256-4vt6fddGEjfSLoNlqD7dnhp30uFdBF85RTloRah3gck=";
4040
};
41+
hadrian = prevAttrs.hadrian;
4142
})).passthru.configured-src;
4243
};
4344
});

0 commit comments

Comments
 (0)