about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/hxd
diff options
context:
space:
mode:
authorsterni <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-16 13:07:17 +0100
committerGitHub <noreply@github.com>2021-03-16 13:07:17 +0100
commitf0b078ef9ddd1bcb960c0e2131fcfa4a3e78f549 (patch)
tree36765bf55b0d24d11f8818ff857f96be1257b092 /pkgs/development/ocaml-modules/hxd
parent5fa9e2808fd5556ec36918a260bf27296c9a2fd6 (diff)
ocamlPackages.git: 3.3.0 -> 3.3.2; decompress: 1.2.0 -> 1.3.0; duff: 0.3 -> 0.4; and related updates (#116486)
* ocamlPackages.hxd: 0.2.0 -> 0.3.1

ocamlPackages.hxd: disable lwt by default on OCaml 4.06 (syntax error)

* ocamlPackages.duff: 0.3 -> 0.4

* ocamlPackages.decompress: 1.2.0 -> 1.3.0

Keep decompress 1.2.0 around as decompress-1-2 until imagelib supports
decompress 1.3.0: https://github.com/rlepigre/ocaml-imagelib/issues/49

* ocamlPackages.carton*: 0.2.0 -> 0.4.0

* ocamlPackages.git: 3.3.0 -> 3.3.2
Diffstat (limited to 'pkgs/development/ocaml-modules/hxd')
-rw-r--r--pkgs/development/ocaml-modules/hxd/default.nix23
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/hxd/default.nix b/pkgs/development/ocaml-modules/hxd/default.nix
index 1d677ac1a2efa..0775e21b1f8d5 100644
--- a/pkgs/development/ocaml-modules/hxd/default.nix
+++ b/pkgs/development/ocaml-modules/hxd/default.nix
@@ -1,11 +1,11 @@
 { lib, buildDunePackage, fetchurl
-, dune-configurator, cmdliner, angstrom
-, rresult, stdlib-shims, fmt, fpath
+, ocaml, dune-configurator, cmdliner
+, lwt, withLwt ? lib.versionAtLeast ocaml.version "4.07"
 }:
 
 buildDunePackage rec {
   pname = "hxd";
-  version = "0.2.0";
+  version = "0.3.1";
 
   useDune2 = true;
 
@@ -13,24 +13,25 @@ buildDunePackage rec {
 
   src = fetchurl {
     url = "https://github.com/dinosaure/hxd/releases/download/v${version}/hxd-v${version}.tbz";
-    sha256 = "1lyfrq058cc9x0c0hzsf3hv3ys0h8mxkwin9lldidlnj10izqf1l";
+    sha256 = "1c226c91e17cd329dec0c287bfd20f36302aa533069ff9c6ced32721f96b29bc";
   };
 
+  # ignore yes stderr output due to trapped SIGPIPE
+  postPatch = ''
+    sed -i 's|yes ".\+"|& 2> /dev/null|' test/*.t
+  '';
+
   nativeBuildInputs = [
     dune-configurator
   ];
 
+  propagatedBuildInputs = lib.optional withLwt lwt;
+
   buildInputs = [
     cmdliner
-    angstrom
-    rresult
-    fmt
-    fpath
   ];
 
-  propagatedBuildInputs = [
-    stdlib-shims
-  ];
+  doCheck = true;
 
   meta = with lib; {
     description = "Hexdump in OCaml";