2879caafcf
isn't maintained to the standards people expect of kernels in nixpkgs
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
kernel,
|
|
kmod,
|
|
gnugrep,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "vmware-modules";
|
|
version = "workstation-25h2-20251015-${kernel.version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "philipl";
|
|
repo = "vmware-host-modules";
|
|
rev = "5c80f597017882f76e9c7ffd48a292a4b7c860fe";
|
|
hash = "sha256-EFOkzwul1QCaKUBwFqH8uIsIUcvtEmxYVaE/OdoHdZI=";
|
|
};
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace '/lib/modules/$(VM_UNAME)/misc' "$out/lib/modules/${kernel.modDirVersion}/misc" \
|
|
--replace /sbin/modinfo "${kmod}/bin/modinfo" \
|
|
--replace 'test -z "$(DESTDIR)"' "0"
|
|
|
|
for module in "vmmon-only" "vmnet-only"; do
|
|
substituteInPlace "./$module/Makefile" \
|
|
--replace '/lib/modules/' "${kernel.dev}/lib/modules/" \
|
|
--replace /bin/grep "${gnugrep}/bin/grep"
|
|
done
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/misc"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Kernel modules needed for VMware hypervisor";
|
|
homepage = "https://github.com/mkubecek/vmware-host-modules";
|
|
license = lib.licenses.gpl2Only;
|
|
platforms = [ "x86_64-linux" ];
|
|
maintainers = with lib.maintainers; [
|
|
deinferno
|
|
vifino
|
|
];
|
|
};
|
|
}
|