-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Add miscellaneous OCaml Packages #8291
Conversation
Thanks. Here are some remarks. You may want to add yourself as maintainer of the packages that you introduce. Bitstring-2.0.4 is broken in OCaml-4.02 (for instance, run the test suite and see test_18 fail). See e.g., https://code.google.com/p/bitstring/source/detail?r=5997a66d9b078d75f821eedc9ba615c9df321e98 for discussion. I don’t see the point in fixing individual packages to make them compatible with the broken Please make sure that all your packages (e.g., |
@vbgl: In the case of bitstring, would you reccomend that I make a package pointing at a git snapshot then? My end goal is to build a package which depends both on cohttp and bitstring, and the cohttp derivation currently has a minimum OCaml version of 4.02. As far as fixing ocamlbuild goes, the OCaml maintainers think this is hard and have punted on it until sometime after the release of 4.02.2. Their suggested solution, putting camlp4 into the compiler directory, is not really nix-compatible, and would require me to modify deeper/more important packages (e.g. the ocaml package). I agree that it would be nice to have a fixed ocamlbuild, but that seems to leave the realm of packaging and go into working on OCaml's tooling. |
@vbgl I went ahead and bumped bitstring to latest git. Let me know if you have another strategy for dealing with optcomp - I agree what I did is ugly, but doing it the right way would involve getting a consensus from the OCaml community first on what is for them a low priority issue (since basically only nix users have this issue). |
My opinion is that the patch for |
OK. I didn't know such a patch was already written - the bug seemed to make me think that there was something tricky about fixing ocamlbuild I was missing. I'll wait for #8296 to go in and then edit these commits to be in line with it. (Looks like I should just need to remove the ulex fix and revisit optcomp and see if it works once your ocamlbuild patch is in.) |
@maurer, would you like to test the camlp4/ocamlbuild fix? If you confirm that it works, I’ll merge the corresponding PR and this one. Thanks for your contribution. |
I rebased my change on top of yours, removing the |
Fixed the typo. I'm kind of surprised it built like that. |
{stdenv, buildOcaml, fetchurl, herelib, camlp4}: | ||
|
||
buildOcaml rec { | ||
minimumSupportedOcamlVersion = "4.02"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can relax this constraint to 4.00.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I was following the pattern I'd seen in the repo previously (plus, it had deps on 4.02-only herelib, so I couldn't test it with earlier than 4.02)
@vbgl: Anything else I need to do to get this merged? |
|
||
buildInputs = [ocaml findlib]; | ||
|
||
configurePhase = "ocaml setup.ml -configure --destdir $prefix"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be --prefix
rather than --destdir
: look at where uuidtrip
gets installed.
It would be nice to:
Thanks a lot. |
@vgbl I think I addressed all your concerns. By the way, are you doing all this checking by hand, or is there a set of linter scripts somewhere to help find these things (e.g. the misinstalled binary, the the typo'd maintainer field) |
Nice. The typo has been found by Travis CI; otherwise, it’s all manual review. Is the file |
It is not directly referenced, but I felt bad adding the git version of a package without the latest stable, even if stable is not the default. |
If you want to keep the two versions of the package, with different defaults for different versions of OCaml, you can look at what is done for |
Thanks, I've done just that (it now uses bitstring 2.0.4 for ocaml earlier than 4.02, and the git commit I selected for 4.02 and higher). |
I know have the following error when fetching the source of
I don’t know what this means. |
Looks like fetchgit started doing non deep clones by default, and google code does not support this. I already had it in my nix-store, so I didn't notice this. I think the change I made should fix it though. |
Looks like the hash is wrong now. When you test, you can remove the sources that are already in the store using something like
I don’t really understand what’s going on, but the following works for me:
Same hash as before, the rev is a little bit shorter. |
Reading the I changed it to your version and have pushed. Hopefully there aren't too many hosts that don't support shallow cloning, or we may need to talk to the prefetch-git people about yet another option (e.g. deep clone, but still gc the repo before hashing). |
Hurrah ! let’s move on. |
Changes Unknown when pulling 9c0f1ee on maurer:misc-ocaml into ** on NixOS:master**. |
Miscellaneous OCaml packages, plus updates to some existing ones so they will build against ocaml 4.02.1