forked from mirrors/nixpkgs
Merge pull request #4919 from InternetSolutions/wreq-lens45
Use "fetchpatch" instead of a patch file.
This commit is contained in:
commit
96c66aea67
|
@ -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 = "09px4hbqkc9b0ykx7alzq2llzp0nxb2c5zsbaa05rcq9cb3nrq4m";
|
||||
})];
|
||||
meta = {
|
||||
homepage = "http://www.serpentine.com/wreq";
|
||||
description = "An easy-to-use HTTP client library";
|
||||
|
|
|
@ -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)
|
Loading…
Reference in a new issue