Skip to content

Commit 606626c

Browse files
authored
Fix GHC 9.12 stackage projects (#2422)
Fixes #2420
1 parent 3c9bde2 commit 606626c

File tree

5 files changed

+143
-1
lines changed

5 files changed

+143
-1
lines changed

overlays/ghc-packages.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ let
8888
ghc-internal = "libraries/ghc-internal";
8989
} // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.10" >= 0) {
9090
ghc-toolchain = "utils/ghc-toolchain";
91+
} // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.12" >= 0) {
92+
ghc-experimental = "libraries/ghc-experimental";
93+
haddock-api = "utils/haddock/haddock-api";
9194
};
9295

9396
# The nix produced by `cabalProject` differs slightly depending on

test/stack-simple/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ with lib;
55
let
66
project = pkgs.haskell-nix.stackProject' {
77
src = testSrc "stack-simple";
8+
stackYaml = "stack-${compiler-nix-name}.yaml";
89
inherit evalPackages;
910
};
1011

1112
packages = project.hsPkgs;
1213

1314
in pkgs.recurseIntoAttrs {
14-
meta.disabled = compiler-nix-name != "ghc984";
15+
meta.disabled = !builtins.pathExists ./stack-${compiler-nix-name}.yaml;
1516
stack-simple-exe = (haskellLib.check packages.stack-simple.components.exes.stack-simple-exe) // {
1617
# Attributes used for debugging with nix repl
1718
inherit pkgSet packages;

test/stack-simple/stack-ghc9102.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This file was automatically generated by 'stack init'
2+
#
3+
# Some commonly used options have been documented as comments in this file.
4+
# For advanced use and comprehensive documentation of the format, please see:
5+
# https://docs.haskellstack.org/en/stable/yaml_configuration/
6+
7+
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8+
# A snapshot resolver dictates the compiler version and the set of packages
9+
# to be used for project dependencies. For example:
10+
#
11+
# resolver: lts-3.5
12+
# resolver: nightly-2015-09-21
13+
# resolver: ghc-7.10.2
14+
#
15+
# The location of a snapshot can be provided as a file or url. Stack assumes
16+
# a snapshot provided as a file might change, whereas a url resource does not.
17+
#
18+
# resolver: ./custom-snapshot.yaml
19+
# resolver: https://example.com/snapshots/2018-01-01.yaml
20+
resolver: nightly-2025-07-14
21+
22+
# User packages to be built.
23+
# Various formats can be used as shown in the example below.
24+
#
25+
# packages:
26+
# - some-directory
27+
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
28+
# - location:
29+
# git: https://github.com/commercialhaskell/stack.git
30+
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
31+
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
32+
# subdirs:
33+
# - auto-update
34+
# - wai
35+
packages:
36+
- .
37+
# Dependency packages to be pulled from upstream that are not in the resolver
38+
# using the same syntax as the packages field.
39+
# (e.g., acme-missiles-0.3)
40+
extra-deps:
41+
# Work around http://hackage.haskell.org/package/transformers-0.5.5.0/transformers.cabal
42+
# This is the version of transformers which ships with GHC-8.6.4
43+
- transformers-0.5.6.2
44+
# ghc-8.6.4 ships with process-1.6.5.0, not 1.6.3.0 as stackage claims. 1.6.3.0 isn't even compatible with
45+
# base 4.12 that ghc ships.
46+
- process-1.6.5.0
47+
# Override default flag values for local packages and extra-deps
48+
# flags: {}
49+
50+
# Extra package databases containing global packages
51+
# extra-package-dbs: []
52+
53+
# Control whether we use the GHC we find on the path
54+
# system-ghc: true
55+
#
56+
# Require a specific version of stack, using version ranges
57+
# require-stack-version: -any # Default
58+
# require-stack-version: ">=1.9"
59+
#
60+
# Override the architecture used by stack, especially useful on Windows
61+
# arch: i386
62+
# arch: x86_64
63+
#
64+
# Extra directories used by stack for building
65+
# extra-include-dirs: [/path/to/dir]
66+
# extra-lib-dirs: [/path/to/dir]
67+
#
68+
# Allow a newer minor version of GHC than the snapshot specifies
69+
# compiler-check: newer-minor

test/stack-simple/stack-ghc9122.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This file was automatically generated by 'stack init'
2+
#
3+
# Some commonly used options have been documented as comments in this file.
4+
# For advanced use and comprehensive documentation of the format, please see:
5+
# https://docs.haskellstack.org/en/stable/yaml_configuration/
6+
7+
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8+
# A snapshot resolver dictates the compiler version and the set of packages
9+
# to be used for project dependencies. For example:
10+
#
11+
# resolver: lts-3.5
12+
# resolver: nightly-2015-09-21
13+
# resolver: ghc-7.10.2
14+
#
15+
# The location of a snapshot can be provided as a file or url. Stack assumes
16+
# a snapshot provided as a file might change, whereas a url resource does not.
17+
#
18+
# resolver: ./custom-snapshot.yaml
19+
# resolver: https://example.com/snapshots/2018-01-01.yaml
20+
resolver: nightly-2025-07-26
21+
22+
# User packages to be built.
23+
# Various formats can be used as shown in the example below.
24+
#
25+
# packages:
26+
# - some-directory
27+
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
28+
# - location:
29+
# git: https://github.com/commercialhaskell/stack.git
30+
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
31+
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
32+
# subdirs:
33+
# - auto-update
34+
# - wai
35+
packages:
36+
- .
37+
# Dependency packages to be pulled from upstream that are not in the resolver
38+
# using the same syntax as the packages field.
39+
# (e.g., acme-missiles-0.3)
40+
extra-deps:
41+
# Work around http://hackage.haskell.org/package/transformers-0.5.5.0/transformers.cabal
42+
# This is the version of transformers which ships with GHC-8.6.4
43+
- transformers-0.5.6.2
44+
# ghc-8.6.4 ships with process-1.6.5.0, not 1.6.3.0 as stackage claims. 1.6.3.0 isn't even compatible with
45+
# base 4.12 that ghc ships.
46+
- process-1.6.5.0
47+
# Override default flag values for local packages and extra-deps
48+
# flags: {}
49+
50+
# Extra package databases containing global packages
51+
# extra-package-dbs: []
52+
53+
# Control whether we use the GHC we find on the path
54+
# system-ghc: true
55+
#
56+
# Require a specific version of stack, using version ranges
57+
# require-stack-version: -any # Default
58+
# require-stack-version: ">=1.9"
59+
#
60+
# Override the architecture used by stack, especially useful on Windows
61+
# arch: i386
62+
# arch: x86_64
63+
#
64+
# Extra directories used by stack for building
65+
# extra-include-dirs: [/path/to/dir]
66+
# extra-lib-dirs: [/path/to/dir]
67+
#
68+
# Allow a newer minor version of GHC than the snapshot specifies
69+
# compiler-check: newer-minor
File renamed without changes.

0 commit comments

Comments
 (0)