diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2016-09-23 19:55:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-23 19:55:10 +0200 |
commit | ac8206e31d92f8325d4ede3d57df9cb9905a9c7a (patch) | |
tree | bca1ece0ba49ad1054f6886d338934040decd918 /pkgs/development/ocaml-modules | |
parent | 057bfdb689748373a8514f1150e4787d6a1f0d7d (diff) | |
parent | 08b85f5f9917cad708faab7fc81b1c155d478328 (diff) | |
download | nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar.gz nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar.bz2 nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar.lz nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar.xz nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.tar.zst nixlib-ac8206e31d92f8325d4ede3d57df9cb9905a9c7a.zip |
Merge pull request #17147 from regnat/ocamlUpdates
ocamlPackages : update some packages
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_tools/default.nix | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index 377dc32751a7..33bf180cd7f3 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -1,21 +1,30 @@ -{ stdenv, fetchzip, ocaml, findlib }: +{ stdenv, fetchFromGitHub, ocaml, findlib }: -stdenv.mkDerivation { - name = "ocaml-ppx_tools-5.0+4.02"; - src = fetchzip { - url = https://github.com/alainfrisch/ppx_tools/archive/5.0+4.02.0.tar.gz; - sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"; - }; +let + version = + if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03" then "5.0+4.03.0" else "5.0+4.02.0"; +in + stdenv.mkDerivation { + name = "ocaml-ppx_tools-${version}"; + src = fetchFromGitHub { + owner = "alainfrisch"; + repo = "ppx_tools"; + rev = version; + sha256 = if version == "5.0+4.03.0" + then "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg" + else "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8" + ; + }; - buildInputs = [ ocaml findlib ]; + buildInputs = [ ocaml findlib ]; - createFindlibDestdir = true; + createFindlibDestdir = true; - meta = with stdenv.lib; { - description = "Tools for authors of ppx rewriters"; - homepage = http://www.lexifi.com/ppx_tools; - license = licenses.mit; - platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ vbgl ]; - }; -} + meta = with stdenv.lib; { + description = "Tools for authors of ppx rewriters"; + homepage = http://www.lexifi.com/ppx_tools; + license = licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ vbgl ]; + }; + } |