2022-03-28 09:38:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
|
|
|
, bc
|
|
|
|
}:
|
2021-01-28 20:55:06 +00:00
|
|
|
|
2019-02-03 22:02:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-08 16:14:16 +00:00
|
|
|
pname = "rtl8821ce";
|
2022-06-27 20:54:31 +00:00
|
|
|
version = "${kernel.version}-unstable-2022-06-01";
|
2019-02-03 22:02:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomaspinho";
|
|
|
|
repo = "rtl8821ce";
|
2022-06-27 20:54:31 +00:00
|
|
|
rev = "be733dc86781c68571650b395dd0fa6b53c0a039";
|
|
|
|
sha256 = "sha256-4PgISOjCSSGymz96VwE4jzcUiOEO+Ocuk2kJVIA+TQM=";
|
2019-02-03 22:02:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-02-10 02:56:52 +00:00
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags;
|
2019-02-03 22:02:25 +00:00
|
|
|
|
|
|
|
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-08-30 10:48:06 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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";
|
2021-03-29 04:08:39 +00:00
|
|
|
license = licenses.gpl2Only;
|
2019-02-05 00:35:44 +00:00
|
|
|
platforms = platforms.linux;
|
2022-06-27 20:54:31 +00:00
|
|
|
broken = stdenv.isAarch64;
|
2021-11-17 20:17:11 +00:00
|
|
|
maintainers = with maintainers; [ hhm ivar ];
|
2019-02-03 22:02:25 +00:00
|
|
|
};
|
|
|
|
}
|