llvmPackages.llvm-manpages: fix eval on Darwin (#357697)

This commit is contained in:
Randy Eckenrode 2024-11-24 11:08:14 -05:00 committed by GitHub
commit 552eca9ad9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -326,6 +326,7 @@ let
libllvm libllvm
lld lld
llvm llvm
llvm-manpages
; ;
}; };
@ -548,6 +549,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
''; '';
passthru.isFromBootstrapFiles = true; passthru.isFromBootstrapFiles = true;
}; };
llvm-manpages = self.llvmPackages.libllvm;
lld = self.stdenv.mkDerivation { lld = self.stdenv.mkDerivation {
name = "bootstrap-stage0-lld"; name = "bootstrap-stage0-lld";
buildCommand = ""; buildCommand = "";
@ -952,15 +954,24 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
selfDarwin: superDarwin: selfDarwin: superDarwin:
darwinPackages prevStage darwinPackages prevStage
// sdkDarwinPackages prevStage // sdkDarwinPackages prevStage
# Rebuild darwin.binutils with the new LLVM, so only inherit libSystem from the previous stage.
// { // {
inherit (prevStage.darwin) libSystem; 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 # 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 # 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. # 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 ( python3Packages = self.python3.pkgs.overrideScope (
_: superPython: { _: superPython: {
hatch-vcs = superPython.hatch-vcs.overrideAttrs { doInstallCheck = false; }; 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); libraries = super.llvmPackages.libraries.extend (_: _: llvmLibrariesPackages prevStage);
in in
super.llvmPackages // { inherit libraries; } // libraries; super.llvmPackages // { inherit tools libraries; } // tools // libraries;
} }
]; ];