Skip to content

Add pkg-config to the shell #4906

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

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Add pkg-config to the shell #4906

merged 1 commit into from
Oct 13, 2022

Conversation

zeme-iohk
Copy link

@zeme-iohk zeme-iohk commented Oct 12, 2022

After integrating CHaP, nix develop stopped working on Darwin.
That is, running cabal build all would yield:

Error: cabal: Could not resolve dependencies:
[__0] trying: plutus-core-1.0.0.0 (user goal)
[__1] next goal: inline-r (dependency of plutus-core)
[__1] rejecting: inline-r-0.10.5, inline-r-0.10.4, inline-r-0.10.3,
inline-r-0.10.2, inline-r-0.10.1, inline-r-0.10, inline-r-0.9.2,
inline-r-0.9.1, inline-r-0.9.0.2, inline-r-0.9.0.1, inline-r-0.9.0.0,
inline-r-0.8.0.1, inline-r-0.8.0.0, inline-r-0.7.3.0, inline-r-0.7.2.0,
inline-r-0.7.1.2, inline-r-0.7.1.1, inline-r-0.7.1.0, inline-r-0.7.0.0
(conflict: pkg-config package libR>=3.0, not found in the pkg-config database)
[__1] fail (backjumping, conflict set: inline-r, plutus-core)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: inline-r, plutus-core

Turns out that when cabal.project contains no source-repository-package stanzas then haskell.nix does not include pkg-config in its devshell's buildInputs.

@zeme-iohk zeme-iohk requested a review from michaelpj October 12, 2022 19:15
@michaelpj
Copy link
Contributor

I guess this is being fixed by input-output-hk/haskell.nix#1751? Please add a note so we know to remove it when that's merged.

@jbgi
Copy link
Contributor

jbgi commented Oct 13, 2022

No, input-output-hk/haskell.nix#1751 was for another issue, that occurred for shell with cross-compilation support.

@michaelpj
Copy link
Contributor

Okay, could one of you make a haskell.nix issue for this? It seems like a bug in the devshell support: it should have the same things as the main haskell.nix shell, which seems to do the right thing.

@jbgi
Copy link
Contributor

jbgi commented Oct 13, 2022

No the main haskell.nix shell had the same issue. pkg-config was removed from it. (hence removed from devshell as well).

@zeme-iohk
Copy link
Author

zeme-iohk commented Oct 13, 2022

Actually it's a little subtler no?

  • nix develop .#x86_64-darwin.plutus.library.plutus-project.shell does not provide pkg-config
  • nix develop .#x86_64-darwin.plutus.library.plutus-project.devshell does not provide pkg-config either
  • but project.shellFor does, and it does so implicitly (it doesn't come from the added nativeBuildInputs)

@michaelpj
Copy link
Contributor

Yes, my understanding was that it worked fine in the haskell.nix shell for @zeme-iohk ? Either way, this should definitely be fixed upstream -> need an issue.

@zeme-iohk
Copy link
Author

I opened an issue here input-output-hk/haskell.nix#1753
And added a comment to the nix
@hamishmack @jbgi

@zeme-iohk zeme-iohk force-pushed the zeme-iohk/fix-darwin-build branch from 28a310d to c011f28 Compare October 13, 2022 13:59
@zeme-iohk zeme-iohk enabled auto-merge (squash) October 13, 2022 14:06
@zeme-iohk zeme-iohk merged commit 1f58c26 into master Oct 13, 2022
@zeme-iohk zeme-iohk deleted the zeme-iohk/fix-darwin-build branch October 13, 2022 14:19
brainrake pushed a commit to mlabs-haskell/plutus that referenced this pull request Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants