evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / vm / vmctl / package.nix
blob910ecd5f9d6d66799784ba85ebbacd96154ea03e
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   openssh,
6   socat,
7   gawk,
8   cloud-utils,
9   cdrtools,
10   qemu,
11   qemu-utils,
12   coreutils,
13   getopt,
14   makeWrapper,
17 stdenvNoCC.mkDerivation {
18   pname = "vmctl";
19   version = "v0.99-unstable-2024-05-14";
21   src = fetchFromGitHub {
22     owner = "SamsungDS";
23     repo = "vmctl";
24     rev = "5b6b7084b8cba06b474c0e020df965237f2c832c";
25     hash = "sha256-yDgaY2RJXBjWkMSQb4JaJzMGLFzowfOGixSRzzv2iIk=";
26   };
28   dontBuild = true;
30   postPatch = ''
31     substituteInPlace vmctl \
32       --replace 'BASEDIR="$(dirname "$(readlink -f "''${BASH_SOURCE[0]}")")"' 'BASEDIR="${placeholder "out"}"'
33   '';
35   nativeBuildInputs = [ makeWrapper ];
37   installPhase = ''
38     runHook preInstall
40     install -Dm555 vmctl -t "$out/bin"
41     wrapProgram "$out/bin/vmctl" \
42       --set PATH "${
43         lib.makeBinPath [
44           openssh
45           socat
46           gawk
47           cloud-utils
48           cdrtools
49           qemu
50           qemu-utils
51           coreutils
52           getopt
53         ]
54       }"
55     cp -r {cmd,common,contrib,lib} $out
57     runHook postInstall
58   '';
60   meta = {
61     description = "Command line tool focused on NVMe testing in QEMU";
62     homepage = "https://github.com/SamsungDS/vmctl";
63     license = lib.licenses.gpl3;
64     maintainers = with lib.maintainers; [ panky ];
65     platforms = [
66       "x86_64-linux"
67       "aarch64-linux"
68     ];
69   };