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";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "8.4.0";
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xenserver";
|
|
|
|
repo = "xe-guest-utilities";
|
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-LpZx+Km2qRywYK/eFLP3aCDku6K6HC4+MzEODH+8Gvs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
deleteVendor = true;
|
|
|
|
vendorHash = "sha256-X/BI+ZhoqCGCmJfccyEBVgZc70aRTp3rL5j+rBWG5fE=";
|
2022-12-28 21:21:41 +00:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|