diff --git a/pkgs/development/ocaml-modules/mirage-net-xen/default.nix b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix index 0d7a7e53fb1a..49a00747cfa6 100644 --- a/pkgs/development/ocaml-modules/mirage-net-xen/default.nix +++ b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix @@ -17,8 +17,6 @@ buildDunePackage { inherit (netchannel) src version - useDune2 - minimumOCamlVersion meta ; diff --git a/pkgs/development/ocaml-modules/mirage-xen/default.nix b/pkgs/development/ocaml-modules/mirage-xen/default.nix index 0d53d0f9c3b7..a2b84e8fb5e4 100644 --- a/pkgs/development/ocaml-modules/mirage-xen/default.nix +++ b/pkgs/development/ocaml-modules/mirage-xen/default.nix @@ -1,7 +1,6 @@ { lib , buildDunePackage , fetchurl -, pkg-config , cstruct , lwt , shared-memory-ring-lwt @@ -11,7 +10,6 @@ , mirage-runtime , logs , fmt -, ocaml-freestanding , bheap , duration , io-page @@ -19,32 +17,14 @@ buildDunePackage rec { pname = "mirage-xen"; - version = "6.0.0"; - - useDune2 = true; + version = "7.2.0"; src = fetchurl { - url = "https://github.com/mirage/mirage-xen/releases/download/v${version}/mirage-xen-v${version}.tbz"; - sha256 = "f991e972059b27993c287ad010d9281fee061efaa1dd475d0955179f93710fbd"; + url = "https://github.com/mirage/mirage-xen/releases/download/v${version}/mirage-xen-${version}.tbz"; + sha256 = "sha256-5ZdzourQshHGtYPPdJtJLpH8P6ZLNbjQWy7TDxcY3OA="; }; - patches = [ - ./makefile-no-opam.patch - ./pkg-config.patch - ]; - - # can't handle OCAMLFIND_DESTDIR with substituteAll - postPatch = '' - substituteInPlace lib/bindings/mirage-xen.pc \ - --replace "@out@" "$out" \ - --replace "@OCAMLFIND_DESTDIR@" "$OCAMLFIND_DESTDIR" - ''; - - minimumOCamlVersion = "4.08"; - - nativeBuildInputs = [ - pkg-config - ]; + minimalOCamlVersion = "4.08"; propagatedBuildInputs = [ cstruct @@ -59,16 +39,8 @@ buildDunePackage rec { fmt bheap duration - (ocaml-freestanding.override { target = "xen"; }) ]; - # Move pkg-config files into their well-known location. - # This saves us an extra setup hook and causes no issues - # since we patch all relative paths out of the .pc file. - postInstall = '' - mv $OCAMLFIND_DESTDIR/pkgconfig $out/lib/pkgconfig - ''; - meta = with lib; { description = "Xen core platform libraries for MirageOS"; license = licenses.isc; diff --git a/pkgs/development/ocaml-modules/mirage-xen/makefile-no-opam.patch b/pkgs/development/ocaml-modules/mirage-xen/makefile-no-opam.patch deleted file mode 100644 index 905e6efc3f4a..000000000000 --- a/pkgs/development/ocaml-modules/mirage-xen/makefile-no-opam.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/bindings/Makefile b/lib/bindings/Makefile -index 4e413c0..67c7bdc 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 config var prefix)/lib/pkgconfig -+endif - - CC ?= cc - FREESTANDING_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags ocaml-freestanding) diff --git a/pkgs/development/ocaml-modules/mirage-xen/pkg-config.patch b/pkgs/development/ocaml-modules/mirage-xen/pkg-config.patch deleted file mode 100644 index 19205cf7ee4d..000000000000 --- a/pkgs/development/ocaml-modules/mirage-xen/pkg-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/bindings/mirage-xen.pc b/lib/bindings/mirage-xen.pc -index a03a217..8499aa4 100644 ---- a/lib/bindings/mirage-xen.pc -+++ b/lib/bindings/mirage-xen.pc -@@ -1,6 +1,6 @@ --prefix=${pcfiledir}/../.. -+prefix=@out@ - exec_prefix=${prefix} --libdir=${exec_prefix}/lib -+libdir=@OCAMLFIND_DESTDIR@ - - Name: mirage-xen - Version: 6.0.0 diff --git a/pkgs/development/ocaml-modules/netchannel/default.nix b/pkgs/development/ocaml-modules/netchannel/default.nix index e7b021d6fbe9..61e5c70edd44 100644 --- a/pkgs/development/ocaml-modules/netchannel/default.nix +++ b/pkgs/development/ocaml-modules/netchannel/default.nix @@ -12,20 +12,20 @@ , shared-memory-ring , sexplib , logs -, rresult +, macaddr +, lwt-dllist +, result }: buildDunePackage rec { pname = "netchannel"; - version = "2.0.0"; + version = "2.1.1"; - useDune2 = true; - - minimumOCamlVersion = "4.08"; + minimalOCamlVersion = "4.08"; src = fetchurl { - url = "https://github.com/mirage/mirage-net-xen/releases/download/v${version}/mirage-net-xen-v${version}.tbz"; - sha256 = "ec3906ef1804ef6a9e36b91f4ae73ce4849e9e0d1d36a80fe66b5f905fab93ad"; + url = "https://github.com/mirage/mirage-net-xen/releases/download/v${version}/mirage-net-xen-${version}.tbz"; + sha256 = "sha256-kYsAf6ntwWKUp26dMcp5BScdUOaGpM46050jVZe6gfs="; }; nativeBuildInputs = [ @@ -43,7 +43,9 @@ buildDunePackage rec { shared-memory-ring sexplib logs - rresult + macaddr + lwt-dllist + result ]; meta = with lib; {