2022-01-25 03:21:06 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib, pkg-config, gtk2, libgnomecanvas, gtksourceview, camlp4 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.04"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "lablgtk-2.14 is not available for OCaml ${ocaml.version}" else
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "lablgtk";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
version = "2.14.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://forge.ocamlcore.org/frs/download.php/561/${name}.tar.gz";
|
|
|
|
sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9";
|
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ocaml findlib camlp4 ];
|
|
|
|
buildInputs = [ gtk2 libgnomecanvas gtksourceview ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ];
|
|
|
|
buildFlags = [ "world" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib
|
|
|
|
export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
branch = "2.14";
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [
|
2021-01-15 22:18:51 +00:00
|
|
|
lib.maintainers.maggesi
|
|
|
|
lib.maintainers.roconnor
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html";
|
|
|
|
description = "LablGTK is is an Objective Caml interface to GTK";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
})
|