diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 466881b2b0f5..98e13522ac12 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -687,6 +687,8 @@ with haskellLib; # TODO(@sternenseemann): submit upstreamable patch resolving this # (this should be possible by also taking PREFIX into account). ./patches/git-annex-no-usr-prefix.patch + # Fix build with http-types >= 0.12.5, will be part of next release + ./patches/git-annex-http-types-0.12.5.patch ]; postPatch = '' diff --git a/pkgs/development/haskell-modules/patches/git-annex-http-types-0.12.5.patch b/pkgs/development/haskell-modules/patches/git-annex-http-types-0.12.5.patch new file mode 100644 index 000000000000..e4cc0b0d0081 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/git-annex-http-types-0.12.5.patch @@ -0,0 +1,55 @@ +From cc9d0a2e9fd90d0a6f5d228aa17ebf26424ce1f9 Mon Sep 17 00:00:00 2001 +From: Joey Hess +Date: Sat, 6 Jun 2026 11:09:11 -0400 +Subject: [PATCH] Fix build with http-types-0.12.5 + +Depend on http-types >= 0.9, which added 3 headers to +Network.HTTP.Types.Headers. In 0.12.5, those are exported +from Network.HTTP.Types, which conflicted with the +definitions in Utility.Url. +--- + +diff --git a/Utility/Url.hs b/Utility/Url.hs +index 40fa4832a1..3acbf31e3c 100644 +--- a/Utility/Url.hs ++++ b/Utility/Url.hs +@@ -56,6 +56,7 @@ import qualified Utility.FileIO as F + + import Network.URI + import Network.HTTP.Types ++import Network.HTTP.Types.Header (hAcceptEncoding, hContentDisposition, hContentRange) + import qualified System.FilePath.Posix as UrlPath + import qualified Data.CaseInsensitive as CI + import qualified Data.ByteString as B +@@ -670,15 +671,6 @@ parseRequestRelaxed u = case uriAuthority u of + u { uriAuthority = Just $ ua { uriPort = "" } } + _ -> parseRequest (show u) + +-hAcceptEncoding :: CI.CI B.ByteString +-hAcceptEncoding = "Accept-Encoding" +- +-hContentDisposition :: CI.CI B.ByteString +-hContentDisposition = "Content-Disposition" +- +-hContentRange :: CI.CI B.ByteString +-hContentRange = "Content-Range" +- + resumeFromHeader :: FileSize -> Header + resumeFromHeader sz = (hRange, renderByteRanges [ByteRangeFrom sz]) + +diff --git a/git-annex.cabal b/git-annex.cabal +index a3557cbfef..bae89052e7 100644 +--- a/git-annex.cabal ++++ b/git-annex.cabal +@@ -233,7 +233,7 @@ Executable git-annex + resourcet, + http-client (>= 0.5.3), + http-client-tls (>= 0.3.2), +- http-types (>= 0.7), ++ http-types (>= 0.9), + http-conduit (>= 2.3.0), + http-client-restricted (>= 0.0.2), + conduit, +-- +2.54.0 +