buildDunePackage: new support function; use it to refactor some OCaml derivations

This commit is contained in:
Théo Zimmermann
2018-11-07 10:08:03 +01:00
parent 5fc73fd52e
commit 794158fcd5
64 changed files with 506 additions and 828 deletions
@@ -1,25 +1,21 @@
{ stdenv, menhir, easy-format, ocaml, findlib, fetchFromGitHub, dune, which, biniou, yojson }:
{ stdenv, menhir, easy-format, fetchFromGitHub, buildDunePackage, which, biniou, yojson }:
stdenv.mkDerivation rec {
buildDunePackage rec {
pname = "atd";
version = "2.0.0";
name = "ocaml${ocaml.version}-atd-${version}";
src = fetchFromGitHub {
owner = "mjambon";
repo = "atd";
repo = pname;
rev = version;
sha256 = "0alzmk97rxg7s6irs9lvf89dy9n3r769my5n4j9p9qyigcdgjaia";
};
createFindlibDestdir = true;
buildInputs = [ which dune ocaml findlib menhir ];
buildInputs = [ which menhir ];
propagatedBuildInputs = [ easy-format biniou yojson ];
buildPhase = "jbuilder build";
inherit (dune) installPhase;
meta = with stdenv.lib; {
homepage = https://github.com/mjambon/atd;
description = "Syntax for cross-language type definitions";