diff --git a/pkgs/development/libraries/haskell/wreq/default.nix b/pkgs/development/libraries/haskell/wreq/default.nix index 55270cbb2102..a5112b8fa3d9 100644 --- a/pkgs/development/libraries/haskell/wreq/default.nix +++ b/pkgs/development/libraries/haskell/wreq/default.nix @@ -21,12 +21,12 @@ cabal.mkDerivation (self: { temporary testFramework testFrameworkHunit text ]; doCheck = false; + patches = [ ./lens-4.5.patch ]; meta = { homepage = "http://www.serpentine.com/wreq"; description = "An easy-to-use HTTP client library"; license = self.stdenv.lib.licenses.bsd3; platforms = self.ghc.meta.platforms; maintainers = with self.stdenv.lib.maintainers; [ ocharles ]; - broken = true; }; }) diff --git a/pkgs/development/libraries/haskell/wreq/lens-4.5.patch b/pkgs/development/libraries/haskell/wreq/lens-4.5.patch new file mode 100644 index 000000000000..b47e5647bf1d --- /dev/null +++ b/pkgs/development/libraries/haskell/wreq/lens-4.5.patch @@ -0,0 +1,15 @@ +diff --git a/Network/Wreq/Lens/Machinery.hs b/Network/Wreq/Lens/Machinery.hs +index 782d965..0c97d27 100644 +--- a/Network/Wreq/Lens/Machinery.hs ++++ b/Network/Wreq/Lens/Machinery.hs +@@ -13,8 +13,8 @@ import Language.Haskell.TH.Syntax (Dec, Name, Q, mkName, nameBase) + defaultRules :: LensRules + defaultRules = lensRules + +-fieldName :: (String -> String) -> [Name] -> Name -> [DefName] +-fieldName f _ name = [TopName . mkName . f . nameBase $ name] ++fieldName :: (String -> String) -> Name -> [Name] -> Name -> [DefName] ++fieldName f _ _ name = [TopName . mkName . f . nameBase $ name] + + makeLenses :: Name -> Q [Dec] + makeLenses = makeLensesWith (defaultRules & lensField .~ fieldName id)