2020-08-15 14:15:33 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel, bc }:
|
2018-02-22 20:18:01 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtl8192eu";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-05-09 06:58:57 +02:00
|
|
|
pname = "rtl8192eu";
|
2022-06-14 15:29:35 +02:00
|
|
|
version = "${kernel.version}-4.4.1.20220614";
|
2018-02-22 20:18:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mange";
|
|
|
|
repo = "rtl8192eu-linux-driver";
|
2022-06-14 15:29:35 +02:00
|
|
|
rev = "6ba1f320963376f15ea216238c0b62ff3e71fa82";
|
|
|
|
sha256 = "sha256-c5swRxSjWT1tCcR7tfFKdAdVVmAEYgMZuOwUxGYYESI=";
|
2018-02-22 20:18:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2021-05-09 06:58:57 +02:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies ++ [ bc ];
|
2020-08-15 14:15:33 +02:00
|
|
|
|
2022-02-10 06:33:20 +01:00
|
|
|
makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
2018-02-22 20:18:01 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-09 06:58:57 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-02-22 20:18:01 +01:00
|
|
|
mkdir -p ${modDestDir}
|
|
|
|
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
|
|
|
|
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
|
2021-05-09 06:58:57 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2018-02-22 20:18:01 +01:00
|
|
|
'';
|
|
|
|
|
2021-05-09 06:58:57 +02:00
|
|
|
meta = with lib; {
|
2018-02-22 20:18:01 +01:00
|
|
|
description = "Realtek rtl8192eu driver";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/Mange/rtl8192eu-linux-driver";
|
2021-05-09 06:58:57 +02:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
2022-05-23 14:03:08 +02:00
|
|
|
broken = stdenv.hostPlatform.isAarch64 || kernel.kernelAtLeast "5.18";
|
2018-02-22 20:18:01 +01:00
|
|
|
maintainers = with maintainers; [ troydm ];
|
|
|
|
};
|
|
|
|
}
|