2020-06-17 14:13:20 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2023-10-13 00:31:41 +00:00
|
|
|
, apk-tools, coreutils, dosfstools, e2fsprogs, findutils, gnugrep, gnused, kmod, qemu-utils
|
2023-05-23 23:14:12 +00:00
|
|
|
, rsync, util-linux
|
2020-06-17 14:13:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "alpine-make-vm-image";
|
2024-01-08 04:55:48 +00:00
|
|
|
version = "0.13.0";
|
2020-06-17 14:13:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpinelinux";
|
|
|
|
repo = "alpine-make-vm-image";
|
|
|
|
rev = "v${version}";
|
2024-01-08 04:55:48 +00:00
|
|
|
sha256 = "sha256-ilXoee19Wp/tB4f/0c7vWki+dnEPYp4f/IKzkGwxdbU=";
|
2020-06-17 14:13:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/alpine-make-vm-image --set PATH ${lib.makeBinPath [
|
2023-10-13 00:31:41 +00:00
|
|
|
apk-tools coreutils dosfstools e2fsprogs findutils gnugrep gnused kmod qemu-utils
|
2023-05-23 23:14:12 +00:00
|
|
|
rsync util-linux
|
2020-06-17 14:13:20 +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-23 11:58:04 +00:00
|
|
|
maintainers = with maintainers; [ wegank ];
|
2020-06-17 14:13:20 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-23 21:09:35 +00:00
|
|
|
mainProgram = "alpine-make-vm-image";
|
2020-06-17 14:13:20 +00:00
|
|
|
};
|
|
|
|
}
|