summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/tuntap
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2020-06-25 23:22:21 +0200
committerGitHub <noreply@github.com>2020-06-25 23:22:21 +0200
commit3a0933a030decfc053b612a6a0d4a4ccc0c5f5da (patch)
tree35a1b54fe6036d50097749d00b05ba64c3bc0bb9 /pkgs/development/ocaml-modules/tuntap
parent3eb4864c8b7c51f050c41fd4fad4a5fb112f6bd1 (diff)
downloadnixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar.gz
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar.bz2
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar.lz
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar.xz
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.tar.zst
nixpkgs-3a0933a030decfc053b612a6a0d4a4ccc0c5f5da.zip
ocamlPackages.{ipaddr,macaddr}: 3.1.0 → 5.0.0 and update all affected packages (tuntap, conduit, cohttp, …) (#91350)
* ocamlPackages.{ipaddr,macaddr}: 3.1.0 → 5.0.0
* ipaddr-cstruct: new package (since 4.0.0)
* ipaddr-sexp: new package (since 4.0.0)
* macaddr-cstruct: new package (since 4.0.0)
* macaddr-sexp: new package (since 4.0.0)
* macaddr: enable tests (don't depend on ipaddr anymore)
* ocamlPackages.tuntap: 1.3.0 → 2.0.0
* ocamlPackages.conduit{,-lwt,-lwt-unix}: 1.4.0 → 2.2.2
* ocamlPackages.cohttp{,-lwt,-lwt-unix}: 2.1.3 → 2.5.1
* ocamlPackages: use dune 2 if pkg (indirectly) depends on cohttp-lwt-unix

dune refuses to build a package if one of its dependencies uses dune 2.
Diffstat (limited to 'pkgs/development/ocaml-modules/tuntap')
-rw-r--r--pkgs/development/ocaml-modules/tuntap/default.nix28
1 files changed, 15 insertions, 13 deletions
diff --git a/pkgs/development/ocaml-modules/tuntap/default.nix b/pkgs/development/ocaml-modules/tuntap/default.nix
index 8e8eaf5fd5e..a4536316ba4 100644
--- a/pkgs/development/ocaml-modules/tuntap/default.nix
+++ b/pkgs/development/ocaml-modules/tuntap/default.nix
@@ -1,25 +1,27 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ipaddr }:
+{ lib, buildDunePackage, fetchurl
+, ipaddr, macaddr, cmdliner
+}:
 
-assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
+buildDunePackage rec {
+  pname = "tuntap";
+  version = "2.0.0";
 
-stdenv.mkDerivation {
-  name = "ocaml-tuntap-1.3.0";
+  minimumOCamlVersion = "4.04.2";
 
-  src = fetchzip {
-    url = "https://github.com/mirage/ocaml-tuntap/archive/v1.3.0.tar.gz";
-    sha256 = "1cmd4kky875ks02gm2nb8yr80hmlfcnjdfyc63hvkh49acssy3d5";
+  src = fetchurl {
+    url = "https://github.com/mirage/ocaml-tuntap/releases/download/v${version}/tuntap-v${version}.tbz";
+    sha256 = "12wmls28h3jzikwyfw08d5f7ycsc9njwzbhd3qk2l8jnf5rakfsa";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ ipaddr ];
+  propagatedBuildInputs = [ ipaddr macaddr cmdliner ];
 
-  createFindlibDestdir = true;
+  # tests manipulate network devices and use network
+  # also depend on LWT 5
+  doCheck = false;
 
   meta = {
     description = "Bindings to the UNIX tuntap facility";
-    license = stdenv.lib.licenses.isc;
+    license = lib.licenses.isc;
     homepage = "https://github.com/mirage/ocaml-tuntap";
-    inherit (ocaml.meta) platforms;
   };
-
 }