haskellPackages.timezone-series: Download patch instead of checking it into nixpkgs
This commit is contained in:
parent
10c87e69b4
commit
0158d124bd
@ -1037,5 +1037,8 @@ self: super: {
|
|||||||
'';
|
'';
|
||||||
}));
|
}));
|
||||||
|
|
||||||
timezone-series = appendPatch super.timezone-series ./patches/timezone-series.patch;
|
timezone-series = appendPatch super.timezone-series (pkgs.fetchpatch {
|
||||||
|
url = "https://github.com/ryantrinkle/timezone-series/commit/f8dece8c016db6476e2bb0d4f972769a76f6ff40.patch";
|
||||||
|
sha256 = "02sgciica2pzaal7wwp36v6iybr1hjypda0zljxylnq0qs8bizhy";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
commit f8dece8c016db6476e2bb0d4f972769a76f6ff40
|
|
||||||
Author: Ryan Trinkle <ryan.trinkle@gmail.com>
|
|
||||||
Date: Wed May 11 20:17:23 2016 -0400
|
|
||||||
|
|
||||||
Add support for time-1.6
|
|
||||||
|
|
||||||
diff --git a/Data/Time/LocalTime/TimeZone/Series.hs b/Data/Time/LocalTime/TimeZone/Series.hs
|
|
||||||
index babcc0b..c8bb0ad 100644
|
|
||||||
--- a/Data/Time/LocalTime/TimeZone/Series.hs
|
|
||||||
+++ b/Data/Time/LocalTime/TimeZone/Series.hs
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
-- clock settings that occurred in the past and are scheduled to occur
|
|
||||||
-- in the future for the timezone.
|
|
||||||
|
|
||||||
+{-# LANGUAGE CPP #-}
|
|
||||||
module Data.Time.LocalTime.TimeZone.Series
|
|
||||||
(
|
|
||||||
-- * Representing a timezone
|
|
||||||
@@ -76,8 +77,18 @@ instance Show TimeZoneSeries where
|
|
||||||
instance Read TimeZoneSeries where
|
|
||||||
readsPrec n = map (first $ flip TimeZoneSeries []) . readsPrec n
|
|
||||||
|
|
||||||
+-- In time-1.6, buildTime was changed to return a `Maybe t` rather
|
|
||||||
+-- than just a `t`
|
|
||||||
+#if MIN_VERSION_time(1,6,0)
|
|
||||||
+mapBuiltTime :: (a -> b) -> Maybe a -> Maybe b
|
|
||||||
+mapBuiltTime = fmap
|
|
||||||
+#else
|
|
||||||
+mapBuiltTime :: (a -> b) -> a -> b
|
|
||||||
+mapBuiltTime = id
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
instance ParseTime TimeZoneSeries where
|
|
||||||
- buildTime locale = flip TimeZoneSeries [] . buildTime locale
|
|
||||||
+ buildTime locale = mapBuiltTime (flip TimeZoneSeries []) . buildTime locale
|
|
||||||
|
|
||||||
-- | The latest non-summer @TimeZone@ in a @TimeZoneSeries@ is in some
|
|
||||||
-- sense representative of the timezone.
|
|
||||||
@@ -167,7 +178,7 @@ instance Read ZoneSeriesTime where
|
|
||||||
readsPrec n = map (first zonedTimeToZoneSeriesTime) . readsPrec n
|
|
||||||
|
|
||||||
instance ParseTime ZoneSeriesTime where
|
|
||||||
- buildTime locale = zonedTimeToZoneSeriesTime . buildTime locale
|
|
||||||
+ buildTime locale = mapBuiltTime zonedTimeToZoneSeriesTime . buildTime locale
|
|
||||||
|
|
||||||
instance FormatTime ZoneSeriesTime where
|
|
||||||
formatCharacter =
|
|
||||||
diff --git a/timezone-series.cabal b/timezone-series.cabal
|
|
||||||
index 058c142..4ee73a4 100644
|
|
||||||
--- a/timezone-series.cabal
|
|
||||||
+++ b/timezone-series.cabal
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
Name: timezone-series
|
|
||||||
-Version: 0.1.5.1
|
|
||||||
+Version: 0.1.5.2
|
|
||||||
Synopsis: Enhanced timezone handling for Data.Time
|
|
||||||
Description: This package endows Data.Time, from the time
|
|
||||||
package, with several data types and functions
|
|
||||||
@@ -28,4 +28,4 @@ Library
|
|
||||||
Exposed-modules: Data.Time.LocalTime.TimeZone.Series
|
|
||||||
Default-extensions: DeriveDataTypeable
|
|
||||||
Build-depends: base >= 4.4 && < 5,
|
|
||||||
- time >= 1.1.4 && < 1.6
|
|
||||||
+ time >= 1.1.4 && < 1.7
|
|
Loading…
x
Reference in New Issue
Block a user