summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-10-22 05:47:54 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-10-29 07:05:18 +0000
commita25381b0191ef939ec5c929709803846e1b30c9f (patch)
treeb2f4abb273936ce9d12a26714f1d6d0854010363
parent94a80621ac1d12671593074de88f1ee8012a7f82 (diff)
downloadnixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar.gz
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar.bz2
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar.lz
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar.xz
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.tar.zst
nixpkgs-a25381b0191ef939ec5c929709803846e1b30c9f.zip
ocamlPackages.ctypes: 0.13.1 → 0.15.1
ocamlPackages.integers: 0.2.2 → 0.3.0
-rw-r--r--pkgs/development/ocaml-modules/ctypes/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/integers/default.nix22
2 files changed, 21 insertions, 23 deletions
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index 567defea7d2..bc76cfcd64c 100644
--- a/pkgs/development/ocaml-modules/ctypes/default.nix
+++ b/pkgs/development/ocaml-modules/ctypes/default.nix
@@ -1,28 +1,29 @@
-{ stdenv, buildOcaml, fetchzip, libffi, pkgconfig, ncurses, integers }:
+{ stdenv, fetchzip, ocaml, findlib, libffi, pkgconfig, ncurses, integers }:
 
-buildOcaml {
-  name = "ctypes";
-  version = "0.13.1";
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "ctypes is not available for OCaml ${ocaml.version}"
+else
 
-  minimumSupportedOcamlVersion = "4";
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-ctypes-${version}";
+  version = "0.15.1";
 
   src = fetchzip {
-    url = "https://github.com/ocamllabs/ocaml-ctypes/archive/67e711ec891e087fbe1e0b4665aa525af4eaa409.tar.gz";
-    sha256 = "1z84s5znr3lj84rzv6m37xxj9h7fwx4qiiykx3djf52qgk1rb2xb";
+    url = "https://github.com/ocamllabs/ocaml-ctypes/archive/${version}.tar.gz";
+    sha256 = "0adas974bwinn8jidb6chljkpd70s041h2a969dicsj0xsg6wys6";
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ ncurses ];
+  buildInputs = [ ocaml findlib ncurses ];
   propagatedBuildInputs = [ integers libffi ];
 
-  hasSharedObjects = true;
-
   buildPhase =  ''
      make XEN=false libffi.config ctypes-base ctypes-stubs
      make XEN=false ctypes-foreign
   '';
 
   installPhase =  ''
+    mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
     make install XEN=false
   '';
 
@@ -31,5 +32,6 @@ buildOcaml {
     description = "Library for binding to C libraries using pure OCaml";
     license = licenses.mit;
     maintainers = [ maintainers.ericbmerritt ];
+    inherit (ocaml.meta) platforms;
   };
 }
diff --git a/pkgs/development/ocaml-modules/integers/default.nix b/pkgs/development/ocaml-modules/integers/default.nix
index bf2d2dd1e8b..14d6506ad13 100644
--- a/pkgs/development/ocaml-modules/integers/default.nix
+++ b/pkgs/development/ocaml-modules/integers/default.nix
@@ -1,22 +1,18 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+{ lib, fetchzip, buildDunePackage }:
 
-stdenv.mkDerivation {
-	name = "ocaml${ocaml.version}-integers-0.2.2";
+buildDunePackage rec {
+	pname = "integers";
+	version = "0.3.0";
 
-	src = fetchurl {
-		url = https://github.com/ocamllabs/ocaml-integers/releases/download/v0.2.2/integers-0.2.2.tbz;
-		sha256 = "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk";
+	src = fetchzip {
+		url = "https://github.com/ocamllabs/ocaml-integers/archive/${version}.tar.gz";
+		sha256 = "1yhif5zh4srh63mhimfx3p5ljpb3lixjdd3i9pjnbj2qgpzlqj8p";
 	};
 
-	buildInputs = [ ocaml findlib ocamlbuild topkg ];
-
-	inherit (topkg) buildPhase installPhase;
-
 	meta = {
 		description = "Various signed and unsigned integer types for OCaml";
-		license = stdenv.lib.licenses.mit;
+		license = lib.licenses.mit;
 		homepage = https://github.com/ocamllabs/ocaml-integers;
-		maintainers = [ stdenv.lib.maintainers.vbgl ];
-		inherit (ocaml.meta) platforms;
+		maintainers = [ lib.maintainers.vbgl ];
 	};
 }