tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
rtl8852bu: init at f6aaa3c
Sergio Miguéns Iglesias
2 years ago
30bc5085
5a2d4496
+53
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
rtl8852bu
default.nix
top-level
linux-kernels.nix
+51
pkgs/os-specific/linux/rtl8852bu/default.nix
···
1
1
+
{ lib, stdenv, fetchFromGitHub, kernel, bc, nukeReferences }:
2
2
+
3
3
+
stdenv.mkDerivation {
4
4
+
pname = "rtl8852bu";
5
5
+
version = "${kernel.version}-unstable-2024-03-28";
6
6
+
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "morrownr";
9
9
+
repo = "rtl8852bu";
10
10
+
rev = "f6aaa3c0094c541d9b0347926c76c1e9cc4a49d1";
11
11
+
hash = "sha256-Jbd6nixo873LU74klhhQU1qD3ahxEnywdqcF89LTRxc=";
12
12
+
};
13
13
+
14
14
+
nativeBuildInputs = [ bc nukeReferences ] ++ kernel.moduleBuildDependencies;
15
15
+
hardeningDisable = [ "pic" "format" ];
16
16
+
17
17
+
postPatch = ''
18
18
+
substituteInPlace ./Makefile \
19
19
+
--replace-fail /sbin/depmod \# \
20
20
+
--replace-fail '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
21
21
+
substituteInPlace ./platform/i386_pc.mk \
22
22
+
--replace-fail /lib/modules "${kernel.dev}/lib/modules"
23
23
+
'';
24
24
+
25
25
+
makeFlags = [
26
26
+
"ARCH=${stdenv.hostPlatform.linuxArch}"
27
27
+
("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
28
28
+
("CONFIG_PLATFORM_ARM_RPI=" + (if stdenv.hostPlatform.isAarch then "y" else "n"))
29
29
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
30
30
+
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
31
31
+
];
32
32
+
33
33
+
preInstall = ''
34
34
+
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
35
35
+
mkdir -p "$out/usr/lib/systemd/system-sleep"
36
36
+
'';
37
37
+
38
38
+
postInstall = ''
39
39
+
nuke-refs $out/lib/modules/*/kernel/net/wireless/*.ko
40
40
+
'';
41
41
+
42
42
+
enableParallelBuilding = true;
43
43
+
44
44
+
meta = with lib; {
45
45
+
description = "Driver for Realtek rtl8852au and rtl8832bu chipsets, provides the 8852au mod";
46
46
+
homepage = "https://github.com/morrownr/rtl8852bu";
47
47
+
license = licenses.gpl2Only;
48
48
+
platforms = platforms.linux;
49
49
+
maintainers = with maintainers; [ lonyelon ];
50
50
+
};
51
51
+
}
+2
pkgs/top-level/linux-kernels.nix
···
443
443
444
444
rtl8852au = callPackage ../os-specific/linux/rtl8852au { };
445
445
446
446
+
rtl8852bu = callPackage ../os-specific/linux/rtl8852bu { };
447
447
+
446
448
rtl88xxau-aircrack = callPackage ../os-specific/linux/rtl88xxau-aircrack {};
447
449
448
450
rtl8821au = callPackage ../os-specific/linux/rtl8821au { };