2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2018-02-24 14:00:34 +01:00
|
|
|
|
2021-05-19 07:31:49 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "rtl8814au";
|
|
|
|
version = "${kernel.version}-unstable-2021-05-18";
|
2018-02-24 14:00:34 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-19 07:31:49 +02:00
|
|
|
owner = "morrownr";
|
|
|
|
repo = "8814au";
|
|
|
|
rev = "388786c864f9b1437fc4d934b1eccf6d7f1e1355";
|
|
|
|
sha256 = "sha256-2EnheODPFWTGN/fz45LWRSOGeV6pTENEUrehahj+PJ4=";
|
2018-02-24 14:00:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
|
|
|
|
prePatch = ''
|
2018-02-24 15:00:00 +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/"
|
2018-02-24 14:00:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
2021-08-30 12:46:36 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-02-24 14:00:34 +01:00
|
|
|
description = "Realtek 8814AU USB WiFi driver";
|
2021-05-19 07:31:49 +02:00
|
|
|
homepage = "https://github.com/morrownr/8814au";
|
|
|
|
license = licenses.gpl2Only;
|
2018-02-24 15:00:00 +01:00
|
|
|
maintainers = [ maintainers.lassulus ];
|
2018-02-24 14:00:34 +01:00
|
|
|
};
|
|
|
|
}
|