Commit e7312503 authored by sternenseemann's avatar sternenseemann Committed by Vincent Laporte
Browse files
parent 4cf4f3c4
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -13,27 +13,15 @@

buildDunePackage rec {
  pname = "tcpip";
  version = "6.1.0";
  version = "6.2.0";

  useDune2 = true;

  src = fetchurl {
    url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
    sha256 = "7b3ed2e1ca835c1cc65ac911bcb0de12ebc2b580dd195006bdea2cb387510474";
    sha256 = "d0f6e643ce04da808d5f977c5ab2422cdb4f67e7abdc46dd6776ceada7151e1b";
  };

  patches = [
    ./makefile-no-opam.patch
  ];

  # Make tests compatible with alcotest 1.4.0
  postPatch = ''
    for p in common.ml test_tcp_options.ml
    do
      substituteInPlace test/$p --replace 'Fmt.kstrf Alcotest.fail' 'Fmt.kstrf (fun s -> Alcotest.fail s)'
    done
  '';

  nativeBuildInputs = [
    bisect_ppx
    ppx_cstruct
+0 −12
Original line number Diff line number Diff line
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 $$?)