2021-04-12 18:23:04 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "rtl88x2bu";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "${kernel.version}-unstable-2023-02-24";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 23:08:51 +00:00
|
|
|
owner = "morrownr";
|
2022-03-05 16:20:37 +00:00
|
|
|
repo = "88x2bu-20210702";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "51a2fb94893c562ec5f2fabce0b80e4da4eda812";
|
|
|
|
sha256 = "sha256-nTas2EkghZeQhc8bTtoQfHEl8QJtClXi9V1IxlIThbI=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags;
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
prePatch = ''
|
2020-06-18 07:06:33 +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-09-18 10:52:07 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-18 07:06:33 +00:00
|
|
|
description = "Realtek rtl88x2bu driver";
|
2022-03-05 16:20:37 +00:00
|
|
|
homepage = "https://github.com/morrownr/88x2bu-20210702";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-06-18 07:06:33 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|