From 3aa001ccaaab5c2ea52d10d172aa036f345a89ca Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Wed, 22 Apr 2020 17:13:38 +0800 Subject: [PATCH] haskellPackages.hakyll: relax upper bound on warp --- .../haskell-modules/configuration-common.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0d2785b07e50..d4b8f0bd646b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -153,11 +153,20 @@ self: super: { barbly = addBuildDepend super.barbly pkgs.darwin.apple_sdk.frameworks.AppKit; # Hakyll's tests are broken on Darwin (3 failures); and they require util-linux - hakyll = if pkgs.stdenv.isDarwin - then dontCheck (overrideCabal super.hakyll (drv: { + hakyll = let + # Hakyll needs a relaxed upper bound on `warp` so that the preview server will build + patched-hakyll = overrideCabal super.hakyll (drv: { + postPatch = (drv.postPatch or "") + '' + substituteInPlace hakyll.cabal --replace \ + "warp >= 3.2 && < 3.3" \ + "warp >= 3.2 && < 3.4" + ''; + }); + in if pkgs.stdenv.isDarwin + then dontCheck (overrideCabal patched-hakyll (drv: { testToolDepends = []; })) - else super.hakyll; + else patched-hakyll; double-conversion = if !pkgs.stdenv.isDarwin then super.double-conversion