From d080f9fc66814a4169d569a65975cdb712b96f4b Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 3 Nov 2024 13:02:42 +0100 Subject: [PATCH 1/4] postgrest: add myself as maintainer --- .../haskell-modules/configuration-hackage2nix/main.yaml | 2 ++ pkgs/development/haskell-modules/hackage-packages.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 960d784c07df4..ed1883ad422a3 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -652,6 +652,8 @@ package-maintainers: - minio-hs - smtp-mail - pdftotext + wolfgangwalther: + - postgrest unsupported-platforms: Allure: [ platforms.darwin ] diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 540563af00303..1652e68939dcf 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -245987,6 +245987,7 @@ self: { description = "REST API for any Postgres database"; license = lib.licenses.mit; mainProgram = "postgrest"; + maintainers = [ lib.maintainers.wolfgangwalther ]; }) {}; "postgrest-ws" = callPackage From 47a22a4271aa511f65fede042f03343df1f8df11 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 3 Nov 2024 13:26:48 +0100 Subject: [PATCH 2/4] postgrest: remove mentioned issue for jailbreaking This has been closed and merged since v11 already - but the bounds are still too strict. The only way forward is to figure out how to upgrade to the latest version. --- pkgs/development/haskell-modules/configuration-common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 8078db8925de0..2e7cce75adeae 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2839,7 +2839,7 @@ self: super: { postgrest = lib.pipe super.postgrest [ # 2023-12-20: New version needs extra dependencies (addBuildDepends [ self.extra self.fuzzyset_0_2_4 self.cache self.timeit ]) - # 2022-12-02: Too strict bounds: https://github.com/PostgREST/postgrest/issues/2580 + # 2022-12-02: Too strict bounds. doJailbreak # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275 (overrideSrc rec { From 2679bd2fd6f339f2d6a4b1fbe7e91c3756c85549 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 3 Nov 2024 13:16:06 +0100 Subject: [PATCH 3/4] postgrest: 12.0.2 -> 12.0.3 Changelog: https://github.com/PostgREST/postgrest/releases/tag/v12.0.3 Can't update to 12.2.x, yet, without figuring out some dependency issues. --- pkgs/development/haskell-modules/configuration-common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 2e7cce75adeae..b2429491482ae 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2843,12 +2843,12 @@ self: super: { doJailbreak # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275 (overrideSrc rec { - version = "12.0.2"; + version = "12.0.3"; src = pkgs.fetchFromGitHub { owner = "PostgREST"; repo = "postgrest"; rev = "v${version}"; - hash = "sha256-fpGeL8R6hziEtIgHUMfWLF7JAjo3FDYQw3xPSeQH+to="; + hash = "sha256-peXM5/K034Phcy5vNhc5AT3/9oGXohVogFN9gRsSosY="; }; }) ]; From c47859a9686fc93236699b3bce05814c787fb3be Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 3 Nov 2024 12:59:56 +0100 Subject: [PATCH 4/4] postgrest: fix build on aarch64-darwin Dependency on the Paths_ module has been removed upstream for the next (unreleased) version already. Until we can update, apply the patch manually. Resolves #347885 --- .../haskell-modules/configuration-common.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b2429491482ae..030b8a4d4379a 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2851,6 +2851,20 @@ self: super: { hash = "sha256-peXM5/K034Phcy5vNhc5AT3/9oGXohVogFN9gRsSosY="; }; }) + # 2024-11-03: Needed for the patch below. Can be dropped after updating to 12.2+. + (appendPatches [ + (fetchpatch { + url = "https://github.com/PostgREST/postgrest/commit/d311fb17c46ad2ab9064c7aba1954d3500ef0e54.patch"; + hash = "sha256-O/bBm93V6GIPSB5dwhNUFgX3vXA01LPJapZQoeJmbIU="; + }) + ]) + # 2024-11-03: Fixes build on aarch64-darwin. Can be removed after updating to 13+. + (appendPatches [ + (fetchpatch { + url = "https://github.com/PostgREST/postgrest/commit/c045b261c4f7d2c2514e858120950be6b3ddfba8.patch"; + hash = "sha256-6SeteL5sb+/K1y3f9XL7yNzXDdD1KQp91RNP4kutSLE="; + }) + ]) ]; # Too strict bounds on hspec < 2.11