depot/third_party/nixpkgs/pkgs/applications/virtualization/qemu/utils.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

24 lines
721 B
Nix

{ stdenv, installShellFiles, qemu_kvm, removeReferencesTo }:
stdenv.mkDerivation rec {
pname = "qemu-utils";
inherit (qemu_kvm) version;
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ qemu_kvm ];
disallowedRequisites = [ qemu_kvm ];
unpackPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
cp "${qemu_kvm}/bin/qemu-img" "$out/bin/qemu-img"
cp "${qemu_kvm}/bin/qemu-io" "$out/bin/qemu-io"
cp "${qemu_kvm}/bin/qemu-nbd" "$out/bin/qemu-nbd"
${removeReferencesTo}/bin/remove-references-to -t ${qemu_kvm} $out/bin/*
installManPage ${qemu_kvm}/share/man/man1/qemu-img.1.gz
installManPage ${qemu_kvm}/share/man/man8/qemu-nbd.8.gz
'';
inherit (qemu_kvm) meta;
}