2021-04-08 10:35:43 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2020-03-08 04:03:14 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-20 03:50:31 +02:00
|
|
|
pname = "rtl88x2bu";
|
2022-02-24 12:26:35 +01:00
|
|
|
version = "${kernel.version}-unstable-2022-02-22";
|
2020-03-08 04:03:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 03:50:31 +02:00
|
|
|
owner = "morrownr";
|
2022-02-24 12:26:35 +01:00
|
|
|
repo = "88x2bu-20210702";
|
|
|
|
rev = "6a5b7f005c071ffa179b6183ee034c98ed30db80";
|
|
|
|
sha256 = "sha256-BqTyJpICW3D4EfHHoN5svasteJnunu2Uz449u/CmNE0=";
|
2020-03-08 04:03:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-02-10 03:40:05 +01:00
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags;
|
2020-03-08 04:03:14 +01:00
|
|
|
|
2022-02-10 03:40:05 +01:00
|
|
|
prePatch = ''
|
2020-03-08 04:03:14 +01:00
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
|
|
|
|
--replace '$(shell uname -r)' "${kernel.modDirVersion}" \
|
|
|
|
--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 12:49:43 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-03-08 04:03:14 +01:00
|
|
|
description = "Realtek rtl88x2bu driver";
|
2022-02-24 12:26:35 +01:00
|
|
|
homepage = "https://github.com/morrownr/88x2bu-20210702";
|
2021-04-08 10:35:43 +02:00
|
|
|
license = licenses.gpl2Only;
|
2020-03-08 04:03:14 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|