diff options
author | Vincent Laporte <vbgl@users.noreply.github.com> | 2018-06-25 00:47:53 +0200 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-06-25 00:47:53 +0200 |
commit | 8ed38fc722e0a2cb48f47ddbfd419ceb68226564 (patch) | |
tree | 8f608efc176e18eda6d347ae66065ec336921265 /pkgs/development/tools/ocaml | |
parent | 18c99b5be98563790b01ddb8d80413720c5ef01d (diff) | |
download | nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar.gz nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar.bz2 nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar.lz nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar.xz nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.tar.zst nixlib-8ed38fc722e0a2cb48f47ddbfd419ceb68226564.zip |
ocamlPackages.cppo: 1.5.0 -> 1.6.4 (#42342)
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r-- | pkgs/development/tools/ocaml/cppo/default.nix | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/pkgs/development/tools/ocaml/cppo/default.nix b/pkgs/development/tools/ocaml/cppo/default.nix index e778337ca5ca..d7d086e74f97 100644 --- a/pkgs/development/tools/ocaml/cppo/default.nix +++ b/pkgs/development/tools/ocaml/cppo/default.nix @@ -1,30 +1,43 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }: +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, jbuilder }: let pname = "cppo"; - version = "1.5.0"; webpage = "http://mjambon.com/${pname}.html"; in assert stdenv.lib.versionAtLeast ocaml.version "3.12"; -stdenv.mkDerivation rec { - name = "${pname}-${version}"; +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" then { + version = "1.6.4"; + sha256 = "16mlwck0wngr5pmlr8dxc471zzhhcja3mv4xf4n8jm9nhb3iikvh"; + buildInputs = [ jbuilder ]; + extra = { + inherit (jbuilder) installPhase; + }; + } else { + version = "1.5.0"; + sha256 = "1xqldjz9risndnabvadw41fdbi5sa2hl4fnqls7j9xfbby1izbg8"; + extra = { + createFindlibDestdir = true; + makeFlags = "PREFIX=$(out)"; + preBuild = '' + mkdir $out/bin + ''; + }; + } +; in + +stdenv.mkDerivation (rec { + + name = "${pname}-${param.version}"; src = fetchFromGitHub { owner = "mjambon"; repo = pname; - rev = "v${version}"; - sha256 = "1xqldjz9risndnabvadw41fdbi5sa2hl4fnqls7j9xfbby1izbg8"; + rev = "v${param.version}"; + inherit (param) sha256; }; - buildInputs = [ ocaml findlib ocamlbuild ]; - - createFindlibDestdir = true; - - makeFlags = "PREFIX=$(out)"; - - preBuild = '' - mkdir $out/bin - ''; + buildInputs = [ ocaml findlib ocamlbuild ] ++ (param.buildInputs or []); meta = with stdenv.lib; { description = "The C preprocessor for OCaml"; @@ -35,4 +48,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.vbgl ]; license = licenses.bsd3; }; -} +} // param.extra) |