2021-04-08 08:35:43 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2020-03-08 03:03:14 +00:00
|
|
|
|
2023-07-21 06:14:40 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-05-20 01:50:31 +00:00
|
|
|
pname = "rtl88x2bu";
|
2023-07-30 22:53:06 +00:00
|
|
|
version = "${kernel.version}-unstable-2023-07-23";
|
2020-03-08 03:03:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 01:50:31 +00:00
|
|
|
owner = "morrownr";
|
2022-02-24 11:26:35 +00:00
|
|
|
repo = "88x2bu-20210702";
|
2023-07-30 22:53:06 +00:00
|
|
|
rev = "83db18e610845df9434a628ca3feb9004296b307";
|
|
|
|
sha256 = "sha256-as3S7WQkug3suJ5ovUbRu/UzO5GDrGLdgkiWrCrvztk=";
|
2020-03-08 03:03:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-02-10 02:40:05 +00:00
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags;
|
2020-03-08 03:03:14 +00:00
|
|
|
|
2022-02-10 02:40:05 +00:00
|
|
|
prePatch = ''
|
2020-03-08 03:03:14 +00:00
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
|
|
|
|
--replace /sbin/depmod \# \
|
|
|
|
--replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
2021-08-30 10:49:43 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-08 03:03:14 +00:00
|
|
|
description = "Realtek rtl88x2bu driver";
|
2022-02-24 11:26:35 +00:00
|
|
|
homepage = "https://github.com/morrownr/88x2bu-20210702";
|
2021-04-08 08:35:43 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-03-08 03:03:14 +00:00
|
|
|
platforms = platforms.linux;
|
2023-07-30 18:28:09 +00:00
|
|
|
maintainers = with maintainers; [ otavio ];
|
2020-03-08 03:03:14 +00:00
|
|
|
};
|
|
|
|
}
|