Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 33 lines 919 B view raw
1{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }: 2 3assert lib.versionAtLeast (lib.getVersion ocaml) "3.12"; 4 5if lib.versionAtLeast ocaml.version "4.06" 6then throw "sqlite3EZ is not available for OCaml ${ocaml.version}" 7else 8 9stdenv.mkDerivation rec { 10 pname = "ocaml-sqlite3EZ"; 11 version = "0.1.0"; 12 13 src = fetchFromGitHub { 14 owner = "mlin"; 15 repo = "ocaml-sqlite3EZ"; 16 rev = "v${version}"; 17 sha256 = "sha256-pKysvth0efxJeyJQY2Dnqarg7OtsKyyLnFV/1ZhsfDY="; 18 }; 19 20 buildInputs = [ ocaml findlib ocamlbuild twt ]; 21 22 propagatedBuildInputs = [ ocaml_sqlite3 ]; 23 24 createFindlibDestdir = true; 25 26 meta = with lib; { 27 homepage = "https://github.com/mlin/ocaml-sqlite3EZ"; 28 description = "A thin wrapper for sqlite3-ocaml with a simplified interface"; 29 license = licenses.mit; 30 maintainers = [ maintainers.vbgl ]; 31 platforms = ocaml.meta.platforms or [ ]; 32 }; 33}