2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2018-02-24 13:00:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl8814au-${kernel.version}-${version}";
|
|
|
|
version = "4.3.21";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zebulon2";
|
|
|
|
repo = "rtl8814au";
|
|
|
|
rev = "a58c56a5a6cb99ffb872f07cb67b68197911854f";
|
|
|
|
sha256 = "1ffm67da183nz009gm5v9w1bab081hrm113kk8knl9s5qbqnn13q";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
|
|
|
|
prePatch = ''
|
2018-02-24 14:00:00 +00: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 13:00:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-24 13:00:34 +00:00
|
|
|
description = "Realtek 8814AU USB WiFi driver";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/zebulon2/rtl8814au";
|
2018-02-24 14:00:00 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.lassulus ];
|
2018-02-24 13:00:34 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|