From 4f64988a859b87a3b08561174b37744939e2c287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sat, 15 Aug 2026 18:52:59 +0300 Subject: [PATCH] haskell.generic-builder: pass --with-haddock for cross builds Cabal otherwise finds the native Haddock on PATH, which fails when it was built against a different GHC version. Select the target-prefixed Haddock when documentation is enabled. --- pkgs/development/haskell-modules/generic-builder.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 4d12e580a9c5..531852d19654 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -349,6 +349,7 @@ let "--with-hsc2hs=${ghc.targetPrefix}hsc2hs" "--with-strip=${stdenv.cc.bintools.targetPrefix}strip" ] + ++ optional doHaddock "--with-haddock=${ghc.targetPrefix}haddock" ++ optionals (!isHaLVM) [ "--hsc2hs-option=--cross-compile" (optionalString enableHsc2hsViaAsm "--hsc2hs-option=--via-asm")