From b2c570ec43e71ca3ece75db07ca724784929ae0e Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 13 Mar 2023 01:29:33 +0100 Subject: [PATCH] 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. --- pkgs/development/compilers/ghc/common-hadrian.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index d359f3fd521d..77e99ddf0da3 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -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