From 7c9de65429b9e478c128d30c1e208edcc999155c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 29 Mar 2021 18:08:35 +0200 Subject: [PATCH] ocamlPackages.tcpip: 6.0.0 -> 6.1.0 https://github.com/mirage/mirage-tcpip/releases/tag/v6.1.0 --- pkgs/development/ocaml-modules/tcpip/default.nix | 15 ++++++++++++--- .../ocaml-modules/tcpip/makefile-no-opam.patch | 12 ++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix index 80fa01066f1..4d9f97480ef 100644 --- a/pkgs/development/ocaml-modules/tcpip/default.nix +++ b/pkgs/development/ocaml-modules/tcpip/default.nix @@ -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; diff --git a/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch b/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch new file mode 100644 index 00000000000..1603a1278b0 --- /dev/null +++ b/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch @@ -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 $$?) +