1{ lib, stdenv, fetchurl
2, cpio, e2fsprogs, perl, pkg-config, ocamlPackages
3, glibc
4}:
5
6stdenv.mkDerivation (finalAttrs: {
7 pname = "supermin";
8 version = "5.2.2";
9
10 src = fetchurl {
11 url = "https://download.libguestfs.org/supermin/${lib.versions.majorMinor finalAttrs.version}-stable/supermin-${finalAttrs.version}.tar.gz";
12 sha256 = "zjkh02NcgWjPt8oMWoK51c71srJx+Et3bWO4u77sNY4=";
13 };
14
15 nativeBuildInputs = [ cpio e2fsprogs perl pkg-config ]
16 ++ (with ocamlPackages; [ findlib ocaml ]);
17 buildInputs = lib.optionals stdenv.hostPlatform.isGnu [ glibc glibc.static ];
18
19 postPatch = ''
20 patchShebangs src/bin2c.pl
21 '';
22
23 meta = with lib; {
24 homepage = "https://libguestfs.org/supermin.1.html";
25 description = "Tool for creating and building supermin appliances";
26 maintainers = with maintainers; [ qyliss ];
27 license = licenses.gpl2Plus;
28 platforms = platforms.linux;
29 };
30})