forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#263149 from thillux/update-mstflint
mstflint: 4.17 -> 4.26
- Loading branch information
Showing
3 changed files
with
131 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ 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-rfZts0m8x6clVazpbAa2xK+dYgRU9Us5rbcWa0uHJ1M="; | ||
}; | ||
|
||
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; | ||
|
||
makeFlags = kernel.makeFlags ++ [ | ||
"KVER=${kernel.modDirVersion}" | ||
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" | ||
]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
preConfigure = lib.optionals (lib.versionAtLeast kernel.version "6.4") '' | ||
sed -i "s/class_create(THIS_MODULE, dev->name)/class_create(dev->name)/g" mst_main.c | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
install -D ${pname}.ko $out/lib/modules/${kernel.modDirVersion}/extra/${pname}.ko | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "A kernel module for Nvidia NIC firmware update"; | ||
homepage = "https://github.com/Mellanox/mstflint"; | ||
license = [ licenses.gpl2Only ]; | ||
maintainers = with maintainers; [ thillux ]; | ||
platforms = platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters