about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-10-07 12:15:17 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2017-10-07 12:15:17 +0200
commitacfec163b1ae348a3fbf28fdd9d0f0ea669afa75 (patch)
tree05d3d21913685147818bdbab26ba1769409565b6 /pkgs/development/ocaml-modules
parent55ed948a550c46d1f5b77dcaaa3a4272bf34eb35 (diff)
parenta9e090f74966afd25054f9429a9832da21ff712a (diff)
downloadnixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar.gz
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar.bz2
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar.lz
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar.xz
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.tar.zst
nixlib-acfec163b1ae348a3fbf28fdd9d0f0ea669afa75.zip
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/lablgtk-extras/default.nix15
-rw-r--r--pkgs/development/ocaml-modules/xmlm/default.nix25
2 files changed, 29 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
index 68019113f388..9e6013b9083f 100644
--- a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
@@ -1,12 +1,15 @@
-{ stdenv, fetchurl, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }:
+{ stdenv, fetchFromGitHub, 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";
+stdenv.mkDerivation rec {
+  version = "1.6";
+  name = "ocaml${ocaml.version}-lablgtk-extras-${version}";
+  src = fetchFromGitHub {
+    owner = "zoggy";
+    repo = "lablgtk-extras";
+    rev = "release-${version}";
+    sha256 = "1bbdp5j18s582mmyd7qiaq1p08g2ag4gl7x65pmzahbhg719hjda";
   };
 
   buildInputs = [ ocaml findlib camlp4 ];
diff --git a/pkgs/development/ocaml-modules/xmlm/default.nix b/pkgs/development/ocaml-modules/xmlm/default.nix
index d94a3eac873a..7f5bcb03ad6c 100644
--- a/pkgs/development/ocaml-modules/xmlm/default.nix
+++ b/pkgs/development/ocaml-modules/xmlm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }:
 let
   pname = "xmlm";
   webpage = "http://erratique.ch/software/${pname}";
@@ -6,22 +6,37 @@ in
 
 assert stdenv.lib.versionAtLeast ocaml.version "3.12";
 
+let param =
+  if stdenv.lib.versionAtLeast ocaml.version "4.02"
+  then {
+    version = "1.3.0";
+    sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
+    buildInputs = [ topkg ];
+    inherit (topkg) buildPhase;
+  } else {
+    version = "1.2.0";
+    sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
+    buildInputs = [];
+    buildPhase = "./pkg/build true";
+  };
+in
+
 stdenv.mkDerivation rec {
   name = "ocaml-${pname}-${version}";
-  version = "1.2.0";
+  inherit (param) version;
 
   src = fetchurl {
     url = "${webpage}/releases/${pname}-${version}.tbz";
-    sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
+    inherit (param) sha256;
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild opam ];
+  buildInputs = [ ocaml findlib ocamlbuild opam ] ++ param.buildInputs;
 
   createFindlibDestdir = true;
 
   unpackCmd = "tar xjf $src";
 
-  buildPhase = "./pkg/build true";
+  inherit (param) buildPhase;
 
   installPhase = ''
     opam-installer --script --prefix=$out ${pname}.install > install.sh