2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, kernel }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
assert lib.versionOlder kernel.version "4.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "e1000e-${version}-${kernel.version}";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "3.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/e1000/e1000e-${version}.tar.gz";
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "1q8dbqh14c7r15q6k6iv5k0d6xpi74i71d5r54py60gr099m2ha4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
cd src
|
|
|
|
kernel_version=${kernel.modDirVersion}
|
2020-07-18 16:06:22 +00:00
|
|
|
substituteInPlace common.mk \
|
|
|
|
--replace "/lib/modules" "${kernel.dev}/lib/modules"
|
2020-04-24 23:36:52 +00:00
|
|
|
export makeFlags="BUILD_KERNEL=$kernel_version"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -v -D -m 644 e1000e.ko "$out/lib/modules/$kernel_version/kernel/drivers/net/e1000e/e1000e.ko"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Linux kernel drivers for Intel Ethernet adapters and LOMs (LAN On Motherboard)";
|
|
|
|
homepage = "http://e1000.sf.net/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|