summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ppx_deriving/default.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-08-14 15:35:33 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-08-20 04:55:45 +0000
commit4c571a1e76187b77f1beb74508214080c7628692 (patch)
treeee0547ebb61565a1a5efe4c410e2d983981097d1 /pkgs/development/ocaml-modules/ppx_deriving/default.nix
parent4759568c6b259e5b20323ded9a64619b4bd27ad3 (diff)
ocamlPackages.ppx_deriving: 4.2.1 -> 4.4
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_deriving/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/ppx_deriving/default.nix39
1 files changed, 10 insertions, 29 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix
index 24cfbcf5b7af..d45298972cce 100644
--- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix
@@ -1,41 +1,22 @@
-{ stdenv, ocaml, findlib, ocamlbuild, fetchzip
-, cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree
+{ lib, fetchzip, buildDunePackage
+, cppo, ppxfind, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree
}:
-if !stdenv.lib.versionAtLeast ocaml.version "4.02"
-then throw "ppx_deriving is not available for OCaml ${ocaml.version}"
-else
-
-let param =
- if ocaml.version == "4.03.0"
- then {
- version = "4.1";
- sha256 = "0cy9p8d8cbcxvqyyv8fz2z9ypi121zrgaamdlp4ld9f3jnwz7my9";
- extraPropagatedBuildInputs = [];
- } else {
- version = "4.2.1";
- sha256 = "1yhhjnncbbb7fsif7qplndh01s1xd72dqm8f3jkgx9y4ariqqvf9";
- extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ];
-}; in
-
-stdenv.mkDerivation rec {
- name = "ocaml${ocaml.version}-ppx_deriving-${version}";
- inherit (param) version;
+buildDunePackage rec {
+ pname = "ppx_deriving";
+ version = "4.4";
src = fetchzip {
url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz";
- inherit (param) sha256;
+ sha256 = "0b2gaxlh54pcz3b4891yd143nx852mwggcy0yhq8g85dl3iisxzq";
};
- buildInputs = [ ocaml findlib ocamlbuild cppo ounit ];
- propagatedBuildInputs = param.extraPropagatedBuildInputs ++
- [ ppx_tools result ];
-
- createFindlibDestdir = true;
+ buildInputs = [ ppxfind cppo ounit ];
+ propagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ppx_tools result ];
- installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install";
+ doCheck = true;
- meta = with stdenv.lib; {
+ meta = with lib; {
description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02.";
maintainers = [ maintainers.maurer ];
license = licenses.mit;