summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2022-03-01 23:42:45 +0100
committersterni <sternenseemann@systemli.org>2022-03-17 19:43:04 +0100
commit654940f36b5dfa19d87098efca6c4dac44a84eda (patch)
treed4ef243df2320ea251a2e3fe5b966be8a09ffc5a /pkgs/development
parent4884fcc0d2b7581ef670a3cbd71363023a3ee6eb (diff)
downloadnixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar.gz
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar.bz2
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar.lz
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar.xz
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.tar.zst
nixpkgs-654940f36b5dfa19d87098efca6c4dac44a84eda.zip
haskellPackages.mkDerivation: check haddock availability
This change makes the haskell builder run the haddockPhase only if the
haddock program is availble (for example, it's not when cross-compiling).
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/ghc/8.10.7.nix4
-rw-r--r--pkgs/development/compilers/ghc/8.8.4.nix4
-rw-r--r--pkgs/development/compilers/ghc/9.0.2.nix4
-rw-r--r--pkgs/development/compilers/ghc/9.2.2.nix4
-rw-r--r--pkgs/development/compilers/ghc/head.nix4
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix2
6 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix
index a8f05d6f15c..fd14501097c 100644
--- a/pkgs/development/compilers/ghc/8.10.7.nix
+++ b/pkgs/development/compilers/ghc/8.10.7.nix
@@ -366,6 +366,10 @@ stdenv.mkDerivation (rec {
     inherit llvmPackages;
     inherit enableShared;
 
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
   };
diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix
index 8a352d0e0a9..af01582b108 100644
--- a/pkgs/development/compilers/ghc/8.8.4.nix
+++ b/pkgs/development/compilers/ghc/8.8.4.nix
@@ -335,6 +335,10 @@ stdenv.mkDerivation (rec {
     inherit llvmPackages;
     inherit enableShared;
 
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
   };
diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix
index f7624741b68..04e29ed6686 100644
--- a/pkgs/development/compilers/ghc/9.0.2.nix
+++ b/pkgs/development/compilers/ghc/9.0.2.nix
@@ -331,6 +331,10 @@ stdenv.mkDerivation (rec {
     inherit llvmPackages;
     inherit enableShared;
 
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
   };
diff --git a/pkgs/development/compilers/ghc/9.2.2.nix b/pkgs/development/compilers/ghc/9.2.2.nix
index 6db6eb3b0eb..0a572bff7ef 100644
--- a/pkgs/development/compilers/ghc/9.2.2.nix
+++ b/pkgs/development/compilers/ghc/9.2.2.nix
@@ -331,6 +331,10 @@ stdenv.mkDerivation (rec {
     inherit llvmPackages;
     inherit enableShared;
 
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
   };
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 1c4bf3059d5..07ea6bda245 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -347,6 +347,10 @@ stdenv.mkDerivation (rec {
     inherit llvmPackages;
     inherit enableShared;
 
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
   };
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index d8137038f63..04973d3251e 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -55,7 +55,7 @@ in
 , changelog ? null
 , mainProgram ? null
 , doCoverage ? false
-, doHaddock ? !(ghc.isHaLVM or false)
+, doHaddock ? !(ghc.isHaLVM or false) && (ghc.hasHaddock or true)
 , doHaddockInterfaces ? doHaddock && lib.versionAtLeast ghc.version "9.0.1"
 , passthru ? {}
 , pkg-configDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? []