summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPRESFIL <presfil@protonmail.com>2024-01-29 20:27:29 +0100
committerJonathan Brielmaier <jonathan.brielmaier@web.de>2024-01-29 20:39:48 +0100
commitb2e769487eba7f699a90f32e6bf802eb9d18f0a3 (patch)
tree24a6395bf7e15d5a8659959f0ceb3a89fb27aea6
parent9acfbadebf64add37fa31546ac7272adfba389ff (diff)
nongnu: Add rtl8821cu-linux-module.
* nongnu/packages/linux.scm: (rtl8821cu-linux-module): New variable. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
-rw-r--r--nongnu/packages/linux.scm57
1 files changed, 56 insertions, 1 deletions
diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm
index 9d28d2f..ce4b0bf 100644
--- a/nongnu/packages/linux.scm
+++ b/nongnu/packages/linux.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020, 2021 James Smith <jsubuntuxp@disroot.org>
-;;; Copyright © 2020-2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020-2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020, 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020, 2021, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020, 2021, 2022 Zhu Zihao <all_but_last@163.com>
@@ -25,6 +25,7 @@
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Ada Stevenson <adanskana@gmail.com>
;;; Copyright © 2023 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2023 PRESFIL <presfil@protonmail.com>
(define-module (nongnu packages linux)
#:use-module (gnu packages)
@@ -849,6 +850,60 @@ network adapters.")
;; hal/rtl8821c/hal8821c_fw.c
(license gpl2))))
+(define-public rtl8821cu-linux-module
+ (let ((commit "a41ef7cabd1aa36fa2b4eb63a71cf719bff11b72")
+ (revision "1"))
+ (package
+ (name "rtl8821cu-linux-module")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/morrownr/8821cu-20210916")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0fnv4gm4adnf8gbjzc2lljh2a3i111159qira3w0qm1zhyqadaq0"))))
+ (build-system linux-module-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ (string-append "KSRC="
+ (assoc-ref %build-inputs
+ "linux-module-builder")
+ "/lib/modules/build"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key (make-flags '())
+ (parallel-build? #t) #:allow-other-keys)
+ (apply invoke "make"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '()) ,@make-flags)))))
+ #:tests? #f))
+ (home-page "https://github.com/morrownr/8821cu-20210916")
+ (synopsis "Linux driver for Realtek USB WiFi adapters")
+ (description
+ "Linux driver for USB WiFi adapters that are based on the
+Realtek RTL8811CU, RTL8821CU, RTL8821CUH and RTL8731AU chipsets.
+
+To work, in addition to installing the driver, you need
+to disable the conflicting rtw88 driver:
+
+@example
+(operating-system
+ ;; ...
+ ;; Blacklist conflicting kernel modules.
+ (kernel-arguments '(\"modprobe.blacklist=rtw88_8821cu\"))
+ (kernel-loadable-modules (list rtl8821cu-linux-module)))
+@end example")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8821c/hal8821c_fw.c
+ (license (nonfree
+ "https://github.com/morrownr/8821cu-20210916/blob/main/LICENSE")))))
+
(define-public rtl8812au-aircrack-ng-linux-module
(let ((commit "35308f4dd73e77fa572c48867cce737449dd8548")
(revision "11"))