buildDunePackage: new support function; use it to refactor some OCaml derivations
This commit is contained in:
@@ -1,34 +1,26 @@
|
||||
{ stdenv, fetchFromGitHub, ocaml, findlib, dune
|
||||
{ stdenv, fetchFromGitHub, buildDunePackage
|
||||
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
buildDunePackage rec {
|
||||
pname = "ppxlib";
|
||||
version = "0.3.1";
|
||||
name = "ocaml${ocaml.version}-ppxlib-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ocaml-ppx";
|
||||
repo = "ppxlib";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0qpjl84x8abq9zivifb0k8ld7fa1lrhkbajmmccvfv06ja3as1v4";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib dune ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ocaml-compiler-libs ocaml-migrate-parsetree ppx_derivers stdio
|
||||
];
|
||||
|
||||
buildPhase = "dune build";
|
||||
|
||||
inherit (dune) installPhase;
|
||||
|
||||
meta = {
|
||||
description = "Comprehensive ppx tool set";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||
inherit (src.meta) homepage;
|
||||
inherit (ocaml.meta) platforms;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user