summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-10-21 05:36:52 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-10-28 07:37:24 +0000
commit8dc21739057079bdd749537dccb1fa31205ff0ff (patch)
tree9fa31756a7827ec4c9c12705f1e8261fb3caf2ba /pkgs/development/ocaml-modules
parentea5684b438947cdfd886e0baae80146dd485b4e9 (diff)
downloadnixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar.gz
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar.bz2
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar.lz
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar.xz
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.tar.zst
nixpkgs-8dc21739057079bdd749537dccb1fa31205ff0ff.zip
ocamlPackages.decompress: 0.6 → 0.9.0
ocamlPackages.git: 1.11.5 → 2.1.0

ocamlPackages.imagelib: 20171028 → 20191011

ocamlPackages.imagelib-unix: init
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/checkseum/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/decompress/default.nix37
-rw-r--r--pkgs/development/ocaml-modules/git/default.nix19
-rw-r--r--pkgs/development/ocaml-modules/imagelib/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/imagelib/unix.nix8
5 files changed, 50 insertions, 41 deletions
diff --git a/pkgs/development/ocaml-modules/checkseum/default.nix b/pkgs/development/ocaml-modules/checkseum/default.nix
index 0e348dd65c3..18e06d260f4 100644
--- a/pkgs/development/ocaml-modules/checkseum/default.nix
+++ b/pkgs/development/ocaml-modules/checkseum/default.nix
@@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
 
   inherit (dune) installPhase;
 
