1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 io-page,
6 mirage-block,
7}:
8
9buildDunePackage rec {
10 pname = "mirage-block-ramdisk";
11 version = "0.5";
12
13 src = fetchurl {
14 url = "https://github.com/mirage/mirage-block-ramdisk/releases/download/${version}/mirage-block-ramdisk-${version}.tbz";
15 sha256 = "cc0e814fd54efe7a5b7a8c5eb1c04e2dece751b7d8dee2d95908a0768896e8af";
16 };
17
18 # Make compatible with cstruct 6.1.0
19 postPatch = ''
20 substituteInPlace src/ramdisk.ml --replace 'Cstruct.len' 'Cstruct.length'
21 '';
22
23 minimalOCamlVersion = "4.06";
24 duneVersion = "3";
25
26 propagatedBuildInputs = [
27 io-page
28 mirage-block
29 ];
30
31 doCheck = false;
32
33 meta = with lib; {
34 description = "In-memory BLOCK device for MirageOS";
35 homepage = "https://github.com/mirage/mirage-block-ramdisk";
36 license = licenses.isc;
37 };
38}