From d403468a1078615693e8d19d96c5c484cefdd807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berk=20=C3=96zk=C3=BCt=C3=BCk?= Date: Thu, 12 Dec 2024 18:03:12 +0100 Subject: [PATCH] fix: make CSS path absolute and pass it for index generation --- Cabal/src/Distribution/Simple/Haddock.hs | 1 + cabal-install/src/Distribution/Client/CmdHaddock.hs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs index f264f2342ea..a8bdc9acc67 100644 --- a/Cabal/src/Distribution/Simple/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Haddock.hs @@ -618,6 +618,7 @@ fromHaddockProjectFlags flags = , argInterfaces = fromFlagOrDefault [] (haddockProjectInterfaces flags) , argLinkedSource = Flag True , argResourcesDir = haddockProjectResourcesDir flags + , argCssFile = haddockProjectCss flags } fromPackageDescription :: HaddockTarget -> PackageDescription -> HaddockArgs diff --git a/cabal-install/src/Distribution/Client/CmdHaddock.hs b/cabal-install/src/Distribution/Client/CmdHaddock.hs index 8ecc5487798..677589e3e35 100644 --- a/cabal-install/src/Distribution/Client/CmdHaddock.hs +++ b/cabal-install/src/Distribution/Client/CmdHaddock.hs @@ -136,7 +136,8 @@ mkFlagsAbsolute :: NixStyleFlags ClientHaddockFlags -> IO (NixStyleFlags ClientH mkFlagsAbsolute relFlags = do let relHaddockFlags = haddockFlags relFlags absHaddockOutputDir <- traverse makeAbsolute (haddockOutputDir relHaddockFlags) - return (relFlags{haddockFlags = relHaddockFlags{haddockOutputDir = absHaddockOutputDir}}) + absHaddockCss <- traverse makeAbsolute (haddockCss relHaddockFlags) + return (relFlags{haddockFlags = relHaddockFlags{haddockOutputDir = absHaddockOutputDir, haddockCss = absHaddockCss}}) -- | The @haddock@ command is TODO. --