2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
2021-01-28 21:55:06 +01:00
|
|
|
|
2019-02-03 23:02:25 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-08 18:14:16 +02:00
|
|
|
pname = "rtl8821ce";
|
|
|
|
version = "${kernel.version}-unstable-2021-05-28";
|
2019-02-03 23:02:25 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomaspinho";
|
|
|
|
repo = "rtl8821ce";
|
2021-06-08 18:14:16 +02:00
|
|
|
rev = "f93db734666f75ebf65e44ceb943c19b598b1647";
|
|
|
|
sha256 = "sha256-cqXV52U+6Jl9Jje1nEOYDvmH4rgA1QdrwNCfYeul3hU=";
|
2019-02-03 23:02:25 +01: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 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-02-03 23:02:25 +01:00
|
|
|
description = "Realtek rtl8821ce driver";
|
|
|
|
homepage = "https://github.com/tomaspinho/rtl8821ce";
|
2021-03-29 06:08:39 +02:00
|
|
|
license = licenses.gpl2Only;
|
2019-02-05 01:35:44 +01:00
|
|
|
platforms = platforms.linux;
|
2021-05-19 10:58:17 +02:00
|
|
|
broken = stdenv.isAarch64;
|
2021-03-30 02:54:01 +02:00
|
|
|
maintainers = with maintainers; [ hhm ];
|
2019-02-03 23:02:25 +01:00
|
|
|
};
|
|
|
|
}
|