2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, runtimeShell
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xe-guest-utilities";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "7.30.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xenserver";
|
|
|
|
repo = "xe-guest-utilities";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-gMb8QIUg8t0SiTtUzqeh4XM5hHgCXuf5KlV3OeoU0LI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
vendorHash = "sha256-zhpDvo8iujE426/gxJY+Pqfv99vLNKHqyMQbbXIKodY=";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-12-28 21:21:41 +00:00
|
|
|
substituteInPlace mk/xen-vcpu-hotplug.rules \
|
|
|
|
--replace "/bin/sh" "${runtimeShell}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-12-28 21:21:41 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
make RELEASE=nixpkgs
|
|
|
|
|
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-12-28 21:21:41 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
install -Dt "$out"/bin build/stage/usr/{,s}bin/*
|
|
|
|
install -Dt "$out"/etc/udev/rules.d build/stage/etc/udev/rules.d/*
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +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;
|
|
|
|
};
|
|
|
|
}
|