llvmPackages.llvm-manpages: fix eval on Darwin
Darwin prevents curl from being used in the Darwin bootstrap. The man pages are built for darwin.binutils-unwrapped, but overrides are applied only there, leaving plain llvmPackages.llvm-manpages broken. The fix is to move the override to the llvmPackages package set.
This commit is contained in:
parent
f959feb88a
commit
484eca6cec
@ -326,6 +326,7 @@ let
|
||||
libllvm
|
||||
lld
|
||||
llvm
|
||||
llvm-manpages
|
||||
;
|
||||
};
|
||||
|
||||
@ -548,6 +549,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
|
||||
'';
|
||||
passthru.isFromBootstrapFiles = true;
|
||||
};
|
||||
llvm-manpages = self.llvmPackages.libllvm;
|
||||
lld = self.stdenv.mkDerivation {
|
||||
name = "bootstrap-stage0-lld";
|
||||
buildCommand = "";
|
||||
@ -952,15 +954,24 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
|
||||
selfDarwin: superDarwin:
|
||||
darwinPackages prevStage
|
||||
// sdkDarwinPackages prevStage
|
||||
# Rebuild darwin.binutils with the new LLVM, so only inherit libSystem from the previous stage.
|
||||
// {
|
||||
inherit (prevStage.darwin) libSystem;
|
||||
}
|
||||
);
|
||||
|
||||
# binutils-unwrapped needs to build the LLVM man pages, which requires a lot of Python stuff
|
||||
llvmPackages =
|
||||
let
|
||||
tools = super.llvmPackages.tools.extend (
|
||||
_: superTools: {
|
||||
# darwin.binutils-unwrapped needs to build the LLVM man pages, which requires a lot of Python stuff
|
||||
# that ultimately ends up depending on git. Fortunately, the git dependency is only for check
|
||||
# inputs. The following set of overrides allow the LLVM documentation to be built without
|
||||
# pulling curl (and other packages like ffmpeg) into the stdenv bootstrap.
|
||||
binutils-unwrapped = superDarwin.binutils-unwrapped.override (old: {
|
||||
llvm-manpages = super.llvmPackages.llvm-manpages.override {
|
||||
#
|
||||
# However, even without darwin.binutils-unwrapped, this has to be overriden in the LLVM package set
|
||||
# because otherwise llvmPackages.llvm-manpages on its own is broken.
|
||||
llvm-manpages = superTools.llvm-manpages.override {
|
||||
python3Packages = self.python3.pkgs.overrideScope (
|
||||
_: superPython: {
|
||||
hatch-vcs = superPython.hatch-vcs.overrideAttrs { doInstallCheck = false; };
|
||||
@ -970,15 +981,11 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
|
||||
}
|
||||
);
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
llvmPackages =
|
||||
let
|
||||
libraries = super.llvmPackages.libraries.extend (_: _: llvmLibrariesPackages prevStage);
|
||||
in
|
||||
super.llvmPackages // { inherit libraries; } // libraries;
|
||||
super.llvmPackages // { inherit tools libraries; } // tools // libraries;
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user