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

Fix building stack projects with hix #1998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions 10 modules/hix-project.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }: {
{ config, lib, ... }: {
_file = "haskell.nix/modules/hix-project.nix";
options = {
# These are options that only the Hix command wrappers use. If you make a flake
Expand Down Expand Up @@ -40,8 +40,10 @@
};
};

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be more straight forward to bump the priority of compiler-nix-name in the stack modules? So whatever stack.yaml says wins (perhaps still allowing user override)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nicer, but compiler-nix-name is in the project level module. I think there is a compiler.nix-name in the other modules, but we don't currently use it to set the project level compiler-nix-name (only the other way around).

Is it ok if we merge this for now and improve it if we can in the refactoring of the modules?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok if we merge this for now and improve it if we can in the refactoring of the modules?

Sure, go head. Sorry for making you wait, I wrote that comment just as you opened the PR but I didn't realise I had "started a review" rather than "add a single comment". I'll approve now.

};
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.