-
Notifications
You must be signed in to change notification settings - Fork 5
/
rtl8723ds.nix
46 lines (37 loc) · 1.31 KB
/
rtl8723ds.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation {
pname = "rtl8723ds";
version = "${kernel.version}-unstable-2022-07-27";
src = fetchFromGitHub {
owner = "lwfinger";
repo = "rtl8723ds";
rev = "83032266f6fbd7a6775ecf23fb4f807343ffc6f2";
sha256 = "sha256-wEBr29S0IBMJLv/4gNplM45182KXIfmmu1WGG29yM8A=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = [ bc ];
buildInputs = kernel.moduleBuildDependencies;
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
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 = {
description = "Linux driver for RTL8723DS.";
homepage = "https://github.com/lwfinger/rtl8723ds";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ chuangzhu ];
};
}