summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ctypes
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 /pkgs/development/ocaml-modules/ctypes
parent94a80621ac1d12671593074de88f1ee8012a7f82 (diff)
ocamlPackages.ctypes: 0.13.1 → 0.15.1
ocamlPackages.integers: 0.2.2 → 0.3.0
Diffstat (limited to 'pkgs/development/ocaml-modules/ctypes')
-rw-r--r--pkgs/development/ocaml-modules/ctypes/default.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index 567defea7d2f..bc76cfcd64cf 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;
};
}