2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "r8125";
|
|
|
|
# On update please verify (using `diff -r`) that the source matches the
|
|
|
|
# realtek version.
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "9.011.01";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# This is a mirror. The original website[1] doesn't allow non-interactive
|
|
|
|
# downloads, instead emailing you a download link.
|
|
|
|
# [1] https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
|
|
|
|
src = fetchFromGitHub {
|
2021-02-05 17:12:51 +00:00
|
|
|
owner = "louistakepillz";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "r8125";
|
2020-07-18 16:06:22 +00:00
|
|
|
rev = version;
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-QV1DKkWVtqcnuqgAdJnPpj6Z6ch+lw61zpouXKlyfqQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace src/Makefile --replace "BASEDIR :=" "BASEDIR ?="
|
|
|
|
substituteInPlace src/Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"BASEDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlags = [ "modules" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://github.com/louistakepillz/r8125";
|
2020-04-24 23:36:52 +00:00
|
|
|
downloadPage = "https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software";
|
|
|
|
description = "Realtek r8125 driver";
|
|
|
|
longDescription = ''
|
|
|
|
A kernel module for Realtek 8125 2.5G network cards.
|
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
# r8125 has been integrated into the kernel as of v5.9.1
|
|
|
|
broken = lib.versionAtLeast kernel.version "5.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ peelz ];
|
|
|
|
};
|
|
|
|
}
|