From 102aadf228e633e6b33036bfcb4906d55d061188 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 23 Jun 2024 13:10:27 +0200 Subject: [PATCH] haskellPackages.hourglass: Fix build and harmonize overrides --- .../haskell-modules/configuration-common.nix | 14 ++++++++++++++ .../configuration-ghc-9.2.x.nix | 3 --- .../configuration-ghc-9.4.x.nix | 3 --- .../configuration-ghc-9.6.x.nix | 19 ------------------- .../configuration-ghc-9.8.x.nix | 1 - 5 files changed, 14 insertions(+), 26 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 8a0720b6d828..fb316fbbb0fd 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -246,6 +246,20 @@ self: super: { }; }) super.leveldb-haskell; + # 2024-06-23: Hourglass is archived and had its last commit 6 years ago. + # Patch is needed to add support for time 1.10, which is only used in the tests + # https://github.com/vincenthz/hs-hourglass/pull/56 + # Jailbreak is needed because a hackage revision added the (correct) time <1.10 bound. + hourglass = doJailbreak + (appendPatches [ + (pkgs.fetchpatch { + name = "hourglass-pr-56.patch"; + url = + "https://github.com/vincenthz/hs-hourglass/commit/cfc2a4b01f9993b1b51432f0a95fa6730d9a558a.patch"; + sha256 = "sha256-gntZf7RkaR4qzrhjrXSC69jE44SknPDBmfs4z9rVa5Q="; + }) + ] super.hourglass); + # Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs # itself. For instance, pkgs.path has dirty sources and puts a huge .git in the # store. Testing is done upstream. diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix index bcafc8c3fb78..516c3caaa08f 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -101,9 +101,6 @@ self: super: { # https://mail.haskell.org/pipermail/haskell-cafe/2022-October/135613.html language-javascript_0_7_0_0 = dontCheck super.language-javascript_0_7_0_0; - # Tests depend on `parseTime` which is no longer available - hourglass = dontCheck super.hourglass; - # Needs to match ghc version ghc-tags = doDistribute self.ghc-tags_1_5; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix index 94cf15df5dff..9969456cee09 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -78,9 +78,6 @@ in { ] ++ drv.testFlags or []; }) (doJailbreak super.hpack); - # Tests depend on `parseTime` which is no longer available - hourglass = dontCheck super.hourglass; - # https://github.com/sjakobi/bsb-http-chunked/issues/38 bsb-http-chunked = dontCheck super.bsb-http-chunked; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix index 4edc24f10add..20af8f508b32 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -89,25 +89,6 @@ self: super: { # Forbids base >= 4.18, fix proposed: https://github.com/sjakobi/newtype-generics/pull/25 newtype-generics = jailbreakForCurrentVersion super.newtype-generics "0.6.2"; - # - # Too strict bounds, waiting on Hackage release in nixpkgs - # - - # - # Compilation failure workarounds - # - - # Add support for time 1.10 - # https://github.com/vincenthz/hs-hourglass/pull/56 - hourglass = appendPatches [ - (pkgs.fetchpatch { - name = "hourglass-pr-56.patch"; - url = - "https://github.com/vincenthz/hs-hourglass/commit/cfc2a4b01f9993b1b51432f0a95fa6730d9a558a.patch"; - sha256 = "sha256-gntZf7RkaR4qzrhjrXSC69jE44SknPDBmfs4z9rVa5Q="; - }) - ] (super.hourglass); - # Jailbreaks for servant <0.20 servant-lucid = doJailbreak super.servant-lucid; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix index 3c2e58c5aed6..c4904bd60b4a 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix @@ -119,7 +119,6 @@ self: super: { # unordered-containers = dontCheck super.unordered-containers; # ChasingBottoms doesn't support base 4.20 lifted-base = dontCheck super.lifted-base; # doesn't compile with transformers == 0.6.* - hourglass = dontCheck super.hourglass; # umaintained, test suite doesn't compile anymore bsb-http-chunked = dontCheck super.bsb-http-chunked; # umaintained, test suite doesn't compile anymore pcre-heavy = dontCheck super.pcre-heavy; # GHC warnings cause the tests to fail