From 7b203a8cdf9d12ac2ef116f27c5454fb53e8e7fd Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 29 May 2026 11:45:29 +0200 Subject: [PATCH] haskell.packages.ghc9{0,4,6}.semaphore-compat: keep using 1.0.0 semaphore-compat 2.0.0 has just been released, but no GHC ships it as a core package yet, so using 1.0.0 for GHC <9.8 makes more sense as it matches Stackage Nightly. --- .../configuration-ghc-9.0.x.nix | 2 +- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) 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 1fffe94c2a2c..45996a0a113a 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -41,7 +41,7 @@ self: super: { # core pkgs on later GHCs that we can reasonably provide a stub # or Hackage released version for (though they may not build). Cabal-syntax = self.Cabal-syntax_3_6_0_0; - semaphore-compat = self.semaphore-compat_2_0_0; + semaphore-compat = self.semaphore-compat_1_0_0; os-string = self.os-string_2_0_10; file-io = self.file-io_0_2_0; # Would need 2.25.*, but let's not bother diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 4fc015f6b294..38ff50a1186f 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -119,6 +119,7 @@ extra-packages: - ormolu == 0.7.4.0 # 2023-09-21: for ghc-lib-parser 9.8 compat - path == 0.9.5 # 2025-09-21: Pin for hls on ghc 9.4 - postgresql-binary < 0.14 # 2025-01-19: Needed for building postgrest + - semaphore-compat == 1.0.* # 2026-05-27: Match GHC 9.2 / Stackage Nightly - shake-cabal < 0.2.2.3 # 2023-07-01: last version to support Cabal 3.6.* - ShellCheck == 0.9.0 # 2024-03-21: pinned by haskell-ci - simple-get-opt < 0.5 # 2025-05-01: for crux-0.7.2 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index d3be4304a3da..09eb41819830 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -609510,6 +609510,30 @@ self: { } ) { }; + semaphore-compat_1_0_0 = callPackage ( + { + mkDerivation, + base, + exceptions, + unix, + }: + mkDerivation { + pname = "semaphore-compat"; + version = "1.0.0"; + sha256 = "1qnrdqayrdazmsflh37p1igd25nh1cfgn4k1v3jwwb0w0amnyvhw"; + revision = "4"; + editedCabalFile = "1sgk940k24ig1r50ycz4w79591hqjys4sdmfifgsr6zcq3183zrd"; + libraryHaskellDepends = [ + base + exceptions + unix + ]; + description = "Cross-platform abstraction for system semaphores"; + license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause"; + hydraPlatforms = lib.platforms.none; + } + ) { }; + semaphore-compat_2_0_0 = callPackage ( { mkDerivation,