2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
assert lib.versionAtLeast (lib.getVersion ocaml) "3.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "sqlite3EZ is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml-sqlite3EZ";
|
|
|
|
version = "0.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mlin";
|
|
|
|
repo = "ocaml-sqlite3EZ";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-pKysvth0efxJeyJQY2Dnqarg7OtsKyyLnFV/1ZhsfDY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild twt ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ocaml_sqlite3 ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mlin/ocaml-sqlite3EZ";
|
|
|
|
description = "A thin wrapper for sqlite3-ocaml with a simplified interface";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = ocaml.meta.platforms or [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|