haskell.compiler: always include python when building with hadrian

We previously thought that we only need python if we were going to run
./boot or using emscripten which implements all its wrappers in
python (and likes to reinvoke them). As it turns out, though, hadrian
likes to invoke python itself for generating certain headers of rts
using a script shipped with the GHC source. This fact was obscured
before, since (presumably) sphinx would propagate python into PATH.
This commit is contained in:
sternenseemann 2023-03-13 01:29:33 +01:00
parent b68d8e3f47
commit b2c570ec43

View file

@ -397,16 +397,12 @@ stdenv.mkDerivation ({
perl ghc hadrian bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
# autoconf and friends are necessary for hadrian to create the bindist
autoconf automake m4
] ++ lib.optionals (rev != null) [
# We need to execute the boot script
# Python is used in a few scripts invoked by hadrian to generate e.g. rts headers.
python3
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
autoSignDarwinBinariesHook
] ++ lib.optionals enableDocs [
sphinx
] ++ lib.optionals targetPlatform.isGhcjs [
# emscripten itself is added via depBuildTarget / targetCC
python3
];
# For building runtime libs