From d67588a5f1a281942f10501c5c4a0ea21126f1d1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 17 Sep 2014 23:44:02 +0100 Subject: [PATCH] Fixes coq-8.3: requires OCaml 3.12 --- .../ocaml-modules/lablgtk/2.14.0.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 14 +++++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/ocaml-modules/lablgtk/2.14.0.nix diff --git a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix new file mode 100644 index 000000000000..5fb9969e62ef --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview}: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "lablgtk"; + version = "2.14.0"; +in + +stdenv.mkDerivation (rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/561/${name}.tar.gz"; + sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; + }; + + buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview]; + + 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 = { + platforms = ocaml.meta.platforms; + maintainers = [ + stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.roconnor + ]; + homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html; + description = "LablGTK is is an Objective Caml interface to gtk+"; + license = stdenv.lib.licenses.lgpl21Plus; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a8c95b376f1..3cc8ac8eddf3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3372,10 +3372,17 @@ let lablgl = callPackage ../development/ocaml-modules/lablgl { }; - lablgtk = callPackage ../development/ocaml-modules/lablgtk { + lablgtk_2_14 = callPackage ../development/ocaml-modules/lablgtk/2.14.0.nix { inherit (gnome) libgnomecanvas libglade gtksourceview; }; + lablgtk = + if lib.strings.versionAtLeast (builtins.parseDrvName ocaml.name).version "3.12" + then callPackage ../development/ocaml-modules/lablgtk { + inherit (gnome) libgnomecanvas libglade gtksourceview; + } + else lablgtk_2_14; + lablgtkmathview = callPackage ../development/ocaml-modules/lablgtkmathview { gtkmathview = callPackage ../development/libraries/gtkmathview { }; }; @@ -11242,8 +11249,9 @@ let }; coq_8_3 = callPackage ../applications/science/logic/coq/8.3.nix { - inherit (ocamlPackages) findlib lablgtk; - camlp5 = ocamlPackages.camlp5_transitional; + inherit (ocamlPackages_3_12_1) ocaml findlib; + camlp5 = ocamlPackages_3_12_1.camlp5_transitional; + lablgtk = ocamlPackages_3_12_1.lablgtk_2_14; }; cvc3 = callPackage ../applications/science/logic/cvc3 {};