Skip to content
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

Cannot build with nix #62

Closed
yaitskov opened this issue Mar 15, 2021 · 4 comments
Closed

Cannot build with nix #62

yaitskov opened this issue Mar 15, 2021 · 4 comments

Comments

@yaitskov
Copy link

yaitskov commented Mar 15, 2021

Hi.

I modified library and wanted build with nix just from git, nix fails.
It looks like it cannot handle inclusion of package.common.yaml with macros. I face such trick first time. What is the technology used?

*** hpack error: "/nix/store/pa122xh2pjk86w228ld7v7cbcl9k3s5v-source
/package.yaml: 
Yaml file not found: /home/dan/demo/haskell/conferer/conferer/utils/package.common.yaml". 
Exiting.

  myhaskellPackages = haskell.packages.ghc8104.extend (self: super: {

    conferer = self.callCabal2nix "conferer" ../../haskell/conferer/conferer
/packages/conferer {};

@ludat
Copy link
Owner

ludat commented Mar 16, 2021

Hmm, I don't use nix but I think you could simply ignore the package.yml (so avoid using hpack at all) since the conferer.cabal is commited and we always keep up to date.

@yaitskov
Copy link
Author

I am working with nix for a few weeks.
I use callCabal2nix command it looks into package.yaml (hpack) :)

@ludat
Copy link
Owner

ludat commented Mar 17, 2021

So this is something that's part of the yaml spec, it's called anchors, I think the problem probably is that when you build the package you are only providing nix with the packages/conferer directory and that's not enough. But you can try avoiding hpack completely, maybe there is a flag you can pass to callCabal2nix or maybe you could delete the package.yaml before calling it.

@yaitskov
Copy link
Author

Thanks for explanations. I forwarded issue to hpack tracker.

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

No branches or pull requests

2 participants