nixpkgs/pkgs/os-specific/linux/rtl8821ce/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

{ 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;
2019-02-05 00:35:44 +00:00
platforms = platforms.linux;
broken = stdenv.isAarch64;
maintainers = with maintainers; [ hhm ];
};
}