nixpkgs/pkgs/development/ocaml-modules/gg/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

2022-02-16 07:06:17 +00:00
{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
2014-10-29 19:15:39 +00:00
let
2022-02-16 07:06:17 +00:00
homepage = "https://erratique.ch/software/gg";
version = "1.0.0";
2014-10-29 19:15:39 +00:00
in
2022-02-16 07:06:17 +00:00
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
"gg is not available for OCaml ${ocaml.version}"
2014-10-29 19:15:39 +00:00
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
2014-10-29 19:15:39 +00:00
2022-02-16 07:06:17 +00:00
pname = "ocaml${ocaml.version}-gg";
inherit version;
2014-10-29 19:15:39 +00:00
src = fetchurl {
2022-02-16 07:06:17 +00:00
url = "${homepage}/releases/gg-${version}.tbz";
sha256 = "sha256:0j7bpj8k17csnz6v6frkz9aycywsb7xmznnb31g8rbfk3626f3ci";
2014-10-29 19:15:39 +00:00
};
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ topkg ];
2014-10-29 19:15:39 +00:00
2022-02-16 07:06:17 +00:00
inherit (topkg) buildPhase installPhase;
2014-10-29 19:15:39 +00:00
meta = with lib; {
2014-10-29 19:15:39 +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-02-16 07:06:17 +00:00
inherit homepage;
inherit (ocaml.meta) platforms;
2014-10-29 19:15:39 +00:00
license = licenses.bsd3;
maintainers = [ maintainers.jirkamarsik ];
};
}