From b56f47c60705c37482565109213856a8bb8ff744 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 15 Nov 2021 17:29:43 +0100 Subject: [PATCH 1/2] bindings Makefile: only invoke `opam var prefix` if opam is available Such a change has been trickled through other MirageOS3 cross-compilation Makefiles as well. Also, use `opam var prefix`, not the deprecated `opam config var prefix`. This also allows clean NixOS compilation. Adapted from mirage-xen 49eda0949ff91f8b4dae5d01e509592b541a8e96 --- lib/bindings/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bindings/Makefile b/lib/bindings/Makefile index 171001f..c6d0b2d 100644 --- a/lib/bindings/Makefile +++ b/lib/bindings/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 var prefix)/lib/pkgconfig +endif CC ?= cc FREESTANDING_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags ocaml-freestanding) From d5edc936d65170c3b8efb8c0d9c7e5b3cb9615d8 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 15 Nov 2021 17:38:52 +0100 Subject: [PATCH 2/2] opam: raise ocaml lower bound to 4.08.0 --- mirage-solo5.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirage-solo5.opam b/mirage-solo5.opam index 9eee92a..0173ec8 100644 --- a/mirage-solo5.opam +++ b/mirage-solo5.opam @@ -19,7 +19,7 @@ build: [ depends: [ "dune" {>= "2.6.0"} "bheap" {>= "2.0.0"} - "ocaml" {>= "4.06.0"} + "ocaml" {>= "4.08.0"} "cstruct" {>= "1.0.1"} "lwt" {>= "2.4.3"} "ocaml-freestanding" {>= "0.4.5"}