ocamlPackages.tcpip: 6.0.0 -> 6.1.0

https://github.com/mirage/mirage-tcpip/releases/tag/v6.1.0
This commit is contained in:
sternenseemann 2021-03-29 18:08:35 +02:00 committed by Vincent Laporte
parent 3ec81e0849
commit 7c9de65429
2 changed files with 24 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{ lib, buildDunePackage, fetchurl
, bisect_ppx, ppx_cstruct
, bisect_ppx, ppx_cstruct, pkg-config
, rresult, cstruct, cstruct-lwt, mirage-net, mirage-clock
, mirage-random, mirage-stack, mirage-protocols, mirage-time
, ipaddr, macaddr, macaddr-cstruct, mirage-profile, fmt
@ -7,22 +7,29 @@
, alcotest, mirage-flow, mirage-vnetif, pcap-format
, mirage-clock-unix, arp, ipaddr-cstruct, mirage-random-test
, lru
, withFreestanding ? false
, ocaml-freestanding
}:
buildDunePackage rec {
pname = "tcpip";
version = "6.0.0";
version = "6.1.0";
useDune2 = true;
src = fetchurl {
url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "0wbrs8jz1vw3zdrqmqcwawxh4yhc2gy30rw7gz4w116cblkvnb8s";
sha256 = "7b3ed2e1ca835c1cc65ac911bcb0de12ebc2b580dd195006bdea2cb387510474";
};
patches = [
./makefile-no-opam.patch
];
nativeBuildInputs = [
bisect_ppx
ppx_cstruct
pkg-config
];
propagatedBuildInputs = [
@ -48,6 +55,8 @@ buildDunePackage rec {
randomconv
ethernet
lru
] ++ lib.optionals withFreestanding [
ocaml-freestanding
];
doCheck = true;

View file

@ -0,0 +1,12 @@
diff --git a/freestanding/Makefile b/freestanding/Makefile
index f22d220d..3e97b4c5 100644
--- a/freestanding/Makefile
+++ b/freestanding/Makefile
@@ -1,4 +1,6 @@
-PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig
+ifneq (, $(shell command -v opam))
+ PKG_CONFIG_PATH ?= $(shell opam config var prefix)/lib/pkgconfig
+endif
EXISTS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists ocaml-freestanding; echo $$?)