3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
Harsh Shandilya 6cbbe4dbba
rtl8821ce: 5.2.5_1.26055.20180108 -> 5.5.2_34066.20200325
The rtl8821ce repository was updated to address for ABI changes to
Linux but our package was too far behind, resulting in breakages
as reported in #88068

Fixes: #88068
2020-06-17 03:00:17 +05:30

38 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
name = "rtl8821ce-${kernel.version}-${version}";
version = "5.5.2_34066.20200325";
src = fetchFromGitHub {
owner = "tomaspinho";
repo = "rtl8821ce";
rev = "69765eb288a8dfad3b055b906760b53e02ab1dea";
sha256 = "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s";
};
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/"
'';
meta = with stdenv.lib; {
description = "Realtek rtl8821ce driver";
homepage = "https://github.com/tomaspinho/rtl8821ce";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.hhm ];
};
}