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).
This commit is contained in:
parent
4884fcc0d2
commit
654940f36b
6 changed files with 21 additions and 1 deletions
|
@ -366,6 +366,10 @@ stdenv.mkDerivation (rec {
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
|
# This is used by the haskell builder to query
|
||||||
|
# the presence of the haddock program.
|
||||||
|
hasHaddock = enableHaddockProgram;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-${version}";
|
haskellCompilerName = "ghc-${version}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -335,6 +335,10 @@ stdenv.mkDerivation (rec {
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
|
# This is used by the haskell builder to query
|
||||||
|
# the presence of the haddock program.
|
||||||
|
hasHaddock = enableHaddockProgram;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-${version}";
|
haskellCompilerName = "ghc-${version}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -331,6 +331,10 @@ stdenv.mkDerivation (rec {
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
|
# This is used by the haskell builder to query
|
||||||
|
# the presence of the haddock program.
|
||||||
|
hasHaddock = enableHaddockProgram;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-${version}";
|
haskellCompilerName = "ghc-${version}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -331,6 +331,10 @@ stdenv.mkDerivation (rec {
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
|
# This is used by the haskell builder to query
|
||||||
|
# the presence of the haddock program.
|
||||||
|
hasHaddock = enableHaddockProgram;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-${version}";
|
haskellCompilerName = "ghc-${version}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -347,6 +347,10 @@ stdenv.mkDerivation (rec {
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
|
# This is used by the haskell builder to query
|
||||||
|
# the presence of the haddock program.
|
||||||
|
hasHaddock = enableHaddockProgram;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-${version}";
|
haskellCompilerName = "ghc-${version}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,7 +55,7 @@ in
|
||||||
, changelog ? null
|
, changelog ? null
|
||||||
, mainProgram ? null
|
, mainProgram ? null
|
||||||
, doCoverage ? false
|
, 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"
|
, doHaddockInterfaces ? doHaddock && lib.versionAtLeast ghc.version "9.0.1"
|
||||||
, passthru ? {}
|
, passthru ? {}
|
||||||
, pkg-configDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? []
|
, pkg-configDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? []
|
||||||
|
|
Loading…
Reference in a new issue