nixpkgs-suyu/pkgs/os-specific/linux/r8125/default.nix

46 lines
1.5 KiB
Nix
Raw Normal View History

2020-03-06 01:42:23 +01:00
{ stdenv, lib, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
pname = "r8125";
# On update please verify (using `diff -r`) that the source matches the
# realtek version.
2020-04-21 10:24:22 +02:00
version = "9.003.05";
2020-03-06 01:42:23 +01: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 {
owner = "ibmibmibm";
repo = "r8125";
2020-04-21 10:24:22 +02:00
rev = version;
sha256 = "016vh997xjs01si0zzs572vgflq3czxd0v4m7h1m3qxcv2cvq7i0";
2020-03-06 01:42:23 +01: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; {
homepage = "https://github.com/ibmibmibm/r8125";
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.
'';
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ peelz ];
};
}