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";
|
2022-07-27 21:49:32 +01:00
|
|
|
version = "0.9.0";
|
2020-06-17 15:13:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpinelinux";
|
|
|
|
repo = "alpine-make-vm-image";
|
|
|
|
rev = "v${version}";
|
2022-07-27 21:49:32 +01:00
|
|
|
sha256 = "sha256-WxuExPn+ni4F7hxO1hrrYGm1hsehX8EcaOGevbrHKDM=";
|
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;
|
|
|
|
};
|
|
|
|
}
|