depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
name = "rtl8821ce-${kernel.version}-${version}";
version = "5.2.5_1.26055.20180108";
src = fetchFromGitHub {
owner = "tomaspinho";
repo = "rtl8821ce";
rev = "ab6154e150bbc7d12b0525d4cc1298ae196e45de";
sha256 = "1my0hidqnv4s7hi5897m81pq0sjw05np0g27hlkg9fwb83b5kzsg";
};
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 ];
};
}