1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/ocaml-modules/ppx_derivers/default.nix
2018-09-15 19:32:32 +00:00

30 lines
732 B
Nix

{ stdenv, fetchFromGitHub, ocaml, findlib, dune }:
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.2";
src = fetchFromGitHub {
owner = "diml";
repo = "ppx_derivers";
rev = version;
sha256 = "0bnhihl1w31as5w2czly1v3d6pbir9inmgsjg2cj6aaj9v1dzd85";
};
buildInputs = [ ocaml findlib dune ];
inherit (dune) 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;
};
}