1{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
2
3let
4 homepage = "https://erratique.ch/software/gg";
5 version = "1.0.0";
6in
7
8lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
9 "gg is not available for OCaml ${ocaml.version}"
10
11stdenv.mkDerivation {
12
13 pname = "ocaml${ocaml.version}-gg";
14 inherit version;
15
16 src = fetchurl {
17 url = "${homepage}/releases/gg-${version}.tbz";
18 sha256 = "sha256:0j7bpj8k17csnz6v6frkz9aycywsb7xmznnb31g8rbfk3626f3ci";
19 };
20
21 strictDeps = true;
22
23 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
24 buildInputs = [ topkg ];
25
26 inherit (topkg) buildPhase installPhase;
27
28 meta = with lib; {
29 description = "Basic types for computer graphics in OCaml";
30 longDescription = ''
31 Gg is an OCaml module providing basic types for computer graphics. It
32 defines types and functions for floats, vectors, points, sizes,
33 matrices, quaternions, axis aligned boxes, colors, color spaces, and
34 raster data.
35 '';
36 inherit homepage;
37 inherit (ocaml.meta) platforms;
38 license = licenses.bsd3;
39 maintainers = [ maintainers.jirkamarsik ];
40 };
41}