From 9c4c9f588477d86ec4b5ae17c681edd469b19495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Sun, 22 May 2022 10:09:35 +0200 Subject: [PATCH] ocamlPackages.gd4o: init at 1.0a5 (#169226) --- .../ocaml-modules/gd4o/default.nix | 36 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/ocaml-modules/gd4o/default.nix diff --git a/pkgs/development/ocaml-modules/gd4o/default.nix b/pkgs/development/ocaml-modules/gd4o/default.nix new file mode 100644 index 000000000000..19a1b42f06bd --- /dev/null +++ b/pkgs/development/ocaml-modules/gd4o/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, ocaml, gd, freetype, findlib, zlib, libpng, libjpeg }: + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-gd4o"; + version = "1.0a5"; + + src = fetchurl { + url = "mirror://sourceforge/gd4o/gd4o/1.0%20Alpha%205/gd4o-1.0a5.tar.gz"; + sha256 = "1vbyakz7byvxmqf3hj68rw15b4kb94ppcnhvmjv38rsyg05bc47s"; + }; + + buildInputs = [ ocaml findlib libjpeg libpng ]; + propagatedBuildInputs = [ gd zlib freetype ]; + + + preInstall = '' + mkdir -p $OCAMLFIND_DESTDIR/stublibs + ''; + + buildFlags = [ "all" "opt" ]; + + checkPhase = '' + runHook preCheck + make test.opt + runHook postCheck + ''; + + doCheck = true; + + meta = with lib; { + homepage = "https://sourceforge.net/projects/gd4o/"; + description = "OCaml wrapper for the GD graphics library"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ dandellion ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4b31e2484a74..a1effc538b60 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -450,6 +450,8 @@ let functory = callPackage ../development/ocaml-modules/functory { }; + gd4o = callPackage ../development/ocaml-modules/gd4o { }; + gen = callPackage ../development/ocaml-modules/gen { }; genspio = callPackage ../development/ocaml-modules/genspio { };