From c8663660dc8ff1a8a5aedbd5566f0a385ad22c51 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 18 Sep 2019 12:33:08 -0500 Subject: [PATCH] linuxPackages.fwts-efi-runtime: init --- pkgs/os-specific/linux/fwts/module.nix | 31 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/os-specific/linux/fwts/module.nix diff --git a/pkgs/os-specific/linux/fwts/module.nix b/pkgs/os-specific/linux/fwts/module.nix new file mode 100644 index 000000000000..ef90e0c303ba --- /dev/null +++ b/pkgs/os-specific/linux/fwts/module.nix @@ -0,0 +1,31 @@ +{ stdenv, fwts, kernel }: + +stdenv.mkDerivation rec { + pname = "fwts-efi-runtime"; + version = "${fwts.version}-${kernel.version}"; + + inherit (fwts) src; + + sourceRoot = "source/efi_runtime"; + + postPatch = '' + substituteInPlace Makefile --replace \ + '/lib/modules/$(KVER)/build' \ + '${kernel.dev}/lib/modules/${kernel.modDirVersion}/build' + ''; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + hardeningDisable = [ "pic" ]; + + makeFlags = [ + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; + + meta = with stdenv.lib; { + inherit (fwts.meta) homepage license; + description = fwts.meta.description + "(efi-runtime kernel module)"; + maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81fae113b0a9..677aee157458 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15808,6 +15808,8 @@ in evdi = callPackage ../os-specific/linux/evdi { }; + fwts-efi-runtime = callPackage ../os-specific/linux/fwts/module.nix { }; + hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { }; e1000e = if stdenv.lib.versionOlder kernel.version "4.10" then callPackage ../os-specific/linux/e1000e {} else null;