1{
2 stdenv,
3 fetchzip,
4 kernel,
5 lib,
6}:
7stdenv.mkDerivation (finalAttrs: {
8 pname = "hpuefi-mod";
9 version = "3.05";
10
11 src = fetchzip {
12 url = "https://ftp.hp.com/pub/softpaq/sp150501-151000/sp150953.tgz";
13 hash = "sha256-ofzqu5Y2g+QU0myJ4SF39ZJGXH1zXzX1Ys2FhXVTQKE=";
14 stripRoot = false;
15 };
16
17 nativeBuildInputs = kernel.moduleBuildDependencies;
18 strictDeps = true;
19
20 makeFlags = [
21 "KVERS=${kernel.modDirVersion}"
22 "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
23 "DESTDIR=$(out)"
24 ];
25
26 unpackPhase = ''
27 tar -xzf "$src/non-rpms/hpuefi-mod-${finalAttrs.version}.tgz"
28 cd hpuefi-mod-${finalAttrs.version}
29 '';
30
31 prePatch = ''
32 substituteInPlace "Makefile" \
33 --replace depmod \#
34 '';
35
36 meta = {
37 homepage = "https://ftp.hp.com/pub/caps-softpaq/cmit/linuxtools/HP_LinuxTools.html";
38 description = "Kernel module for managing BIOS settings and updating BIOS firmware on supported HP computers";
39 license = lib.licenses.gpl2Only; # See "License" section in ./non-rpms/hpuefi-mod-*.tgz/README
40 platforms = [ "x86_64-linux" ];
41 maintainers = with lib.maintainers; [ tomodachi94 ];
42 };
43})