[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Dependencies for project built on Mirage
On 20 February 2016 at 21:08, Sean Grove <sean@xxxxxxxx> wrote: > I want to wrap up my site built using Mirage so that it's as convenient as > possible for others to clone, edit, run, and deploy it. > > 1. I'm unclear on whether I should put the project dependencies in the opam > file, or in the config.ml file > https://github.com/mirage/mirage-skeleton/blob/master/static_website/config.ml#L49 The dependencies go in the config.ml file, because they will be different depending on whether you configure for Unix or Xen. There should be no opam file for a unikernel. Incidentally, I wonder if we should change the syntax so that OPAM packages and ocamlfind libraries are specified together? e.g. instead of: foreign ~libraries:["irmin.mem"; "tls.mirage"] ~packages:["irmin"; "tls"] "Unikernel.Main" ... maybe we should have something like: foreign ~packages:[ "irmin", ["irmin.mem"]; "tls", ["tls.mirage"]; ] "Unikernel.Main" ... Then it's obvious which OPAM package provides each library and it's harder for them to get out of sync. > I've added everything to the config.ml file (though I have to re-add it to > the merlin file as well, manually keeping things in sync) so that it runs > just fine, but is this the way to distribute it for others to hack on? Yes. Ideally, I think mirage should generate the .merlin file for you (and maybe an "opam" file too?) at configure time, but currently it doesn't. > 2. Can someone clarify how these pieces fit together, along with with there > are two commands: > > add_to_ocamlfind_libraries > add_to_opam_packages > > And whether I should be duplicating packages between them? I believe these are deprecated and you should use the attributes on foreign instead. > 3. I'm using menhir in my project, and the source for that code is in a > subdir, liquid/, so when running ocamlbuild I need to include the flags `-I > liquid -use-menhir`. The makefile that's generated from `mirage configure > --unix` doesn't include these flags, and obviously overrides any changes I > make to it. Where should I be configuring this kind of thing? You could perhaps put them in your _tags/myocamlbuild.ml file. The build system is not ideal... -- Dr Thomas Leonard http://roscidus.com/blog/ GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |