aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/ocaml-modules/ocaml-migrate-parsetree
diff options
context:
space:
mode:
authorThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-05 11:21:46 +0100
committerThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-07 10:08:03 +0100
commit794158fcd54b862f3775bc8b54495a842a250b7b (patch)
tree333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/ocaml-migrate-parsetree
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/ocaml-migrate-parsetree')
-rw-r--r--pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
index e8074a51e52f..a9496576875c 100644
--- a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
@@ -1,30 +1,22 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune, result }:
+{ stdenv, fetchFromGitHub, buildDunePackage, result }:
-if !stdenv.lib.versionAtLeast ocaml.version "4.02"
-then throw "ocaml-migrate-parsetree is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
- name = "ocaml${ocaml.version}-ocaml-migrate-parsetree-${version}";
+buildDunePackage rec {
+ pname = "ocaml-migrate-parsetree";
version = "1.1.0";
src = fetchFromGitHub {
owner = "ocaml-ppx";
- repo = "ocaml-migrate-parsetree";
+ repo = pname;
rev = "v${version}";
sha256 = "1d2n349d1cqm3dr09mwy5m9rfd4bkkqvri5i94wknpsrr35vnrr1";
};
- buildInputs = [ ocaml findlib ocamlbuild dune ];
propagatedBuildInputs = [ result ];
- inherit (dune) installPhase;
-
meta = {
description = "Convert OCaml parsetrees between different major versions";
license = stdenv.lib.licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (src.meta) homepage;
- inherit (ocaml.meta) platforms;
};
}