nixpkgs/pkgs/tools/virtualization/xe-guest-utilities/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.0 KiB
Nix
Raw Normal View History

2022-12-15 18:44:43 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, runtimeShell
2022-12-15 18:44:43 +00:00
}:
2022-12-15 18:44:43 +00:00
buildGoModule rec {
2018-05-28 12:59:57 +00:00
pname = "xe-guest-utilities";
2022-12-15 18:44:43 +00:00
version = "7.30.0";
src = fetchFromGitHub {
owner = "xenserver";
repo = "xe-guest-utilities";
rev = "v${version}";
hash = "sha256-gMb8QIUg8t0SiTtUzqeh4XM5hHgCXuf5KlV3OeoU0LI=";
};
2022-12-15 18:44:43 +00:00
vendorHash = "sha256-zhpDvo8iujE426/gxJY+Pqfv99vLNKHqyMQbbXIKodY=";
postPatch = ''
substituteInPlace mk/xen-vcpu-hotplug.rules \
--replace "/bin/sh" "${runtimeShell}"
'';
buildPhase = ''
2022-12-15 18:44:43 +00:00
runHook preBuild
make RELEASE=nixpkgs
runHook postBuild
'';
installPhase = ''
2022-12-15 18:44:43 +00:00
runHook preInstall
2022-12-15 18:44:43 +00:00
install -Dt "$out"/bin build/stage/usr/{,s}bin/*
install -Dt "$out"/etc/udev/rules.d build/stage/etc/udev/rules.d/*
2022-12-15 18:44:43 +00:00
runHook postInstall
'';
2022-12-15 18:44:43 +00:00
meta = {
description = "XenServer guest utilities";
homepage = "https://github.com/xenserver/xe-guest-utilities";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.linux;
};
}