about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVincent Laporte <vbgl@users.noreply.github.com>2018-07-29 08:35:35 +0000
committerGitHub <noreply@github.com>2018-07-29 08:35:35 +0000
commitd6a60a7e913e3819ae64ba73004f3318854289a4 (patch)
treef11bb5f4536c33cac564a34db4d79800fb93d264 /pkgs
parent1747b29a4ce7c757bf8388fed6f7e492b954171c (diff)
downloadnixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar.gz
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar.bz2
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar.lz
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar.xz
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.tar.zst
nixlib-d6a60a7e913e3819ae64ba73004f3318854289a4.zip
ocamlPackages.labltk: init at 8.06 (#43963)
LablTk is an OCaml interface to the Tcl/Tk GUI framework.

homepage: http://labltk.forge.ocamlcore.org/
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/ocaml-modules/labltk/default.nix57
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix
new file mode 100644
index 000000000000..10555771feef
--- /dev/null
+++ b/pkgs/development/ocaml-modules/labltk/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, ocaml, findlib, tcl, tk }:
+
+let param = {
+  "4.04" = {
+    version = "8.06.2";
+    key = "1628";
+    sha256 = "1p97j9s33axkb4yyl0byhmhlyczqarb886ajpyggizy2br3a0bmk";
+  };
+  "4.05" = {
+    version = "8.06.3";
+    key = "1701";
+    sha256 = "1rka9jpg3kxqn7dmgfsa7pmsdwm16x7cn4sh15ijyyrad9phgdxn";
+  };
+  "4.06" = {
+    version = "8.06.4";
+    key = "1727";
+    sha256 = "0j3rz0zz4r993wa3ssnk5s416b1jhj58l6z2jk8238a86y7xqcii";
+  };
+  "4.07" = {
+    version = "8.06.5";
+    key = "1764";
+    sha256 = "0wgx65y1wkgf22ihpqmspqfp95fqbj3pldhp1p3b1mi8rmc37zwj";
+  };
+}."${builtins.substring 0 4 ocaml.version}";
+in
+
+stdenv.mkDerivation rec {
+  inherit (param) version;
+  name = "ocaml${ocaml.version}-labltk-${version}";
+
+  src = fetchurl {
+    url = "https://forge.ocamlcore.org/frs/download.php/${param.key}/labltk-${param.version}.tar.gz";
+    inherit (param) sha256;
+  };
+
+  buildInputs = [ ocaml findlib tcl tk ];
+
+  configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ];
+  dontAddPrefix = true;
+
+  buildFlags = [ "all" "opt" ];
+
+  createFindlibDestdir = true;
+
+  postInstall = ''
+    mkdir -p $OCAMLFIND_DESTDIR/stublibs
+    mv $OCAMLFIND_DESTDIR/labltk/dlllabltk.so $OCAMLFIND_DESTDIR/stublibs/
+  '';
+
+  meta = {
+    description = "OCaml interface to Tcl/Tk, including OCaml library explorer OCamlBrowser";
+    homepage = "http://labltk.forge.ocamlcore.org/";
+    license = stdenv.lib.licenses.lgpl21;
+    inherit (ocaml.meta) platforms;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 8c265013f47a..234d27bc1bc8 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -370,6 +370,8 @@ let
       gtkmathview = callPackage ../development/libraries/gtkmathview { };
     };
 
+    labltk = callPackage ../development/ocaml-modules/labltk { };
+
     lambdaTerm-1_6 = callPackage ../development/ocaml-modules/lambda-term/1.6.nix { lwt = lwt2; };
     lambdaTerm =
       if lib.versionOlder "4.02" ocaml.version