mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
5e52c3706c
Co-authored-by: Jonathan Ringer <jonringer@users.noreply.github.com>
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rtl8821ce-${kernel.version}";
|
|
version = "unstable-2021-03-21";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tomaspinho";
|
|
repo = "rtl8821ce";
|
|
rev = "897e7c4c15dd5a0a569745dc223d969a26ff5bfc";
|
|
sha256 = "0935dzz0njxh78wfd17yqah1dxn6b3kaszvzclwwrwwhwcrdp80j";
|
|
};
|
|
|
|
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 lib; {
|
|
description = "Realtek rtl8821ce driver";
|
|
homepage = "https://github.com/tomaspinho/rtl8821ce";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.linux;
|
|
broken = stdenv.isAarch64;
|
|
maintainers = with maintainers; [ hhm ];
|
|
};
|
|
}
|