From afd9d601202989cc1b7820dbcb4bf1b159be28cc Mon Sep 17 00:00:00 2001 From: Pankaj Raghav Date: Mon, 24 Jun 2024 05:03:44 +0200 Subject: vmctl: init at v0.99-unstable-2024-05-14 --- pkgs/by-name/vm/vmctl/package.nix | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 pkgs/by-name/vm/vmctl/package.nix (limited to 'pkgs/by-name/vm') diff --git a/pkgs/by-name/vm/vmctl/package.nix b/pkgs/by-name/vm/vmctl/package.nix new file mode 100644 index 000000000000..910ecd5f9d6d --- /dev/null +++ b/pkgs/by-name/vm/vmctl/package.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + openssh, + socat, + gawk, + cloud-utils, + cdrtools, + qemu, + qemu-utils, + coreutils, + getopt, + makeWrapper, +}: + +stdenvNoCC.mkDerivation { + pname = "vmctl"; + version = "v0.99-unstable-2024-05-14"; + + src = fetchFromGitHub { + owner = "SamsungDS"; + repo = "vmctl"; + rev = "5b6b7084b8cba06b474c0e020df965237f2c832c"; + hash = "sha256-yDgaY2RJXBjWkMSQb4JaJzMGLFzowfOGixSRzzv2iIk="; + }; + + dontBuild = true; + + postPatch = '' + substituteInPlace vmctl \ + --replace 'BASEDIR="$(dirname "$(readlink -f "''${BASH_SOURCE[0]}")")"' 'BASEDIR="${placeholder "out"}"' + ''; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + install -Dm555 vmctl -t "$out/bin" + wrapProgram "$out/bin/vmctl" \ + --set PATH "${ + lib.makeBinPath [ + openssh + socat + gawk + cloud-utils + cdrtools + qemu + qemu-utils + coreutils + getopt + ] + }" + cp -r {cmd,common,contrib,lib} $out + + runHook postInstall + ''; + + meta = { + description = "Command line tool focused on NVMe testing in QEMU"; + homepage = "https://github.com/SamsungDS/vmctl"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ panky ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; + }; +} -- cgit 1.4.1