diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-06-27 18:10:25 +0000 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-06-27 19:01:18 +0000 |
commit | b475d5f04c5223b98ed0e731b815f1061728ddbf (patch) | |
tree | 832b0154e3d2d2a3c1f3972d1fcf93426e335334 /pkgs/development/ocaml-modules/atd | |
parent | 8791cad96b1bf29cb5b59c7ed52c1e52883d235b (diff) | |
download | nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar.gz nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar.bz2 nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar.lz nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar.xz nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.tar.zst nixlib-b475d5f04c5223b98ed0e731b815f1061728ddbf.zip |
ocamlPackages.atd: 1.1.2 -> 1.12.0
Diffstat (limited to 'pkgs/development/ocaml-modules/atd')
-rw-r--r-- | pkgs/development/ocaml-modules/atd/default.nix | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/atd/default.nix b/pkgs/development/ocaml-modules/atd/default.nix index c7f8bc3d10f7..af52bd9aaafa 100644 --- a/pkgs/development/ocaml-modules/atd/default.nix +++ b/pkgs/development/ocaml-modules/atd/default.nix @@ -1,21 +1,36 @@ -{stdenv, menhir, easy-format, buildOcaml, fetchurl, which}: +{ stdenv, menhir, easy-format, ocaml, findlib, fetchurl, jbuilder, which }: -buildOcaml rec { - name = "atd"; - version = "1.1.2"; +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "1.12.0"; + sha256 = "1pcd4fqbilv8zm2mc1nj2s26vc5y8vnisg1q1y6bjx23wxidb09y"; + buildPhase = "jbuilder build -p atd"; + inherit (jbuilder) installPhase; + } else { + version = "1.1.2"; + sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291"; + buildPhase = ""; + installPhase = '' + mkdir -p $out/bin + make PREFIX=$out install + ''; + }; +in + +stdenv.mkDerivation rec { + inherit (param) version buildPhase installPhase; + name = "ocaml${ocaml.version}-atd-${version}"; src = fetchurl { url = "https://github.com/mjambon/atd/archive/v${version}.tar.gz"; - sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291"; + inherit (param) sha256; }; - installPhase = '' - mkdir -p $out/bin - make PREFIX=$out install - ''; + createFindlibDestdir = true; - buildInputs = [ which ]; - propagatedBuildInputs = [ menhir easy-format ]; + buildInputs = [ which jbuilder ocaml findlib menhir ]; + propagatedBuildInputs = [ easy-format ]; meta = with stdenv.lib; { homepage = https://github.com/mjambon/atd; |