diff --git a/pkgs/development/ocaml-modules/lablgtk3/default.nix b/pkgs/development/ocaml-modules/lablgtk3/default.nix new file mode 100644 index 000000000000..6de7a26fbd6c --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk3/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, pkgconfig, ocaml, findlib, gtk3, gtkspell3, gtksourceview }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "lablgtk3 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + version = "3.0.beta1"; + name = "ocaml${ocaml.version}-lablgtk3-${version}"; + src = fetchurl { + url = https://forge.ocamlcore.org/frs/download.php/1769/lablgtk-3.0.beta1.tar.gz; + sha256 = "08izn2kwxdz1i74m11lqkl9n50bs7sy6pl8mcq6br77znarvqb91"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib gtk3 gtkspell3 gtksourceview ]; + + buildFlags = "world"; + + meta = { + description = "OCaml interface to gtk+-3"; + homepage = "http://lablgtk.forge.ocamlcore.org/"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e03cb8e8b3b7..85cc5497c40f 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -361,6 +361,8 @@ let lablgl = callPackage ../development/ocaml-modules/lablgl { }; + lablgtk3 = callPackage ../development/ocaml-modules/lablgtk3 { }; + lablgtk_2_14 = callPackage ../development/ocaml-modules/lablgtk/2.14.0.nix { inherit (pkgs.gnome2) libgnomecanvas libglade gtksourceview; };