2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2021-01-28 20:55:06 +00:00
|
|
|
|
2019-02-03 22:02:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-01-28 20:55:06 +00:00
|
|
|
pname = "rtl8821ce-${kernel.version}";
|
|
|
|
version = "unstable-2020-12-16";
|
2019-02-03 22:02:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomaspinho";
|
|
|
|
repo = "rtl8821ce";
|
2021-01-28 20:55:06 +00:00
|
|
|
rev = "14b536f0c9ad2d0abbdab8afc7ade684900ca9cf";
|
|
|
|
sha256 = "0z7r7spsgn22gwv9pcmkdjn9ingi8jj7xkxasph8118h46fw8ip2";
|
2019-02-03 22:02:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ bc ];
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
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-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-02-03 22:02:25 +00:00
|
|
|
description = "Realtek rtl8821ce driver";
|
|
|
|
homepage = "https://github.com/tomaspinho/rtl8821ce";
|
|
|
|
license = licenses.gpl2;
|
2019-02-05 00:35:44 +00:00
|
|
|
platforms = platforms.linux;
|
2020-08-11 13:55:23 +00:00
|
|
|
maintainers = with maintainers; [ hhm samuelgrf ];
|
2019-02-03 22:02:25 +00:00
|
|
|
};
|
|
|
|
}
|