2020-06-17 15:13:20 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
|
|
|
, apk-tools, coreutils, e2fsprogs, findutils, gnugrep, gnused, kmod, qemu-utils
|
2020-11-24 15:29:28 +00:00
|
|
|
, util-linux
|
2020-06-17 15:13:20 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "alpine-make-vm-image";
|
2021-12-02 13:53:13 +00:00
|
|
|
version = "0.8.0";
|
2020-06-17 15:13:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpinelinux";
|
|
|
|
repo = "alpine-make-vm-image";
|
|
|
|
rev = "v${version}";
|
2021-12-02 13:53:13 +00:00
|
|
|
sha256 = "14rkqlg319h8agiydgknjfv2f7vl6rdj848xfkngvydrf1rr38j6";
|
2020-06-17 15:13:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/alpine-make-vm-image --set PATH ${lib.makeBinPath [
|
|
|
|
apk-tools coreutils e2fsprogs findutils gnugrep gnused kmod qemu-utils
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux
|
2020-06-17 15:13:20 +01:00
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/alpinelinux/alpine-make-vm-image";
|
|
|
|
description = "Make customized Alpine Linux disk image for virtual machines";
|
|
|
|
maintainers = with maintainers; [ qyliss ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|