You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is expected behaviour or not. I finally managed to build the hackage-security project using new-build on 7.4 after lowering a bound on containers. My project file now looks like:
Running cabal-nix new-build in the hackage-security directory works. However, running cabal-nix new-build --reorder-goals instead tries to build different packages (which is not unexpected, I guess), including (and this I am somewhat surprised about) Cabal-1.22.1.1:
# cabal-nix new-build --reorder-goals
Resolving dependencies...
In order, the following will be built (use -v for more details):
Cabal-1.22.1.1
Cabal-1.23.0.0
tar-0.4.2.2
unbounded-delays-0.1.0.9
tasty-0.11.0.2
tasty-hunit-0.9.2
hackage-security-0.5.0.0
Cabal-1.22 subsequently fails to build on 7.4:
/Users/e/wt/projects/tuf/dist-newstyle/tmp/Cabal-46022/Cabal-1.22.1.1/Distribution/License.hs:60:8:
Could not find module `GHC.Generics'
It is a member of the hidden package `ghc-prim'.
Perhaps you need to add `ghc-prim' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
but I'm not sure why it's building two versions of Cabal here. Adding a constraint on Cabal, as well as some other constraints to help the solver along, to the cabal.project file:
(I just noticed that on 7.8 even without --reorder-goals it's also building Cabal-1.20, in addition to Cabal-1.23; it might have done the same on 7.4, I don't know. Doesn't change the question.)
(And yes, I realize I should be the one to understand this one, having implemented setup dependencies. But I don't think we changed the requirements on setup dependencies for packages without an explicit setup dependencies section, which cabal-install does not have, because we did not know which constraints to generate. I think @dcoutts however did change that behaviour in the nix-local-build branch, if I am not mistaken.)
I reported a similar Cabal issue #2963 and Duncan gave the rationale why this was occurring. I believe that you can fix this by making cabal-install require a version of Cabal (in the cabal-version field) that is more recent than 1.22 and giving it a setup-depends.
I don't know if this is expected behaviour or not. I finally managed to build the hackage-security project using
new-build
on 7.4 after lowering a bound on containers. My project file now looks like:Running
cabal-nix new-build
in the hackage-security directory works. However, runningcabal-nix new-build --reorder-goals
instead tries to build different packages (which is not unexpected, I guess), including (and this I am somewhat surprised about) Cabal-1.22.1.1:Cabal-1.22 subsequently fails to build on 7.4:
but I'm not sure why it's building two versions of
Cabal
here. Adding a constraint onCabal
, as well as some other constraints to help the solver along, to thecabal.project
file:yields the following solver error:
It's this line that confuses me:
Why would the setup dependency of
cabal-install
be onCabal < 1.23
?The text was updated successfully, but these errors were encountered: