diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix b/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix new file mode 100644 index 000000000000..fbe9898fd81e --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }: + +stdenv.mkDerivation { + name = "ocaml-lablgtk-extras-1.4"; + src = fetchurl { + url = http://forge.ocamlcore.org/frs/download.php/1282/lablgtkextras-1.4.tar.gz; + sha256 = "09fqxwdib7r9yxynknc9gv3jw2hnhj5cak7q5jngk6m8rzvmhfcc"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + propagatedBuildInputs = [ config-file lablgtk xmlm ]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + homepage = http://gtk-extras.forge.ocamlcore.org/; + description = "A collection of libraries and modules useful when developing OCaml/LablGtk2 applications"; + license = stdenv.lib.licenses.lgpl2Plus; + branch = "1.4"; + }; +} diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix new file mode 100644 index 000000000000..80e5a72abf52 --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02"; + +stdenv.mkDerivation { + name = "ocaml-lablgtk-extras-1.5"; + src = fetchurl { + url = https://forge.ocamlcore.org/frs/download.php/1453/lablgtkextras-1.5.tar.gz; + sha256 = "1bgflgadmy2nqnqjf34zja0jy6f9wpqq8x22qcfilj9g8c9wkrmi"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + propagatedBuildInputs = [ config-file lablgtk xmlm ]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + homepage = http://gtk-extras.forge.ocamlcore.org/; + description = "A collection of libraries and modules useful when developing OCaml/LablGtk2 applications"; + license = stdenv.lib.licenses.lgpl2Plus; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 775efdc5d949..74298308a00a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3758,6 +3758,11 @@ let inherit (gnome) libgnomecanvas libglade gtksourceview; }; + lablgtk-extras = + if lib.versionOlder "4.02" ocaml_version + then callPackage ../development/ocaml-modules/lablgtk-extras { } + else callPackage ../development/ocaml-modules/lablgtk-extras/1.4.nix { }; + lablgtkmathview = callPackage ../development/ocaml-modules/lablgtkmathview { gtkmathview = callPackage ../development/libraries/gtkmathview { }; };