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