From 5ce18d02f580b7de4df9d5eceb7feb05b0c54c51 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 29 Feb 2024 14:22:17 +1300 Subject: [PATCH] Better fix for `os-string` --- modules/configuration-nix.nix | 8 ++++++++ test/cabal.project.local | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/configuration-nix.nix b/modules/configuration-nix.nix index 169118c715..ed0a3767fd 100644 --- a/modules/configuration-nix.nix +++ b/modules/configuration-nix.nix @@ -168,6 +168,14 @@ in { packages.ghci.flags.ghci = true; packages.ghci.flags.internal-interpreter = true; + # These flags are set by hadrian. This would be fine if: + # * Haskell.nix respected `pre-existing` packages in `plan.json` and used the hadrian built version. + # * If `plan.json` included the flag settings used by `pre-existing` packages. + # For now the work around is to set the flags that hadrian does (see hadrian/src/Settings/Packages.hs). + packages.unix.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + packages.directory.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + packages.win32.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; }; + # See https://github.com/Bodigrim/bitvec/pull/61 packages.bitvec.patches = [ (fromUntil "1.1.3.0" "1.1.3.0.1" ../patches/bitvec-gmp-fix.patch) diff --git a/test/cabal.project.local b/test/cabal.project.local index a1e2b4bbe3..497c08b7f0 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -6,7 +6,6 @@ if impl(ghc>=9.8) allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal if impl(ghc > 9.9) allow-newer: *:containers - constraints: os-string >=2.0.2 repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/