Use "fetchpatch" instead of a patch file.

This commit is contained in:
Shaun Sharples 2014-11-10 10:32:41 +02:00
parent 9e3137ddf0
commit 094771012b
2 changed files with 5 additions and 17 deletions

View file

@ -3,7 +3,7 @@
{ cabal, aeson, attoparsec, doctest, exceptions, filepath
, httpClient, httpClientTls, httpTypes, HUnit, lens, lensAeson
, mimeTypes, temporary, testFramework, testFrameworkHunit, text
, time
, time, fetchpatch
}:
cabal.mkDerivation (self: {
@ -21,7 +21,10 @@ cabal.mkDerivation (self: {
temporary testFramework testFrameworkHunit text
];
doCheck = false;
patches = [ ./lens-4.5.patch ];
patches = [ (fetchpatch {
url = "https://github.com/relrod/wreq/commit/9a91d57b50a09646ecbda88d126918e49aeb2de4.diff";
sha256 = "143a4f661pigfqqkvhjzfmg24r4j595p1fcsiqiqc763pynccgq9";
})];
meta = {
homepage = "http://www.serpentine.com/wreq";
description = "An easy-to-use HTTP client library";

View file

@ -1,15 +0,0 @@
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)