nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix
Alyssa Ross 6da5cc14c7 linuxPackages.rtl8821ce: parallel build
So much faster.  Tested at -j48.
2021-08-30 11:35:52 +00:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
pname = "rtl8821ce";
version = "${kernel.version}-unstable-2021-05-28";
src = fetchFromGitHub {
owner = "tomaspinho";
repo = "rtl8821ce";
rev = "f93db734666f75ebf65e44ceb943c19b598b1647";
sha256 = "sha256-cqXV52U+6Jl9Jje1nEOYDvmH4rgA1QdrwNCfYeul3hU=";
};
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/"
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Realtek rtl8821ce driver";
homepage = "https://github.com/tomaspinho/rtl8821ce";
license = licenses.gpl2Only;
platforms = platforms.linux;
broken = stdenv.isAarch64;
maintainers = with maintainers; [ hhm ];
};
}