+  passthru = { inherit hasC; };
+
   meta = {
     homepage = "https://github.com/mirage/checkseum";
     description = "ADLER-32 and CRC32C Cyclic Redundancy Check";
diff --git a/pkgs/development/ocaml-modules/decompress/default.nix b/pkgs/development/ocaml-modules/decompress/default.nix
index 70ec7fd34ae..828d3a98f9d 100644
--- a/pkgs/development/ocaml-modules/decompress/default.nix
+++ b/pkgs/development/ocaml-modules/decompress/default.nix
@@ -1,30 +1,27 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
+{ lib, fetchurl, buildDunePackage
+, checkseum, cmdliner
+, alcotest, bos, camlzip, mmap, re
 }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.03"
-then throw "decompress is not available for OCaml ${ocaml.version}"
-else
+buildDunePackage rec {
+	version = "0.9.0";
+	pname = "decompress";
 
-stdenv.mkDerivation rec {
-	version = "0.6";
-	name = "ocaml${ocaml.version}-decompress-${version}";
-
-	src = fetchFromGitHub {
-		owner = "mirage";
-		repo = "decompress";
-		rev = "v${version}";
-		sha256 = "0hfs5zrvimzvjwdg57vrxx9bb7irvlm07dk2yv3s5qhj30zimd08";
+	src = fetchurl {
+		url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-v${version}.tbz";
+		sha256 = "0fryhcvv96vfca51c7kqdn3n3canqsbbvfbi75ya6lca4lmpipbh";
 	};
 
-	buildInputs = [ ocaml findlib ocamlbuild topkg ];
-
-	inherit (topkg) buildPhase installPhase;
+	buildInputs = [ cmdliner ];
+	propagatedBuildInputs = [ checkseum ];
+	checkInputs = lib.optionals doCheck [ alcotest bos camlzip mmap re ];
+	doCheck = true;
 
 	meta = {
 		description = "Pure OCaml implementation of Zlib";
-		license = stdenv.lib.licenses.mit;
-		maintainers = [ stdenv.lib.maintainers.vbgl ];
-		inherit (src.meta) homepage;
-		inherit (ocaml.meta) platforms;
+		license = lib.licenses.mit;
+		maintainers = [ lib.maintainers.vbgl ];
+		homepage = "https://github.com/mirage/decompress";
+		broken = !checkseum.hasC;
 	};
 }
diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix
index 35f8f5d52e9..929382abe76 100644
--- a/pkgs/development/ocaml-modules/git/default.nix
+++ b/pkgs/development/ocaml-modules/git/default.nix
@@ -1,27 +1,28 @@
-{ stdenv, fetchFromGitHub, buildDunePackage
-, astring, decompress, fmt, hex, logs, mstruct, ocaml_lwt, ocamlgraph, ocplib-endian, uri
-, alcotest, mtime, nocrypto
+{ lib, fetchFromGitHub, buildDunePackage
+, alcotest, git, mtime, nocrypto
+, angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt
+, fpath, hex, ke, logs, lru, ocaml_lwt, ocamlgraph, ocplib-endian, uri, rresult
 }:
 
 buildDunePackage rec {
   pname = "git";
-	version = "1.11.5";
+	version = "2.1.0";
 
 	src = fetchFromGitHub {
 		owner = "mirage";
 		repo = "ocaml-git";
 		rev = version;
-		sha256 = "0r1bxpxjjnl9hh8xbabsxl7svzvd19hfy73a2y1m4kljmw64dpfh";
+		sha256 = "0v55zkwgml6i5hp0kzynbi58z6j15k3qgzg06b3h8pdbv5fwd1jp";
 	};
 
-	buildInputs = [ alcotest mtime nocrypto ];
-	propagatedBuildInputs = [ astring decompress fmt hex logs mstruct ocaml_lwt ocamlgraph ocplib-endian uri ];
+	propagatedBuildInputs = [ angstrom astring cstruct decompress digestif encore duff fmt fpath hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult ];
+	checkInputs = lib.optionals doCheck [ alcotest git mtime nocrypto ];
 	doCheck = true;
 
 	meta = {
 		description = "Git format and protocol in pure OCaml";
-		license = stdenv.lib.licenses.isc;
-		maintainers = [ stdenv.lib.maintainers.vbgl ];
+		license = lib.licenses.isc;
+		maintainers = [ lib.maintainers.vbgl ];
 		inherit (src.meta) homepage;
 	};
 }
diff --git a/pkgs/development/ocaml-modules/imagelib/default.nix b/pkgs/development/ocaml-modules/imagelib/default.nix
index 77b18f0ce3a..12b8a757e16 100644
--- a/pkgs/development/ocaml-modules/imagelib/default.nix
+++ b/pkgs/development/ocaml-modules/imagelib/default.nix
@@ -1,26 +1,27 @@
-{ stdenv, fetchFromGitHub, which, ocaml, findlib, ocamlbuild, decompress }:
+{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, decompress }:
 
-stdenv.mkDerivation rec {
-  version = "20171028";
-  name = "ocaml${ocaml.version}-imagelib-${version}";
+buildDunePackage rec {
+  minimumOCamlVersion = "4.07";
+  version = "20191011";
+  pname = "imagelib";
   src = fetchFromGitHub {
     owner = "rlepigre";
     repo = "ocaml-imagelib";
-    rev = "ocaml-imagelib_${version}";
-    sha256 = "1frkrgcrv4ybdmqcfxpfsywx0hm1arxgxp32n8kzky6qip1g0zxf";
+    rev = "03fed7733825cef7e0465163f398f6af810e2e75";
+    sha256 = "0h7vgyss42nhlfqpbdnb54nxq86rskqi2ilx8b87r0hi19hqx463";
   };
 
-  buildInputs = [ which ocaml findlib ocamlbuild ];
+  patches = [ (fetchpatch {
+    url = "https://github.com/rlepigre/ocaml-imagelib/pull/24/commits/4704fd44adcda62e0d96ea5b1927071326aa6111.patch";
+    sha256 = "0ipjab1hfa2v2pnd8g1k3q2ia0plgiw7crm3fa4w2aqpzdyabkb9";
+  }) ];
 
   propagatedBuildInputs = [ decompress ];
 
-  createFindlibDestdir = true;
-
   meta = {
     description = "Image formats such as PNG and PPM in OCaml";
-    license = stdenv.lib.licenses.lgpl3;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    license = lib.licenses.lgpl3;
+    maintainers = [ lib.maintainers.vbgl ];
     inherit (src.meta) homepage;
-    inherit (ocaml.meta) platforms;
   };
 }
diff --git a/pkgs/development/ocaml-modules/imagelib/unix.nix b/pkgs/development/ocaml-modules/imagelib/unix.nix
new file mode 100644
index 00000000000..48986b15a8f
--- /dev/null
+++ b/pkgs/development/ocaml-modules/imagelib/unix.nix
@@ -0,0 +1,8 @@
+{ buildDunePackage, imagelib }:
+
+buildDunePackage {
+  pname = "imagelib-unix";
+  inherit (imagelib) version src meta;
+
+  propagatedBuildInputs = [ imagelib ];
+}