2017-03-23 07:40:21 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }:
|
|
|
|
|
|
|
|
if stdenv.lib.versionOlder ocaml.version "4.03"
|
|
|
|
then throw "ocf not supported for ocaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ocf";
|
2017-03-23 07:40:21 +00:00
|
|
|
version = "0.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zoggy";
|
|
|
|
repo = "ocf";
|
|
|
|
rev = "release-${version}";
|
|
|
|
sha256 = "1fhq9l2nmr39hxzpavc0jssmba71nnmhsncdn4dsbh2ylv29w56y";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ppx_tools ];
|
|
|
|
propagatedBuildInputs = [ yojson ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-04-01 09:54:30 +01:00
|
|
|
dontStrip = true;
|
|
|
|
|
2017-03-23 07:40:21 +00:00
|
|
|
patches = [(fetchpatch {
|
|
|
|
url = "https://github.com/zoggy/ocf/commit/3a231c7a6c5e535a77c25e207af8952793436444.patch";
|
|
|
|
sha256 = "0nc8cggc5gxhch9amaz3s71lxs1xbgi7fs9p90cng04dsgr64xk5";
|
|
|
|
})
|
|
|
|
];
|
2017-04-01 09:54:30 +01:00
|
|
|
|
2017-03-23 07:40:21 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "OCaml library to read and write configuration options in JSON syntax";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://zoggy.github.io/ocf/;
|
2017-03-23 07:40:21 +00:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
maintainers = with maintainers; [ regnat ];
|
|
|
|
};
|
|
|
|
}
|