2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel, bc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtl8192eu";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "rtl8192eu";
|
|
|
|
version = "${kernel.version}-4.4.1.20210403";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mange";
|
|
|
|
repo = "rtl8192eu-linux-driver";
|
2021-05-20 23:08:51 +00:00
|
|
|
rev = "ab35c7e9672f37d75b7559758c99f6d027607687";
|
|
|
|
sha256 = "sha256-sTIaye4oWNYEnNuXlrTLobaFKXzBLsfJXdJuc10EdJI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies ++ [ bc ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p ${modDestDir}
|
|
|
|
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
|
|
|
|
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Realtek rtl8192eu driver";
|
|
|
|
homepage = "https://github.com/Mange/rtl8192eu-linux-driver";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
broken = stdenv.hostPlatform.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ troydm ];
|
|
|
|
};
|
|
|
|
}
|