Skip to content

Commit 5ce18d0

Browse files
committed
Better fix for os-string
1 parent da12e7f commit 5ce18d0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

modules/configuration-nix.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ in {
168168
packages.ghci.flags.ghci = true;
169169
packages.ghci.flags.internal-interpreter = true;
170170

171+
# These flags are set by hadrian. This would be fine if:
172+
# * Haskell.nix respected `pre-existing` packages in `plan.json` and used the hadrian built version.
173+
# * If `plan.json` included the flag settings used by `pre-existing` packages.
174+
# For now the work around is to set the flags that hadrian does (see hadrian/src/Settings/Packages.hs).
175+
packages.unix.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; };
176+
packages.directory.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; };
177+
packages.win32.flags = pkgs.lib.optionalAttrs (builtins.compareVersions config.compiler.version "9.9" > 0) { os-string = true; };
178+
171179
# See https://github.com/Bodigrim/bitvec/pull/61
172180
packages.bitvec.patches = [
173181
(fromUntil "1.1.3.0" "1.1.3.0.1" ../patches/bitvec-gmp-fix.patch)

test/cabal.project.local

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ if impl(ghc>=9.8)
66
allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal
77
if impl(ghc > 9.9)
88
allow-newer: *:containers
9-
constraints: os-string >=2.0.2
109

1110
repository head.hackage.ghc.haskell.org
1211
url: https://ghc.gitlab.haskell.org/head.hackage/

0 commit comments

Comments
 (0)