2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "rtl8821ce-${kernel.version}";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "unstable-2021-03-21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomaspinho";
|
|
|
|
repo = "rtl8821ce";
|
2021-03-20 04:20:00 +00:00
|
|
|
rev = "897e7c4c15dd5a0a569745dc223d969a26ff5bfc";
|
|
|
|
sha256 = "0935dzz0njxh78wfd17yqah1dxn6b3kaszvzclwwrwwhwcrdp80j";
|
2020-04-24 23:36:52 +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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Realtek rtl8821ce driver";
|
|
|
|
homepage = "https://github.com/tomaspinho/rtl8821ce";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ hhm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|