From 0158d124bd32346c43e1aab6777b94ca82325db4 Mon Sep 17 00:00:00 2001 From: Maciek Starzyk Date: Thu, 9 Jun 2016 00:03:41 +0200 Subject: [PATCH] haskellPackages.timezone-series: Download patch instead of checking it into nixpkgs --- .../haskell-modules/configuration-common.nix | 5 +- .../patches/timezone-series.patch | 64 ------------------- 2 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 pkgs/development/haskell-modules/patches/timezone-series.patch diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index bf8ff6df994..b723ad27ab8 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 4605d16f86c..00000000000 --- a/pkgs/development/haskell-modules/patches/timezone-series.patch +++ /dev/null @@ -1,64 +0,0 @@ -commit f8dece8c016db6476e2bb0d4f972769a76f6ff40 -Author: Ryan Trinkle -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