ocamlPackages.ppx_derivers: init at 1.0
Ppx_derivers is a tiny package whose sole purpose is to allow ppx_deriving and ppx_type_conv to inter-operate gracefully when linked as part of the same ocaml-migrate-parsetree driver. Homepage: https://github.com/diml/ppx_derivers
This commit is contained in:
parent
a65a499ca2
commit
cf7df9230b
29
pkgs/development/ocaml-modules/ppx_derivers/default.nix
Normal file
29
pkgs/development/ocaml-modules/ppx_derivers/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder }:
|
||||||
|
|
||||||
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||||
|
then throw "ppx_derivers is not available for OCaml ${ocaml.version}"
|
||||||
|
else
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "ocaml${ocaml.version}-ppx_derivers-${version}";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "diml";
|
||||||
|
repo = "ppx_derivers";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "049yy9706lv1li6a1bibkz1qq2ixxbdyhf4f5w9pv71jc3dlpfy8";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ocaml findlib jbuilder ];
|
||||||
|
|
||||||
|
inherit (jbuilder) installPhase;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Shared [@@deriving] plugin registry";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||||
|
inherit (src.meta) homepage;
|
||||||
|
inherit (ocaml.meta) platforms;
|
||||||
|
};
|
||||||
|
}
|
@ -536,6 +536,8 @@ let
|
|||||||
then callPackage ../development/ocaml-modules/ppx_blob {}
|
then callPackage ../development/ocaml-modules/ppx_blob {}
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
|
ppx_derivers = callPackage ../development/ocaml-modules/ppx_derivers {};
|
||||||
|
|
||||||
ppx_deriving =
|
ppx_deriving =
|
||||||
if lib.versionAtLeast ocaml.version "4.02"
|
if lib.versionAtLeast ocaml.version "4.02"
|
||||||
then callPackage ../development/ocaml-modules/ppx_deriving {}
|
then callPackage ../development/ocaml-modules/ppx_deriving {}
|
||||||
|
Loading…
Reference in New Issue
Block a user