aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/os-specific/linux/fwts/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/fwts/module.nix')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fwts/module.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/fwts/module.nix b/nixpkgs/pkgs/os-specific/linux/fwts/module.nix
new file mode 100644
index 00000000000..ef90e0c303b
--- /dev/null
+++ b/nixpkgs/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;
+ };
+}