1{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }:
2
3lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02")
4 "semver is not available on OCaml older than 4.02"
5
6stdenv.mkDerivation rec {
7 pname = "ocaml${ocaml.version}-semver";
8 version = "0.1.0";
9 src = fetchzip {
10 url = "https://github.com/rgrinberg/ocaml-semver/archive/v${version}.tar.gz";
11 sha256 = "sha256-0BzeuVTpuRIQjadGg08hTvMzZtKCl2utW2YK269oETk=";
12 };
13
14 nativeBuildInputs = [
15 ocaml
16 findlib
17 ocamlbuild
18 ];
19
20 strictDeps = true;
21 createFindlibDestdir = true;
22
23 meta = {
24 homepage = "https://github.com/rgrinberg/ocaml-semver";
25 description = "Semantic versioning module";
26 platforms = ocaml.meta.platforms;
27 license = lib.licenses.bsd3;
28 maintainers = [ lib.maintainers.ulrikstrid ];
29 };
30}