summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/lambda-term
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/lambda-term
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
downloadnixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.zip
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/lambda-term')
-rw-r--r--pkgs/development/ocaml-modules/lambda-term/default.nix22
1 files changed, 7 insertions, 15 deletions
diff --git a/pkgs/development/ocaml-modules/lambda-term/default.nix b/pkgs/development/ocaml-modules/lambda-term/default.nix
index ba68c0463f8..18fe235710f 100644
--- a/pkgs/development/ocaml-modules/lambda-term/default.nix
+++ b/pkgs/development/ocaml-modules/lambda-term/default.nix
@@ -1,26 +1,19 @@
-{ stdenv, fetchurl, libev, ocaml, findlib, dune
-, zed, lwt_log, lwt_react
-}:
+{ stdenv, fetchurl, libev, buildDunePackage, zed, lwt_log, lwt_react }:
 
-assert stdenv.lib.versionAtLeast ocaml.version "4.02";
-
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "lambda-term";
   version = "1.13";
-  name = "ocaml${ocaml.version}-lambda-term-${version}";
+
+  minimumOCamlVersion = "4.02";
 
   src = fetchurl {
-    url = "https://github.com/diml/lambda-term/archive/${version}.tar.gz";
+    url = "https://github.com/diml/${pname}/archive/${version}.tar.gz";
     sha256 = "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l";
   };
 
-  buildInputs = [ libev ocaml findlib dune ];
-
+  buildInputs = [ libev ];
   propagatedBuildInputs = [ zed lwt_log lwt_react ];
 
-  buildPhase = "dune build -p lambda-term";
-
-  inherit (dune) installPhase;
-
   hasSharedObjects = true;
 
   meta = { description = "Terminal manipulation library for OCaml";
@@ -41,7 +34,6 @@ stdenv.mkDerivation rec {
 
     homepage = https://github.com/diml/lambda-term;
     license = stdenv.lib.licenses.bsd3;
-    platforms = ocaml.meta.platforms or [];
     maintainers = [
       stdenv.lib.maintainers.gal_bolle
     ];