From 7998143a43ae0ab51eed75e92851446daddc7966 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 20 Dec 2023 11:54:22 +0100 Subject: [PATCH] haskell.compiler: also build manual for cross-compilers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reasoning given for disabling it is flawed: In most cases, sphinx and its dependencies are already in the binary cache, since we only need them as build tools—sphinx for the build platform is just the normal pkgs.sphinx, since it doesn't care about targetPlatform. We just need to disable it when the buildPlatform is also musl, so we avoid pulling in sphinx in pkgsMusl. --- pkgs/development/compilers/ghc/8.10.7.nix | 9 +++------ pkgs/development/compilers/ghc/9.0.2.nix | 9 +++------ pkgs/development/compilers/ghc/9.2.4.nix | 9 +++------ pkgs/development/compilers/ghc/9.2.5.nix | 9 +++------ pkgs/development/compilers/ghc/9.2.6.nix | 9 +++------ pkgs/development/compilers/ghc/9.2.7.nix | 9 +++------ pkgs/development/compilers/ghc/9.2.8.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.2.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.3.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.4.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.5.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.6.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.7.nix | 9 +++------ pkgs/development/compilers/ghc/9.4.8.nix | 9 +++------ pkgs/development/compilers/ghc/common-hadrian.nix | 10 ++++------ 15 files changed, 46 insertions(+), 90 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 6eedcb6374be..c49c274c67d4 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -44,12 +44,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix index 92ed154a02ba..bdfff2b795a4 100644 --- a/pkgs/development/compilers/ghc/9.0.2.nix +++ b/pkgs/development/compilers/ghc/9.0.2.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pullls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.2.4.nix b/pkgs/development/compilers/ghc/9.2.4.nix index 97539cd54321..d3824de3cefc 100644 --- a/pkgs/development/compilers/ghc/9.2.4.nix +++ b/pkgs/development/compilers/ghc/9.2.4.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.2.5.nix b/pkgs/development/compilers/ghc/9.2.5.nix index a54894bda952..a2980712ee24 100644 --- a/pkgs/development/compilers/ghc/9.2.5.nix +++ b/pkgs/development/compilers/ghc/9.2.5.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.2.6.nix b/pkgs/development/compilers/ghc/9.2.6.nix index 5079578239ea..57c827010359 100644 --- a/pkgs/development/compilers/ghc/9.2.6.nix +++ b/pkgs/development/compilers/ghc/9.2.6.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.2.7.nix b/pkgs/development/compilers/ghc/9.2.7.nix index 3db132036652..2f5604d3641b 100644 --- a/pkgs/development/compilers/ghc/9.2.7.nix +++ b/pkgs/development/compilers/ghc/9.2.7.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.2.8.nix b/pkgs/development/compilers/ghc/9.2.8.nix index 499f463e801a..df1b226ade99 100644 --- a/pkgs/development/compilers/ghc/9.2.8.nix +++ b/pkgs/development/compilers/ghc/9.2.8.nix @@ -46,12 +46,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.2.nix b/pkgs/development/compilers/ghc/9.4.2.nix index 3d7852ec701e..84208a5fb673 100644 --- a/pkgs/development/compilers/ghc/9.4.2.nix +++ b/pkgs/development/compilers/ghc/9.4.2.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix index 7dc90444d008..0037b2def836 100644 --- a/pkgs/development/compilers/ghc/9.4.3.nix +++ b/pkgs/development/compilers/ghc/9.4.3.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.4.nix b/pkgs/development/compilers/ghc/9.4.4.nix index 7a06d124dfdb..037da42a164d 100644 --- a/pkgs/development/compilers/ghc/9.4.4.nix +++ b/pkgs/development/compilers/ghc/9.4.4.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.5.nix b/pkgs/development/compilers/ghc/9.4.5.nix index 522eab95794f..75503d0bb218 100644 --- a/pkgs/development/compilers/ghc/9.4.5.nix +++ b/pkgs/development/compilers/ghc/9.4.5.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.6.nix b/pkgs/development/compilers/ghc/9.4.6.nix index affebd95763e..dee464d48844 100644 --- a/pkgs/development/compilers/ghc/9.4.6.nix +++ b/pkgs/development/compilers/ghc/9.4.6.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.7.nix b/pkgs/development/compilers/ghc/9.4.7.nix index 705b85fb1159..dda817015d48 100644 --- a/pkgs/development/compilers/ghc/9.4.7.nix +++ b/pkgs/development/compilers/ghc/9.4.7.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/9.4.8.nix b/pkgs/development/compilers/ghc/9.4.8.nix index e915c549dc62..84e482566114 100644 --- a/pkgs/development/compilers/ghc/9.4.8.nix +++ b/pkgs/development/compilers/ghc/9.4.8.nix @@ -48,12 +48,9 @@ , # Whether to build sphinx documentation. enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , enableHaddockProgram ? diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 8bc9a5835177..2d1ba01d8e34 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -162,13 +162,11 @@ } , # Whether to build sphinx documentation. + # TODO(@sternenseemann): Hadrian ignores the --docs flag if finalStage = Stage1 enableDocs ? ( - # Docs disabled for musl and cross because it's a large task to keep - # all `sphinx` dependencies building in those environments. - # `sphinx` pulls in among others: - # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. - (stdenv.targetPlatform == stdenv.hostPlatform) - && !stdenv.hostPlatform.isMusl + # Docs disabled if we are building on musl because it's a large task to keep + # all `sphinx` dependencies building in this environment. + !stdenv.buildPlatform.isMusl ) , # Whether to disable the large address space allocator