From 0dd2e005638c3697738a12dad102ffb18fd3df12 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 16 Apr 2024 22:52:52 +0200 Subject: [PATCH] haskell.packages.ghc{810,90}.hashable: don't pull in os-string os-string only becomes a dependency after GHC 9.2 and can't be built with these older compilers. Fixes build of elmPackages.elm-instrument. --- .../development/haskell-modules/configuration-ghc-8.10.x.nix | 5 ++++- pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 c1a8e7238482..3e7907689822 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -60,11 +60,14 @@ self: super: { system-cxx-std-lib = null; # For GHC < 9.4, some packages need data-array-byte as an extra dependency + # For GHC < 9.2, os-string is not required. primitive = addBuildDepends [ self.data-array-byte ] super.primitive; hashable = addBuildDepends [ self.data-array-byte self.base-orphans - ] super.hashable; + ] (super.hashable.override { + os-string = null; + }); # Too strict lower bounds on base primitive-addr = doJailbreak super.primitive-addr; 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 4b21ad57fa29..cdaa712ecd9a 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -60,10 +60,13 @@ self: super: { # For GHC < 9.4, some packages need data-array-byte as an extra dependency primitive = addBuildDepends [ self.data-array-byte ] super.primitive; + # For GHC < 9.2, os-string is not required. hashable = addBuildDepends [ self.data-array-byte self.base-orphans - ] super.hashable; + ] (super.hashable.override { + os-string = null; + }); # Too strict lower bounds on base primitive-addr = doJailbreak super.primitive-addr;