From d48dd17c5e66c6f869a49431fb20785719d307ca Mon Sep 17 00:00:00 2001 From: Jirka Marsik Date: Wed, 29 Oct 2014 20:15:39 +0100 Subject: [PATCH] Added gg-0.9.0 --- pkgs/development/ocaml-modules/gg/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/ocaml-modules/gg/default.nix diff --git a/pkgs/development/ocaml-modules/gg/default.nix b/pkgs/development/ocaml-modules/gg/default.nix new file mode 100644 index 00000000000..a40d4ae7978 --- /dev/null +++ b/pkgs/development/ocaml-modules/gg/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, ocaml, findlib, opam }: + +let + inherit (stdenv.lib) getVersion versionAtLeast; + + pname = "gg"; + version = "0.9.0"; + webpage = "http://erratique.ch/software/${pname}"; +in + +assert versionAtLeast (getVersion ocaml) "4.01.0"; + +stdenv.mkDerivation rec { + + name = "ocaml-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "055pza6jbjjj7wgzf7pbn0ccxw76i8w5b2bcnaz8b9m4x6jaa6gh"; + }; + + buildInputs = [ ocaml findlib opam ]; + + createFindlibDestdir = true; + + unpackCmd = "tar xjf $src"; + + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + + installPhase = '' + opam-installer --script --prefix=$out ${pname}.install | sh + ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname} + ''; + + meta = with stdenv.lib; { + 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. + ''; + homepage = "${webpage}"; + platforms = ocaml.meta.platforms; + license = licenses.bsd3; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c28ec83c85..d36099eb5bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3527,6 +3527,8 @@ let patoline = callPackage ../tools/typesetting/patoline { }; + gg = callPackage ../development/ocaml-modules/gg { }; + gmetadom = callPackage ../development/ocaml-modules/gmetadom { }; js_of_ocaml = callPackage ../development/tools/ocaml/js_of_ocaml { };