2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2023-10-19 13:55:26 +00:00
|
|
|
, apk-tools, coreutils, dosfstools, e2fsprogs, findutils, gnugrep, gnused, kmod, qemu-utils
|
2023-05-24 13:37:59 +00:00
|
|
|
, rsync, util-linux
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "alpine-make-vm-image";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.13.0";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpinelinux";
|
|
|
|
repo = "alpine-make-vm-image";
|
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
sha256 = "sha256-ilXoee19Wp/tB4f/0c7vWki+dnEPYp4f/IKzkGwxdbU=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/alpine-make-vm-image --set PATH ${lib.makeBinPath [
|
2023-10-19 13:55:26 +00:00
|
|
|
apk-tools coreutils dosfstools e2fsprogs findutils gnugrep gnused kmod qemu-utils
|
2023-05-24 13:37:59 +00:00
|
|
|
rsync util-linux
|
2020-07-18 16:06:22 +00:00
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/alpinelinux/alpine-make-vm-image";
|
|
|
|
description = "Make customized Alpine Linux disk image for virtual machines";
|
|
|
|
license = licenses.mit;
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ wegank ];
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "alpine-make-vm-image";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
}
|