diff options
author | Maciek Starzyk <mstarzyk@gmail.com> | 2016-06-09 00:03:41 +0200 |
---|---|---|
committer | Maciek Starzyk <mstarzyk@gmail.com> | 2016-06-09 00:03:41 +0200 |
commit | 0158d124bd32346c43e1aab6777b94ca82325db4 (patch) | |
tree | 9d6df4d26768670cdea4dae96dcedbe01497d90c /pkgs | |
parent | 10c87e69b4ab04a499be1a54bca1b8548f657d63 (diff) | |
download | nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar.gz nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar.bz2 nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar.lz nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar.xz nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.tar.zst nixlib-0158d124bd32346c43e1aab6777b94ca82325db4.zip |
haskellPackages.timezone-series: Download patch instead of checking it into nixpkgs
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 5 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/patches/timezone-series.patch | 64 |
2 files changed, 4 insertions, 65 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index bf8ff6df994a..b723ad27ab8e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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"; + }); } diff --git a/pkgs/development/haskell-modules/patches/timezone-series.patch b/pkgs/development/haskell-modules/patches/timezone-series.patch deleted file mode 100644 index 4605d16f86c9..000000000000 --- a/pkgs/development/haskell-modules/patches/timezone-series.patch +++ /dev/null @@ -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 |