push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs
index 0b743788ec..a7ff841609 100644
--- a/hadrian/src/Settings/Default.hs
+++ b/hadrian/src/Settings/Default.hs
@@ -249,7 +249,7 @@ defaultExtraArgs =
defaultHaddockExtraArgs :: Args
defaultHaddockExtraArgs = builder (Haddock BuildPackage) ?
- mconcat [ arg "--hyperlinked-source", arg "--hoogle", arg "--quickjump" ]
+ mconcat [ arg "--hoogle", arg "--quickjump" ]
-- | Default source arguments, e.g. optimisation settings.

View File

@@ -0,0 +1,12 @@
diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs
index 902b2f85e2..429a441c3b 100644
--- a/hadrian/src/Settings/Builders/Haddock.hs
+++ b/hadrian/src/Settings/Builders/Haddock.hs
@@ -57,7 +57,6 @@ haddockBuilderArgs = mconcat
, arg $ "--odir=" ++ takeDirectory output
, arg $ "--dump-interface=" ++ output
, arg "--html"
- , arg "--hyperlinked-source"
, arg "--hoogle"
, arg "--quickjump"
, arg $ "--title=" ++ pkgName pkg ++ "-" ++ version

View File

@@ -0,0 +1,19 @@
{
mkDerivation,
base,
lib,
# GHC source tree to build ghc-toolchain from
ghcSrc,
ghcVersion,
}:
mkDerivation {
pname = "ghc-platform";
version = ghcVersion;
src = ghcSrc;
postUnpack = ''
sourceRoot="$sourceRoot/libraries/ghc-platform"
'';
libraryHaskellDepends = [ base ];
description = "Platform information used by GHC and friends";
license = lib.licenses.bsd3;
}

View File

@@ -0,0 +1,33 @@
{
mkDerivation,
base,
directory,
filepath,
ghc-platform,
lib,
process,
text,
transformers,
# GHC source tree to build ghc-toolchain from
ghcVersion,
ghcSrc,
}:
mkDerivation {
pname = "ghc-toolchain";
version = ghcVersion;
src = ghcSrc;
postUnpack = ''
sourceRoot="$sourceRoot/utils/ghc-toolchain"
'';
libraryHaskellDepends = [
base
directory
filepath
ghc-platform
process
text
transformers
];
description = "Utility for managing GHC target toolchains";
license = lib.licenses.bsd3;
}

View File

@@ -0,0 +1,97 @@
# See also ./make-hadrian.nix
{
mkDerivation,
base,
bytestring,
Cabal,
containers,
directory,
extra,
filepath,
lib,
mtl,
parsec,
shake,
text,
transformers,
unordered-containers,
cryptohash-sha256,
base16-bytestring,
writeText,
# Dependencies that are not on Hackage and only used in certain Hadrian versions
ghc-platform ? null,
ghc-toolchain ? null,
# GHC source tree to build hadrian from
ghcSrc,
ghcVersion,
# GHC we are using to bootstrap hadrian (stage0)
bootGhcVersion,
# Customization
userSettings ? null,
}:
mkDerivation {
pname = "hadrian";
version = ghcVersion;
src = ghcSrc;
postUnpack = ''
sourceRoot="$sourceRoot/hadrian"
'';
# Overwrite UserSettings.hs with a provided custom one
postPatch = lib.optionalString (userSettings != null) ''
install -m644 "${writeText "UserSettings.hs" userSettings}" src/UserSettings.hs
'';
configureFlags = [
# avoid QuickCheck dep which needs shared libs / TH
"-f-selftest"
# Building hadrian with -O1 takes quite some time with little benefit.
# Additionally we need to recompile it on every change of UserSettings.hs.
# See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1190
"-O0"
];
jailbreak =
# Ignore bound directory >= 1.3.9.0, unless the bootstrapping GHC ships it
# which is the case for >= 9.12. Upstream uses this to avoid a race condition
# that only seems to affect Windows. We never build GHC natively on Windows.
# See also https://gitlab.haskell.org/ghc/ghc/-/issues/24382,
# https://gitlab.haskell.org/ghc/ghc/-/commit/a2c033cf826,
# https://gitlab.haskell.org/ghc/ghc/-/commit/7890f2d8526…
(
lib.versionOlder bootGhcVersion "9.12"
&& (
(lib.versionAtLeast ghcVersion "9.6.7" && lib.versionOlder ghcVersion "9.7")
|| lib.versionAtLeast ghcVersion "9.11"
)
);
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
base
bytestring
Cabal
containers
directory
extra
filepath
mtl
parsec
shake
text
transformers
unordered-containers
]
++ lib.optionals (lib.versionAtLeast ghcVersion "9.7") [
cryptohash-sha256
base16-bytestring
]
++ lib.optionals (lib.versionAtLeast ghcVersion "9.9") [
ghc-platform
ghc-toolchain
];
passthru = {
# Expose »private« dependencies if any
inherit ghc-platform ghc-toolchain;
};
description = "GHC build system";
license = lib.licenses.bsd3;
}

View File

@@ -0,0 +1,71 @@
# Hadrian is the build system used to (exclusively) build GHC. It can
# (theoretically) be used starting with GHC 9.4 and is required since 9.6. It is
# developed in the GHC source tree and specific to the GHC version it is released
# with, i.e. Hadrian always needs to be built from the same GHC source tree as
# the GHC we want to build.
#
# This fact makes it impossible to integrate Hadrian into our Haskell package
# sets which are also used to bootstrap GHC, since a package set can bootstrap
# multiple GHC versions (usually two major versions). A bootstrap set would need
# knowledge of the GHC it would eventually bootstrap which would make the logic
# unnecessarily complicated.
#
# Luckily Hadrian is, while annoying to bootstrap, relatively simple. Specifically
# all it requires to build is (relative to the GHC we are trying to build) a
# build->build GHC and build->build Haskell packages. We can get all of this
# from bootPkgs which is already passed to the GHC expression.
#
# The solution is the following: The GHC expression passes its source tree and
# version along with some parameters to this function (./make-hadrian.nix)
# which acts as a common expression builder for all Hadrian version as well as
# related packages that are managed in the GHC source tree. Its main job is to
# expose all possible compile time customization in a common interface and
# take care of all differences between Hadrian versions.
{
bootPkgs,
lib,
}:
{
# GHC source tree and version to build hadrian & friends from.
# These are passed on to the actual package expressions.
ghcSrc,
ghcVersion,
# Contents of a non-default UserSettings.hs to use when building hadrian, if any.
# Should be a string or null.
userSettings ? null,
}:
let
callPackage' =
f: args:
bootPkgs.callPackage f (
{
inherit ghcSrc ghcVersion;
}
// args
);
ghc-platform = callPackage' ./ghc-platform.nix { };
ghc-toolchain = callPackage' ./ghc-toolchain.nix {
inherit ghc-platform;
};
in
callPackage' ./hadrian.nix (
{
inherit userSettings;
# Taking `ghc` as an input may be too confusing
bootGhcVersion = bootPkgs.ghc.version;
}
// lib.optionalAttrs (lib.versionAtLeast ghcVersion "9.9") {
# Starting with GHC 9.9 development, additional in tree packages are required
# to build hadrian. (Hackage-released conditional dependencies are handled
# in ./hadrian.nix without requiring intervention here.)
inherit ghc-platform ghc-toolchain;
}
// lib.optionalAttrs (lib.versionAtLeast ghcVersion "9.11") {
# See https://gitlab.haskell.org/ghc/ghc/-/commit/145a6477854d4003a07573d5e7ffa0c9a64ae29c
Cabal = bootPkgs.Cabal_3_14_2_0;
}
)