haskellPackages.ghcWithPackages: fix for GHC 8.10#85446
Merged
peti merged 0 commit intoNixOS:haskell-updatesfrom Apr 17, 2020
Merged
haskellPackages.ghcWithPackages: fix for GHC 8.10#85446peti merged 0 commit intoNixOS:haskell-updatesfrom
peti merged 0 commit intoNixOS:haskell-updatesfrom
Conversation
Member
|
Please target the |
7 tasks
Contributor
|
@peti Is the intention that this fix wont make it into 20.03? As I'm still seeing it there with the latest that |
Member
|
@seanparsons, I think it would be perfectly fine to port that PR to |
5 tasks
Shimuuar
added a commit
to hexresearch/hschain
that referenced
this pull request
Dec 18, 2020
Unable to create shell. See NixOS/nixpkgs#85446
Shimuuar
added a commit
to hexresearch/hschain
that referenced
this pull request
Jan 11, 2021
Unable to create shell. See NixOS/nixpkgs#85446
Shimuuar
added a commit
to hexresearch/hschain
that referenced
this pull request
Jun 28, 2021
Unable to create shell. See NixOS/nixpkgs#85446
This file contains hidden or 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
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.
This closes #79441.
ghcWithPackages is using
ghc-pkg recacheto build its packagedatabase. By doing so, it overrides the
package.cache[.lock]files.Details are unclear, but GHC 8.10 changed a bit the behavior.
Previously, it was unconditionally replacing the files by new ones. Now
it tries to open (for modification) the files. These files are symlinks
to another nix derivation, which is hence read-only.
This commit removes the files before running
ghc-pkg recache, hence itwill just write the new files.
Tested with
haskellPackages.ghcWithPackages(i.e. GHC 8.8) andhaskell.packages.ghc8101.ghcWithPackages(i.e GHC 8.10) with thefollowing nix file, at the root of the nixpkgs repository:
Then run
/bin/ghciin the derivation andimport PyF, it should import the module fine. I think I usedPyFwithout any lose of generality.This will test with GHC 8.10. Comment out the
overlaysto test withGHC 8.8.
Motivation for this change
Fixing GHC 8.10
ghcWithPackageswhich is currently not usable.Things done
See above comments (Sorry, I did not realize that the template was after my commit message, so I submitted blindly)
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after) (0 changes)