git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.ctypes: 0.13.1 → 0.15.1

ocamlPackages.integers: 0.2.2 → 0.3.0

commita25381b0191ef939ec5c929709803846e1b30c9f authorVincent Laporte <Vincent.Laporte@gmail.com> dateTue 22 Oct 2019, 05:47 (7 years ago) parent94a8062
2 files changed+21−23
pkgs/development/ocaml-modules/ctypes/default.nix+12−10 pkgs/development/ocaml-modules/integers/default.nix+9−13
pkgs/development/ocaml-modules/ctypes/default.nix+12−10
@@ -1,28 +1,29 @@
1−{ stdenv, buildOcaml, fetchzip, libffi, pkgconfig, ncurses, integers }:
1+{ stdenv, fetchzip, ocaml, findlib, libffi, pkgconfig, ncurses, integers }:
22
3−buildOcaml {
4− name = "ctypes";
5− version = "0.13.1";
3+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
4+then throw "ctypes is not available for OCaml ${ocaml.version}"
5+else
66
7− minimumSupportedOcamlVersion = "4";
7+stdenv.mkDerivation rec {
8+ name = "ocaml${ocaml.version}-ctypes-${version}";
9+ version = "0.15.1";
810
911 src = fetchzip {
10− url = "https://github.com/ocamllabs/ocaml-ctypes/archive/67e711ec891e087fbe1e0b4665aa525af4eaa409.tar.gz";
11− sha256 = "1z84s5znr3lj84rzv6m37xxj9h7fwx4qiiykx3djf52qgk1rb2xb";
12+ url = "https://github.com/ocamllabs/ocaml-ctypes/archive/${version}.tar.gz";
13+ sha256 = "0adas974bwinn8jidb6chljkpd70s041h2a969dicsj0xsg6wys6";
1214 };
1315
1416 nativeBuildInputs = [ pkgconfig ];
15− buildInputs = [ ncurses ];
17+ buildInputs = [ ocaml findlib ncurses ];
1618 propagatedBuildInputs = [ integers libffi ];
1719
18− hasSharedObjects = true;
19−
2020 buildPhase = ''
2121 make XEN=false libffi.config ctypes-base ctypes-stubs
2222 make XEN=false ctypes-foreign
2323 '';
2424
2525 installPhase = ''
26+ mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
2627 make install XEN=false
2728 '';
2829
@@ -31,5 +32,6 @@ buildOcaml {
3132 description = "Library for binding to C libraries using pure OCaml";
3233 license = licenses.mit;
3334 maintainers = [ maintainers.ericbmerritt ];
35+ inherit (ocaml.meta) platforms;
3436 };
3537}
pkgs/development/ocaml-modules/integers/default.nix+9−13
@@ -1,22 +1,18 @@
1−{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
1+{ lib, fetchzip, buildDunePackage }:
22
3−stdenv.mkDerivation {
4− name = "ocaml${ocaml.version}-integers-0.2.2";
3+buildDunePackage rec {
4+ pname = "integers";
5+ version = "0.3.0";
56
6− src = fetchurl {
7− url = https://github.com/ocamllabs/ocaml-integers/releases/download/v0.2.2/integers-0.2.2.tbz;
8− sha256 = "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk";
7+ src = fetchzip {
8+ url = "https://github.com/ocamllabs/ocaml-integers/archive/${version}.tar.gz";
9+ sha256 = "1yhif5zh4srh63mhimfx3p5ljpb3lixjdd3i9pjnbj2qgpzlqj8p";
910 };
1011
11− buildInputs = [ ocaml findlib ocamlbuild topkg ];
12−
13− inherit (topkg) buildPhase installPhase;
14−
1512 meta = {
1613 description = "Various signed and unsigned integer types for OCaml";
17− license = stdenv.lib.licenses.mit;
14+ license = lib.licenses.mit;
1815 homepage = https://github.com/ocamllabs/ocaml-integers;
19− maintainers = [ stdenv.lib.maintainers.vbgl ];
20− inherit (ocaml.meta) platforms;
16+ maintainers = [ lib.maintainers.vbgl ];
2117 };
2218}