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

Provide the ability to read dependencies from an opam file #51

Open
dysinger opened this issue Jun 7, 2019 · 1 comment
Open

Provide the ability to read dependencies from an opam file #51

dysinger opened this issue Jun 7, 2019 · 1 comment

Comments

@dysinger
Copy link
Contributor

dysinger commented Jun 7, 2019

When building a binary in the style of "examples/opam-dependencies" it would be nice to load an opam file instead of describing all the dependencies (yet again) in a toSpec. Dune (the build tool) does this.

I have a MirageOS unikernel that builds with the command line build tool "mirage." The binary that it spits out may or may not even run on the host that built it (not without a hypervisor anyway.) So I need to load the opam file and build with stdenv.mkDerivation phases.

@timbertson
Copy link
Owner

timbertson commented Jun 16, 2019

I'm a little confused. I understand what you mean, but I don't quite know why you need it. examples/opam-library doesn't make you to specify your deps in nix, it just uses the existing opam file. It sounds like you want to have an opam file but only use it to specify deps, not build instructions?

I also have a mirage project https://github.com/timbertson/passe/, but it's got a bunch of different backends so the build is all in nix, I wasn't able to represent it terribly well in plain opam files. Maybe that's what you're getting at with your second paragraph but I don't entirely follow. If you can't specify your build instructions in an .opam file, why are you using one?

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