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
Fix haskellPackages.dhall_1_28_0 and spago #75931
Conversation
@@ -637,6 +637,18 @@ self: super: builtins.intersectAttrs super { | |||
cairo = addBuildTool super.cairo self.buildHaskellPackages.gtk2hs-buildtools; | |||
pango = disableHardening (addBuildTool super.pango self.buildHaskellPackages.gtk2hs-buildtools) ["fortify"]; | |||
|
|||
# https://github.com/dhall-lang/dhall-haskell/pull/1422 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expand this comment so that the nixpkgs maintainers will have a better idea when these overrides can be removed (without having to follow the link)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Link was wrong.
dhall-lang/dhall-haskell@dedd5e0
@@ -18,6 +18,7 @@ mkDerivation { | |||
rev = "a4679880402ead320f8be2f091b25d30e27b62df"; | |||
fetchSubmodules = true; | |||
}; | |||
patches = [ ./spago-0.12.1-dhall-1.28.0.patch ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated with cabal2nix
.
Could you instead add these patches to pkgs/developement/haskell/configuration-common.nix
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -0,0 +1,122 @@ | |||
--- a/src/Spago/Config.hs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, we generally don't like to carry around patches in the nixpkgs repo, but instead fetch them from upstream.
Could you pull this patch directly from upstream and apply it using fetchPatch
. If you grep through pkgs/development/haskell-modules/configuration-common.nix
you should be able to find examples of people pulling in patches from GitHub PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
purescript/spago#529 cannot be applied for spago-0.12.1. different patch required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ijaketak Please comment that on top of the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ijaketak Thanks a lot for trying to fix up spago
here.
If you take care of the above problems, we can merge this in.
Alternatively, it may just be a lot easier to create a dhall_1_27_0
derivation and setup spago
so it uses it. See #75449 (comment) where I describe how to do this.
@ijaketak Could you change this line to be https://github.com/NixOS/nixpkgs/pull/75931/files#diff-607a8b2e94748382228f44039b753cf0R660 I messed this up when I originally submitted the PR adding |
@ijaketak I got spago building statically. I did it by just using purescript/spago#528 (comment) This was pretty easy. I recommend you do the same for this PR. |
Let me conclude that this PR is completed as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found two places that should be self
instead of super
(so that they can be further overridden).
Beyond that and adding a comment for the reason of the patch, this change looks good to me.
# https://github.com/dhall-lang/dhall-haskell/commit/dedd5e0ea6fd12f87d887af3d2220eebc61ee8af | ||
dhall_1_28_0 = | ||
let | ||
prettyprinter-ansi-terminal = super.prettyprinter-ansi-terminal.override { prettyprinter = super.prettyprinter_1_5_1; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettyprinter-ansi-terminal = super.prettyprinter-ansi-terminal.override { prettyprinter = super.prettyprinter_1_5_1; }; | |
prettyprinter-ansi-terminal = super.prettyprinter-ansi-terminal.override { prettyprinter = self.prettyprinter_1_5_1; }; |
prettyprinter-ansi-terminal = super.prettyprinter-ansi-terminal.override { prettyprinter = super.prettyprinter_1_5_1; }; | ||
in | ||
super.dhall_1_28_0.override { | ||
prettyprinter = super.prettyprinter_1_5_1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettyprinter = super.prettyprinter_1_5_1; | |
prettyprinter = self.prettyprinter_1_5_1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@ijaketak I'd like to bump spago to 0.13.0, since a new version was just released. Do you mind if I take over this PR for now? I'll get dhall-1.28.0 building (basically using what you currently have here), as well as fix up spago to 0.13.0. |
@cdepillabout No, please take over. |
dhall-lang/dhall-haskell@dedd5e0 This raises the lower bound on prettyprinter to 1.5.1 since `removeTrailingWhitespace` is buggy in earlier versions.
Motivation for this change
Fix #75930. See also purescript/spago#529
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @