From 13eede3e6666b84a5a5b53899ebb68357b440a35 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 26 Dec 2020 19:35:40 +0100 Subject: [PATCH] ocamlPackages.mirage-block-ramdisk: init at 0.5 --- .../mirage-block-ramdisk/default.nix | 29 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-block-ramdisk/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-block-ramdisk/default.nix b/pkgs/development/ocaml-modules/mirage-block-ramdisk/default.nix new file mode 100644 index 00000000000..1dcc769abb6 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-block-ramdisk/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchurl, buildDunePackage, io-page, io-page-unix, mirage-block, alcotest +, mirage-block-combinators }: + +buildDunePackage rec { + pname = "mirage-block-ramdisk"; + version = "0.5"; + + useDune2 = true; + + src = fetchurl { + url = + "https://github.com/mirage/mirage-block-ramdisk/releases/download/${version}/mirage-block-ramdisk-${version}.tbz"; + sha256 = "cc0e814fd54efe7a5b7a8c5eb1c04e2dece751b7d8dee2d95908a0768896e8af"; + }; + + minimumOCamlVersion = "4.06"; + + propagatedBuildInputs = [ io-page mirage-block ]; + + doCheck = true; + checkInputs = [ alcotest io-page-unix mirage-block-combinators ]; + + meta = with lib; { + description = "In-memory BLOCK device for MirageOS"; + homepage = "https://github.com/mirage/mirage-block-ramdisk"; + license = licenses.isc; + maintainers = with maintainers; [ ehmry ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index c8b868f74b6..06ca7b01fae 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -577,6 +577,8 @@ let mirage-block-combinators = callPackage ../development/ocaml-modules/mirage-block/combinators.nix { }; + mirage-block-ramdisk = callPackage ../development/ocaml-modules/mirage-block-ramdisk { }; + mirage-bootvar-unix = callPackage ../development/ocaml-modules/mirage-bootvar-unix { }; mirage-channel = callPackage ../development/ocaml-modules/mirage-channel { };