Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocamlPackages.ppx_deriving_yojson: init at 3.0
deriving Yojson is a ppx_deriving plugin that generates JSON serializers and deserializers that use the Yojson library from an OCaml type definition. Homepage: https://github.com/whitequark/ppx_deriving_yojson
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg, cppo | ||
, ppx_import, ppx_deriving, yojson, ounit | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "ocaml${ocaml.version}-ppx_deriving_yojson-${version}"; | ||
version = "3.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "whitequark"; | ||
repo = "ppx_deriving_yojson"; | ||
rev = "v${version}"; | ||
sha256 = "1id1a29qq0ax9qp98b5hv6p2q2r0vp4fbkkwzm1bxdhnasw97msk"; | ||
}; | ||
|
||
buildInputs = [ ocaml findlib ocamlbuild opam cppo ounit ppx_import ]; | ||
|
||
propagatedBuildInputs = [ ppx_deriving yojson ]; | ||
|
||
inherit (topkg) installPhase; | ||
|
||
doCheck = true; | ||
checkTarget = "test"; | ||
|
||
meta = { | ||
description = "A Yojson codec generator for OCaml >= 4.02."; | ||
inherit (src.meta) homepage; | ||
license = stdenv.lib.licenses.mit; | ||
maintainers = [ stdenv.lib.maintainers.vbgl ]; | ||
inherit (ocaml.meta) platforms; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters