2021-01-15 14:45:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, kernel }:
|
2011-09-15 16:18:45 +01:00
|
|
|
|
2021-01-15 14:45:37 +00:00
|
|
|
assert lib.versionOlder kernel.version "4.10";
|
2017-02-28 14:10:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "e1000e-${version}-${kernel.version}";
|
2020-06-24 22:05:33 +01:00
|
|
|
version = "3.8.4";
|
2011-09-15 16:18:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-02-28 14:10:26 +00:00
|
|
|
url = "mirror://sourceforge/e1000/e1000e-${version}.tar.gz";
|
2020-06-24 22:05:33 +01:00
|
|
|
sha256 = "1q8dbqh14c7r15q6k6iv5k0d6xpi74i71d5r54py60gr099m2ha4";
|
2011-09-15 16:18:45 +01:00
|
|
|
};
|
|
|
|
|
2016-08-13 15:25:29 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2011-09-15 16:18:45 +01:00
|
|
|
configurePhase = ''
|
|
|
|
cd src
|
2014-01-05 01:57:21 +00:00
|
|
|
kernel_version=${kernel.modDirVersion}
|
2020-06-24 22:05:33 +01:00
|
|
|
substituteInPlace common.mk \
|
|
|
|
--replace "/lib/modules" "${kernel.dev}/lib/modules"
|
2011-09-15 16:18:45 +01: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"
|
|
|
|
'';
|
|
|
|
|
2011-09-15 17:24:27 +01:00
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2011-09-15 16:18:45 +01:00
|
|
|
meta = {
|
|
|
|
description = "Linux kernel drivers for Intel Ethernet adapters and LOMs (LAN On Motherboard)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://e1000.sf.net/";
|
2021-01-15 14:45:37 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2011-09-15 16:18:45 +01:00
|
|
|
};
|
|
|
|
}
|