-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
haskell-cabal-bounds: New expression #2311
Conversation
@@ -2870,6 +2877,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x | |||
|
|||
cabal2nix = callPackage ../development/tools/haskell/cabal2nix {}; | |||
|
|||
cabalBounds = callPackage ../development/tools/haskell/cabal-bounds { | |||
cabal = self.cabal_1_18; |
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.
What's going on here?
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 don't know why I added this line anymore, everything seems to work fine without this. Removed it.
There seems to be quite a bit of hacking going on here - could you explain what this is? |
I need to depend on Cabal_1_18_1_3 because |
@@ -119,6 +119,13 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x | |||
glibcLocales = if pkgs.stdenv.isLinux then pkgs.glibcLocales else null; | |||
}; | |||
|
|||
cabal_1_18 = callPackage ../build-support/cabal { |
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.
Why does this expression duplicate most of the arguments to cabal
instead of overriding the one that wants to change, i.e. Cabal
?
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.
Also, why does cabal_1_18
exist in the first place? No-one seems to use it?
I just upgraded to version 0.4.1, whose tests require Cabal 1.20 to work, so I removed the hack and disabled testing. |
@@ -2870,6 +2870,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x | |||
|
|||
cabal2nix = callPackage ../development/tools/haskell/cabal2nix {}; | |||
|
|||
cabalBounds = callPackage ../development/tools/haskell/cabal-bounds { | |||
Cabal = self.Cabal_1_18_1_3; |
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.
Is that override still required with a disabled test suite?
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.
Yes, cabal bounds requires Cabal >= 1.18 (compile error on older versions)
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.
So what happens on newer compilers? It would be nice if the old Cabal version wouldn't have to be built unnecessarily when compiling the package.
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 overriding Cabal is not the right thing to do, what are you suggesting could I do instead?
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.
You could use pkgs.stdenv.lib.versionOlder "x.y" ghc.version
to override Cabal only iff GHC has a version that's older than the one we need. On platforms that have Cabal >= 1.18, you can pass null
instead.
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.
Ok, fixed
EDIT: For some reason, it still tries to build Cabal ...
EDIT2: It should work now
Rebased on master, so it should now merge without conflicts |
haskell-cabal-bounds: New expression
@peti Can you merge the commit the I just added? |
Ah, I found out why versionAtLeast didn't work. The argument order for versionAtLeast is opposite ... how confusing. |
Pushed 8310c6a. |
Thanks :) |
No description provided.