forked from input-output-hk/stack2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migration to Stack 2 #2
Open
nh2
wants to merge
11
commits into
master
Choose a base branch
from
stack2-nh2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Most importantly for me, fixes `integer-simple` being missing from the list, which resulted in `static-haskell-nix` not being able to build static exes using `integer-simple` if the package set was generated by `stack2nix`. Also updates the list to recent GHCs and adds commentary.
Update/correct boot packages list.
See input-output-hk#84, input-output-hk#167. Using https://github.com/bgamari/ghc-utils/tree/master/library-versions for it, as a lookup Map compiled into the binary using TH.
Prevents stack2nix generating `src = ./.` as the path for the project stack2nix is run against. The output of stack.nix (a `.nix` file containing that `src`) is often added to the nix store, `./.` would add the contents of the entire `/nix/store` as `src`!
Without a GHC on PATH, stack complains: stack2nix: No compiler found, expected minor version match with ghc-8.10.4 (x86_64) (based on resolver setting ... stack2nix never uses GHC, so accepting any GHC should be fine.
This was referenced Jul 12, 2021
nh2
added a commit
to nh2/static-haskell-nix
that referenced
this pull request
Jul 12, 2021
This uses @qrilka's work from nh2/stack2nix#1, now moved to nh2/stack2nix#2. Unfortunately, this introduces a backwards incompatibility for stack users: The `stack2nix-script` nix expression now needs to be passed `inherit compiler`, to satisfy stack complaining if there's no matching GHC on PATH (even though we don't use it). I haven't found a way around that yet. Example change that users need to make in their `default.nix` for building stack projects statically: stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" { inherit pkgs; + inherit compiler; stack-project-dir = toString ./.; # where stack.yaml is hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions };
nh2
added a commit
to nh2/static-haskell-nix
that referenced
this pull request
Jul 12, 2021
This uses @qrilka's work from nh2/stack2nix#1, now moved to nh2/stack2nix#2. Unfortunately, this introduces a backwards incompatibility for stack users: The `stack2nix-script` nix expression now needs to be passed `inherit compiler`, to satisfy stack complaining if there's no matching GHC on PATH (even though we don't use it). I haven't found a way around that yet. Example change that users need to make in their `default.nix` for building stack projects statically: stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" { inherit pkgs; + inherit compiler; stack-project-dir = toString ./.; # where stack.yaml is hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions };
nh2
added a commit
to nh2/static-haskell-nix
that referenced
this pull request
Jul 20, 2021
This uses @qrilka's work from nh2/stack2nix#1, now moved to nh2/stack2nix#2. Unfortunately, this introduces a backwards incompatibility for stack users: The `stack2nix-script` nix expression now needs to be passed `inherit compiler`, to satisfy stack complaining if there's no matching GHC on PATH (even though we don't use it). I haven't found a way around that yet. Example change that users need to make in their `default.nix` for building stack projects statically: stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" { inherit pkgs; + inherit compiler; stack-project-dir = toString ./.; # where stack.yaml is hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions };
This is working, and static-haskell-nix uses it since PR nh2/static-haskell-nix#98. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on PR #1 by @qrilka who did most of this work (but I cannot push commits on that branch).
Seems to work!