diff options
author | Vladyslav M <dywedir@pm.me> | 2019-01-16 00:54:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 00:54:27 +0200 |
commit | 805e2bbced103b5f370a17e1e5dfd105c85a7954 (patch) | |
tree | 551b257a4405b82a8661eb36e392140b03d0e052 | |
parent | 3956a8421f2d78bc66ad9d3c23a3b5510bc695be (diff) | |
parent | a18ac72b4a8b69ff625479413160cdb4425c969c (diff) |
Merge pull request #53703 from vbgl/ocaml-ocp-indent-1.7.0
ocamlPackages.ocp-indent: 1.6.1 -> 1.7.0
-rw-r--r-- | pkgs/development/ocaml-modules/cmdliner/default.nix | 16 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/ocp-indent/default.nix | 25 |
2 files changed, 21 insertions, 20 deletions
diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix index a4341ed98c639..c11aa41a4931b 100644 --- a/pkgs/development/ocaml-modules/cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -6,13 +6,23 @@ in assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" then { + version = "1.0.3"; + sha256 = "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"; + } else { + version = "1.0.2"; + sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; + } +; in + stdenv.mkDerivation rec { - name = "ocaml-${pname}-${version}"; - version = "1.0.3"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + inherit (param) version; src = fetchurl { url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"; + inherit (param) sha256; }; nativeBuildInputs = [ ocamlbuild topkg ]; diff --git a/pkgs/development/tools/ocaml/ocp-indent/default.nix b/pkgs/development/tools/ocaml/ocp-indent/default.nix index 2cffccdbfcdf6..7ecc15da2b50a 100644 --- a/pkgs/development/tools/ocaml/ocp-indent/default.nix +++ b/pkgs/development/tools/ocaml/ocp-indent/default.nix @@ -1,31 +1,22 @@ -{ stdenv, fetchzip, ocaml, findlib, dune, ocp-build, cmdliner }: +{ lib, fetchzip, buildDunePackage, cmdliner }: -let inherit (stdenv.lib) getVersion versionAtLeast; in - -assert versionAtLeast (getVersion ocaml) "3.12.1"; -assert versionAtLeast (getVersion cmdliner) "1.0.0"; -assert versionAtLeast (getVersion ocp-build) "1.99.6-beta"; - -stdenv.mkDerivation rec { - - name = "ocaml${ocaml.version}-ocp-indent-${version}"; - version = "1.6.1"; +buildDunePackage rec { + version = "1.7.0"; + pname = "ocp-indent"; src = fetchzip { url = "https://github.com/OCamlPro/ocp-indent/archive/${version}.tar.gz"; - sha256 = "0rcaa11mjqka032g94wgw9llqpflyk3ywr3lr6jyxbh1rjvnipnw"; + sha256 = "006x3fsd61vxnxj4chlakyk3b2s10pb0bdl46g0ghf3j8h33x7hc"; }; - nativeBuildInputs = [ ocp-build ]; - buildInputs = [ ocaml findlib cmdliner ]; + minimumOCamlVersion = "4.02"; - inherit (dune) installPhase; + buildInputs = [ cmdliner ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://typerex.ocamlpro.com/ocp-indent.html; description = "A customizable tool to indent OCaml code"; license = licenses.gpl3; - platforms = ocaml.meta.platforms or []; maintainers = [ maintainers.jirkamarsik ]; }; } |