mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
38 lines
795 B
Nix
38 lines
795 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fwts,
|
|
kernel,
|
|
kernelModuleMakeFlags,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "fwts-efi-runtime";
|
|
version = "${fwts.version}-${kernel.version}";
|
|
|
|
inherit (fwts) src;
|
|
|
|
sourceRoot = "${fwts.sourceRoot}/efi_runtime";
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile --replace \
|
|
'/lib/modules/$(KVER)/build' \
|
|
'${kernel.dev}/lib/modules/${kernel.modDirVersion}/build'
|
|
'';
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
makeFlags = kernelModuleMakeFlags ++ [
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
];
|
|
|
|
meta = {
|
|
inherit (fwts.meta) homepage license;
|
|
description = fwts.meta.description + "(efi-runtime kernel module)";
|
|
maintainers = [ ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|