depot/pkgs/os-specific/linux/mstflint_access/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

36 lines
1,018 B
Nix

{ lib, stdenv, fetchurl, kernel, kmod, mstflint }:
stdenv.mkDerivation rec {
pname = "mstflint_access";
inherit (mstflint) version;
src = fetchurl {
url = "https://github.com/Mellanox/mstflint/releases/download/v${version}/kernel-mstflint-${version}.tar.gz";
hash = "sha256-D++AnLUEB8d9WlReY/Ewp8E2cvbapJ3QrvYySKwaszk=";
};
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"KVER=${kernel.modDirVersion}"
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
install -D ${pname}.ko $out/lib/modules/${kernel.modDirVersion}/extra/${pname}.ko
runHook postInstall
'';
meta = with lib; {
description = "Kernel module for Nvidia NIC firmware update";
homepage = "https://github.com/Mellanox/mstflint";
license = [ licenses.gpl2Only ];
maintainers = with maintainers; [ thillux ];
platforms = platforms.linux;
};
}