2022-03-05 16:20:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-03-05 16:20:37 +00:00
|
|
|
homepage = "https://erratique.ch/software/gg";
|
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
|
|
"gg is not available for OCaml ${ocaml.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "ocaml${ocaml.version}-gg";
|
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-05 16:20:37 +00:00
|
|
|
url = "${homepage}/releases/gg-${version}.tbz";
|
|
|
|
sha256 = "sha256:0j7bpj8k17csnz6v6frkz9aycywsb7xmznnb31g8rbfk3626f3ci";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
buildInputs = [ topkg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Basic types for computer graphics in OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
Gg is an OCaml module providing basic types for computer graphics. It
|
|
|
|
defines types and functions for floats, vectors, points, sizes,
|
|
|
|
matrices, quaternions, axis aligned boxes, colors, color spaces, and
|
|
|
|
raster data.
|
|
|
|
'';
|
2022-03-05 16:20:37 +00:00
|
|
|
inherit homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.jirkamarsik ];
|
|
|
|
};
|
|
|
|
}
|