File tree Expand file tree Collapse file tree 4 files changed +73
-0
lines changed
modules/reference/hardware Expand file tree Collapse file tree 4 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2025 TII (SSRC) and the Ghaf contributors
2+ # SPDX-License-Identifier: Apache-2.0
3+ {
4+ config ,
5+ pkgs ,
6+ ...
7+ } :
8+ {
9+ config = {
10+ boot . extraModulePackages = [ pkgs . rtl8126 ] ;
11+ } ;
12+ }
Original file line number Diff line number Diff line change 1212 ghaf . virtualization . microvm . guivm . extraModules = [
1313 ( import ./alienware/extra-config.nix )
1414 ] ;
15+ ghaf . virtualization . microvm . netvm . extraModules = [
16+ ( import ./alienware/net-config.nix )
17+ ] ;
1518 }
1619 ] ;
1720 hardware-dell-latitude-7230 . imports = [
Original file line number Diff line number Diff line change 2626 memsocket = final . callPackage ./pkgs-by-name/memsocket/package.nix { } ;
2727 open-normal-extension = final . callPackage ./pkgs-by-name/open-normal-extension/package.nix { } ;
2828 qemuqmp = final . callPackage ./pkgs-by-name/qemuqmp/package.nix { } ;
29+ rtl8126 = final . callPackage ./pkgs-by-name/rtl8126/package.nix { } ;
2930 vhotplug = final . callPackage ./pkgs-by-name/vhotplug/package.nix { } ;
3031 vinotify = final . callPackage ./pkgs-by-name/vinotify/package.nix { } ;
3132 vsockproxy = final . callPackage ./pkgs-by-name/vsockproxy/package.nix { } ;
Original file line number Diff line number Diff line change 1+ # Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
2+ # SPDX-License-Identifier: Apache-2.0
3+ #
4+ #
5+ # https://github.com/davidkna/nixpkgs/blob/6853dcf3c8ac1492a35d54a62da2233a35286810/pkgs/os-specific/linux/r8126/default.nix
6+ {
7+ stdenv ,
8+ lib ,
9+ fetchFromGitHub ,
10+ linuxPackages ,
11+ } :
12+ let
13+ inherit ( linuxPackages ) kernel ;
14+ in
15+ stdenv . mkDerivation ( finalAttrs : {
16+ pname = "r8126" ;
17+ # On update please verify (using `diff -r`) that the source matches the
18+ # realtek version.
19+ version = "10.014.01" ;
20+
21+ # This is a mirror. The original website[1] doesn't allow non-interactive
22+ # downloads.
23+ # [1] https://www.realtek.com/Download/List?cate_id=584
24+ src = fetchFromGitHub {
25+ owner = "openwrt" ;
26+ repo = "rtl8126" ;
27+ tag = finalAttrs . version ;
28+ hash = "sha256-NSi95L5PN+o9z7N3zFjcYk2nQjY03csUBp0saakaqlE=" ;
29+ } ;
30+
31+ hardeningDisable = [ "pic" ] ;
32+
33+ nativeBuildInputs = kernel . moduleBuildDependencies ;
34+
35+ preBuild = ''
36+ substituteInPlace Makefile --replace-fail "BASEDIR :=" "BASEDIR ?="
37+ substituteInPlace Makefile --replace-fail "modules_install" "INSTALL_MOD_PATH=$out modules_install"
38+ '' ;
39+
40+ makeFlags = [
41+ "BASEDIR=${ kernel . dev } /lib/modules/${ kernel . modDirVersion } "
42+ ] ;
43+
44+ buildFlags = [ "modules" ] ;
45+
46+ meta = {
47+ homepage = "https://github.com/openwrt/rtl8126" ;
48+ downloadPage = "https://www.realtek.com/Download/List?cate_id=584" ;
49+ description = "Realtek r8126 driver" ;
50+ longDescription = ''
51+ A kernel module for Realtek 8126 5G network cards.
52+ '' ;
53+ license = lib . licenses . gpl2Only ;
54+ platforms = lib . platforms . linux ;
55+ maintainers = [ lib . maintainers . davidkna ] ;
56+ } ;
57+ } )
You can’t perform that action at this time.
0 commit comments