Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75cae0a

Browse filesBrowse files
authored
Fix building stack projects with hix (#1998)
The default compiler-nix-name provided for hix projects conflicts with the one implied by the `stack.yaml` `resolver`. Fixes #1997
1 parent dbca7d8 commit 75cae0a
Copy full SHA for 75cae0a

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed

‎modules/hix-project.nix

Copy file name to clipboardExpand all lines: modules/hix-project.nix
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, ... }: {
1+
{ config, lib, ... }: {
22
_file = "haskell.nix/modules/hix-project.nix";
33
options = {
44
# These are options that only the Hix command wrappers use. If you make a flake
@@ -40,8 +40,10 @@
4040
};
4141
};
4242

43-
# Default values for other project options (things that do not have defaults for non hix projects)
44-
config = {
45-
compiler-nix-name = lib.mkDefault "ghc8107";
43+
# Default value for compiler-nix-name (does not have a default for non hix projects).
44+
# Stack projects do not require a default as the `resolver` in the `stack.yaml`
45+
# specifies one.
46+
config = lib.mkIf (!config ? "stackYaml") {
47+
compiler-nix-name = lib.mkDefault "ghc945";
4648
};
4749
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.