From 7c8c63e3eb4aaab66e6feaad12e1b5a926142e0a Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 6 Jan 2024 18:20:47 +0100 Subject: haskellPackages.language-haskell-extract: unify overrides All versions have this patch that conditionally enables support for template-haskell >= 2.16, so we can fold them into one. --- pkgs/development/haskell-modules/configuration-common.nix | 6 ++++++ pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix | 7 ------- pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix | 6 ------ pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix | 6 ------ pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix | 6 ------ pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix | 6 ------ 6 files changed, 6 insertions(+), 31 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 4ed4e122ebfa..951af07d7c16 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -146,6 +146,12 @@ self: super: { # https://github.com/supki/ldap-client/issues/18 ldap-client-og = dontCheck super.ldap-client-og; + # Support for template-haskell >= 2.16 + language-haskell-extract = appendPatch (pkgs.fetchpatch { + url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch"; + sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv"; + }) (doJailbreak super.language-haskell-extract); + vector = overrideCabal (old: { # Too strict bounds on doctest which isn't used, but is part of the configuration jailbreak = true; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index c335fdaacbcf..8b4399af2076 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -89,13 +89,6 @@ self: super: { shellmet = doJailbreak super.shellmet; shower = doJailbreak super.shower; - # Apply patch from https://github.com/finnsson/template-helper/issues/12#issuecomment-611795375 to fix the build. - language-haskell-extract = appendPatch (pkgs.fetchpatch { - name = "language-haskell-extract-0.2.4.patch"; - url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/e48738ee1be774507887a90a0d67ad1319456afc/patches/language-haskell-extract-0.2.4.patch?inline=false"; - sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f"; - }) (doJailbreak super.language-haskell-extract); - # hnix 0.9.0 does not provide an executable for ghc < 8.10, so define completions here for now. hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] (overrideCabal (drv: { diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index ad4e34dd2c69..7a15179e3079 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -79,12 +79,6 @@ self: super: { stylish-haskell = doJailbreak super.stylish-haskell_0_14_4_0; doctest = dontCheck super.doctest; - # Apply patches from head.hackage. - language-haskell-extract = appendPatch (pkgs.fetchpatch { - url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/language-haskell-extract-0.2.4.patch"; - sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f"; - }) (doJailbreak super.language-haskell-extract); - haskell-language-server = let # These aren't included in hackage-packages.nix because hackage2nix is configured for GHC 9.2, under which these plugins aren't supported. # See https://github.com/NixOS/nixpkgs/pull/205902 for why we use `self..scope` 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 bbaec23e1be3..5ffca6a50bc6 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -91,12 +91,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; - # Apply patches from head.hackage. - language-haskell-extract = appendPatch (pkgs.fetchpatch { - url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch"; - sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv"; - }) (doJailbreak super.language-haskell-extract); - # Tests depend on `parseTime` which is no longer available hourglass = dontCheck super.hourglass; 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 3c0b1d5aa0a0..66b9dba53ac5 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -76,12 +76,6 @@ in { ] ++ drv.testFlags or []; }) (doJailbreak super.hpack); - # Apply patches from head.hackage. - language-haskell-extract = appendPatch (pkgs.fetchpatch { - url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch"; - sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv"; - }) (doJailbreak super.language-haskell-extract); - # Tests depend on `parseTime` which is no longer available hourglass = dontCheck super.hourglass; 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 dee8649dc814..18923ac9a310 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -143,12 +143,6 @@ self: super: { # https://github.com/dreixel/syb/issues/40 syb = dontCheck super.syb; - # Support for template-haskell >= 2.16 - language-haskell-extract = appendPatch (pkgs.fetchpatch { - url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch"; - sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv"; - }) (doJailbreak super.language-haskell-extract); - # Patch 0.17.1 for support of mtl-2.3 xmonad-contrib = appendPatch (pkgs.fetchpatch { -- cgit 1.4.1