From 4ba24070ac3d829eb8b09a3e88b795cebdb4170c Mon Sep 17 00:00:00 2001 From: James Richardson Date: Sun, 28 Jul 2019 21:12:48 -0400 Subject: [PATCH] Inital commit with linux 5.4.2 --- .dir-locals.el | 156 +++++------ Readme.org | 91 +++++++ james/linux-nonfree.scm | 88 ------- james/vmware-perl-sdk.scm | 623 -------------------------------------------- non-free/licenses.scm | 41 +++ non-free/packages/linux.scm | 422 ++++++++++++++++++++++++++++++ 6 files changed, 633 insertions(+), 788 deletions(-) rewrite .dir-locals.el (99%) delete mode 100644 james/linux-nonfree.scm delete mode 100644 james/vmware-perl-sdk.scm create mode 100644 non-free/licenses.scm create mode 100644 non-free/packages/linux.scm diff --git a/.dir-locals.el b/.dir-locals.el dissimilarity index 99% index 572a35f..feadc84 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,77 +1,79 @@ -;; Per-directory local variables for GNU Emacs 23 and later. - -((nil - . ((fill-column . 78) - (tab-width . 8) - - ;; For use with 'bug-reference-prog-mode'. - (bug-reference-url-format . "http://bugs.gnu.org/%s") - (bug-reference-bug-regexp - . ""))) - (c-mode . ((c-file-style . "gnu"))) - (scheme-mode - . - ((indent-tabs-mode . nil) - (eval . (put 'eval-when 'scheme-indent-function 1)) - (eval . (put 'call-with-prompt 'scheme-indent-function 1)) - (eval . (put 'test-assert 'scheme-indent-function 1)) - (eval . (put 'test-assertm 'scheme-indent-function 1)) - (eval . (put 'test-equal 'scheme-indent-function 1)) - (eval . (put 'test-eq 'scheme-indent-function 1)) - (eval . (put 'call-with-input-string 'scheme-indent-function 1)) - (eval . (put 'guard 'scheme-indent-function 1)) - (eval . (put 'lambda* 'scheme-indent-function 1)) - (eval . (put 'substitute* 'scheme-indent-function 1)) - (eval . (put 'modify-phases 'scheme-indent-function 1)) - (eval . (put 'modify-services 'scheme-indent-function 1)) - (eval . (put 'with-directory-excursion 'scheme-indent-function 1)) - (eval . (put 'package 'scheme-indent-function 0)) - (eval . (put 'origin 'scheme-indent-function 0)) - (eval . (put 'build-system 'scheme-indent-function 0)) - (eval . (put 'bag 'scheme-indent-function 0)) - (eval . (put 'graft 'scheme-indent-function 0)) - (eval . (put 'operating-system 'scheme-indent-function 0)) - (eval . (put 'file-system 'scheme-indent-function 0)) - (eval . (put 'manifest-entry 'scheme-indent-function 0)) - (eval . (put 'manifest-pattern 'scheme-indent-function 0)) - (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) - (eval . (put 'with-store 'scheme-indent-function 1)) - (eval . (put 'with-error-handling 'scheme-indent-function 0)) - (eval . (put 'with-mutex 'scheme-indent-function 1)) - (eval . (put 'with-atomic-file-output 'scheme-indent-function 1)) - (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2)) - (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2)) - (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1)) - (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1)) - (eval . (put 'signature-case 'scheme-indent-function 1)) - (eval . (put 'emacs-batch-eval 'scheme-indent-function 0)) - (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1)) - (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1)) - (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1)) - (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1)) - (eval . (put 'with-derivation-substitute 'scheme-indent-function 2)) - - (eval . (put 'syntax-parameterize 'scheme-indent-function 1)) - (eval . (put 'with-monad 'scheme-indent-function 1)) - (eval . (put 'mbegin 'scheme-indent-function 1)) - (eval . (put 'mwhen 'scheme-indent-function 1)) - (eval . (put 'munless 'scheme-indent-function 1)) - (eval . (put 'mlet* 'scheme-indent-function 2)) - (eval . (put 'mlet 'scheme-indent-function 2)) - (eval . (put 'run-with-store 'scheme-indent-function 1)) - (eval . (put 'run-with-state 'scheme-indent-function 1)) - (eval . (put 'wrap-program 'scheme-indent-function 1)) - (eval . (put 'with-imported-modules 'scheme-indent-function 1)) - - (eval . (put 'call-with-container 'scheme-indent-function 1)) - (eval . (put 'container-excursion 'scheme-indent-function 1)) - - ;; Recognize '~', '+', and '$', as used for gexps, as quotation symbols. - ;; This notably allows '(' in Paredit to not insert a space when the - ;; preceding symbol is one of these. - (eval . (modify-syntax-entry ?~ "'")) - (eval . (modify-syntax-entry ?$ "'")) - (eval . (modify-syntax-entry ?+ "'")))) - (emacs-lisp-mode . ((indent-tabs-mode . nil))) - (texinfo-mode . ((indent-tabs-mode . nil) - (fill-column . 72)))) +;;; Directory Local Variables +;;; For more information see (info "(emacs) Directory Variables") + +((nil + (fill-column . 78) + (tab-width . 8) + (bug-reference-url-format . "http://bugs.gnu.org/%s") + (bug-reference-bug-regexp . "")) + (c-mode + (c-file-style . "gnu")) + (emacs-lisp-mode + (indent-tabs-mode)) + (scheme-mode + (geiser-guile-load-path quote + ("~/src/guix-packages" "~/src/guix")) + (indent-tabs-mode) + (eval put 'eval-when 'scheme-indent-function 1) + (eval put 'call-with-prompt 'scheme-indent-function 1) + (eval put 'test-assert 'scheme-indent-function 1) + (eval put 'test-assertm 'scheme-indent-function 1) + (eval put 'test-equal 'scheme-indent-function 1) + (eval put 'test-eq 'scheme-indent-function 1) + (eval put 'call-with-input-string 'scheme-indent-function 1) + (eval put 'guard 'scheme-indent-function 1) + (eval put 'lambda* 'scheme-indent-function 1) + (eval put 'substitute* 'scheme-indent-function 1) + (eval put 'modify-phases 'scheme-indent-function 1) + (eval put 'modify-services 'scheme-indent-function 1) + (eval put 'with-directory-excursion 'scheme-indent-function 1) + (eval put 'package 'scheme-indent-function 0) + (eval put 'origin 'scheme-indent-function 0) + (eval put 'build-system 'scheme-indent-function 0) + (eval put 'bag 'scheme-indent-function 0) + (eval put 'graft 'scheme-indent-function 0) + (eval put 'operating-system 'scheme-indent-function 0) + (eval put 'file-system 'scheme-indent-function 0) + (eval put 'manifest-entry 'scheme-indent-function 0) + (eval put 'manifest-pattern 'scheme-indent-function 0) + (eval put 'substitute-keyword-arguments 'scheme-indent-function 1) + (eval put 'with-store 'scheme-indent-function 1) + (eval put 'with-error-handling 'scheme-indent-function 0) + (eval put 'with-mutex 'scheme-indent-function 1) + (eval put 'with-atomic-file-output 'scheme-indent-function 1) + (eval put 'call-with-compressed-output-port 'scheme-indent-function 2) + (eval put 'call-with-decompressed-port 'scheme-indent-function 2) + (eval put 'call-with-gzip-input-port 'scheme-indent-function 1) + (eval put 'call-with-gzip-output-port 'scheme-indent-function 1) + (eval put 'signature-case 'scheme-indent-function 1) + (eval put 'emacs-batch-eval 'scheme-indent-function 0) + (eval put 'emacs-batch-edit-file 'scheme-indent-function 1) + (eval put 'emacs-substitute-sexps 'scheme-indent-function 1) + (eval put 'emacs-substitute-variables 'scheme-indent-function 1) + (eval put 'with-derivation-narinfo 'scheme-indent-function 1) + (eval put 'with-derivation-substitute 'scheme-indent-function 2) + (eval put 'syntax-parameterize 'scheme-indent-function 1) + (eval put 'with-monad 'scheme-indent-function 1) + (eval put 'mbegin 'scheme-indent-function 1) + (eval put 'mwhen 'scheme-indent-function 1) + (eval put 'munless 'scheme-indent-function 1) + (eval put 'mlet* 'scheme-indent-function 2) + (eval put 'mlet 'scheme-indent-function 2) + (eval put 'run-with-store 'scheme-indent-function 1) + (eval put 'run-with-state 'scheme-indent-function 1) + (eval put 'wrap-program 'scheme-indent-function 1) + (eval put 'with-imported-modules 'scheme-indent-function 1) + (eval put 'call-with-container 'scheme-indent-function 1) + (eval put 'container-excursion 'scheme-indent-function 1) + (eval modify-syntax-entry 126 "'") + (eval modify-syntax-entry 36 "'") + (eval modify-syntax-entry 43 "'")) + (texinfo-mode + (indent-tabs-mode) + (fill-column . 72))) + + + + + + diff --git a/Readme.org b/Readme.org index e69de29..f27f609 100644 --- a/Readme.org +++ b/Readme.org @@ -0,0 +1,91 @@ +#+TITLE: Guix-Packages + +Guix-Packages is my personal software repository for the [[https://www.gnu.org/software/guix/][GNU Guix]] package +manager. Here you will find packages I am building for my personal use. +distribution for ethical or policy-related reasons. + +I have three name spaces in this channel, jamestechnotes, gnu, and non-free. +- jamestechnotes :: free software that supports my (peculiar) workflow and + would not fit in with the larger Guix project. +- gnu :: Packages I am developing and haven't been submitted to the Guix + project. I am still working on these or haven't got around to + submitting patches. +- non-free :: This is for inherently crippled software that I still find + myself having to use. This is largely for crippled hardware I + have that need such to function properly. Please do NOT promote + this repository on any official Guix communication channels, + such as their mailing lists or IRC channel, even in response to + support requests! This is to show respect for the Guix + project's [[http://www.gnu.org/distros/free-system-distribution-guidelines.html][strict policy]] against recommending nonfree software. I + am in this case, simply exercising my freedom to use Guix for my + purposes (freedom 0 and 1), and changing it to work the way I + want and sharing my changes publicly (freedom 3). Before using + this name space, you should understand the implications of using + nonfree software. Read [[https://www.gnu.org/philosophy/free-sw.en.html][What is free software?]] for more information. + +* Installation + +Guix-packages can be installed as a +[[https://www.gnu.org/software/guix/manual/en/html_node/Channels.html][Guix Channel]]. To do so, add it to =~/.config/guix/channels.scm=: + +#+BEGIN_SRC scheme + (cons* (channel + (name 'jamestechnotes) + (url "https://git.jamestechnotes.com/guix/guix-packages.git")) + %default-channels) +#+END_SRC + +* Using Nonfree Firmware and Drivers + +To use Guix System with the standard Linux kernel and nonfree firmware, edit +the ~kernel~ and ~firmware~ fields of the ~operating-system~ definition in +=config.scm=: + +#+BEGIN_SRC scheme + ;; Import nonfree linux module. + (use-modules (non-free linux)) + + (operating-system + (kernel linux) + (firmware (list linux-firmware)) + ... + ) +#+END_SRC + +If you only need firmware for a specific piece of hardware, you may be able to +save disk space by using a smaller firmware package instead: + +#+BEGIN_SRC scheme + (firmware (cons* iwlwifi-firmware + %base-firmware)) +#+END_SRC + +Then of course, run ~sudo guix system reconfigure /etc/config.scm~ to apply +your configuration. + +** Broadcom Wireless + +Some Broadcom wireless hardware requires a proprietary kernel module in +addition to firmware. To use such hardware you will also need to add a service +to load that module on boot, and blacklist conflicting kernel modules: + +#+BEGIN_SRC scheme + (use-modules (nongnu packages linux) + (nongnu services kernel-modules)) + + (operating-system + (kernel linux) + ;; Blacklist conflicting kernel modules. + (kernel-arguments '("modprobe.blacklist=b43,b43legacy,ssb,bcm43xx,brcm80211,brcmfmac,brcmsmac,bcma")) + (firmware (cons* broadcom-bt-firmware + %base-firmware)) + ... + (services + (cons* (load-broadcom-sta-service) + ... + %desktop-services))) +#+END_SRC + +* Acknowledgments +Many of the ideas and code you see here were inspired by +https://gitlab.com/nonguix/nonguix. diff --git a/james/linux-nonfree.scm b/james/linux-nonfree.scm deleted file mode 100644 index 8b91894..0000000 --- a/james/linux-nonfree.scm +++ /dev/null @@ -1,88 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016-2017 James Richardson -;;; -;;; This file is not part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (james linux-nonfree) - #:use-module (guix licenses) - #:use-module (gnu packages linux) - #:use-module (guix build-system trivial) - #:use-module (guix git-download) - #:use-module (guix packages) - #:use-module (guix download)) - -(define-public iwlwifi-firmware-non-free - (package - (name "iwlwifi-firmware-non-free") - (version "695f2d6d82173f4e322d8f834c9849775778022a") - (source (origin - (method git-fetch) - (uri (git-reference - (url "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git") - (commit version))) - (sha256 - (base32 - "0mjpzacdc5y7h9fg8cfcmp169gpps6vsb1w85fansslyk7h067ky")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (fw-dir (string-append %output "/lib/firmware/"))) - (mkdir-p fw-dir) - (for-each (lambda (file) - (copy-file file - (string-append fw-dir - (basename file)))) - (find-files source "iwlwifi.*\\.ucode$|LICENSE.iwlwifi_firmware")) - #t)))) - - (home-page "") - (synopsis "Non-free firmware for Intel wireless chips") - (description "Non-free firmware for Intel wireless") - (license (non-copyleft "https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/LICENCE.iwlwifi_firmware")))) - -(define (linux-nonfree-urls version) - "Return a list of URLs for Linux-Nonfree VERSION." - (list (string-append - "https://www.kernel.org/pub/linux/kernel/v4.x/" - "linux-" version ".tar.xz"))) - -(define-public linux-nonfree - (let* ((version "4.11.1")) - (package - (inherit linux-libre) - (name "linux-nonfree") - (version version) - (source (origin - (method url-fetch) - (uri (linux-nonfree-urls version)) - (sha256 - (base32 - "027646ynwf4n8cb3h29a9qfm0cyw12bvaavzn2q44ych2vigjiky")))) - (synopsis "Mainline Linux Kennel, nonfree binary blogs included.") - (description "Linux is a kernel.") - (license gpl2) - (home-page "http://kernel.org")))) - -(define-public perf-nonfree - (package - (inherit perf) - (name "perf-nonfree") - (version (package-version linux-nonfree)) - (source (package-source linux-nonfree)) - (license (package-license linux-nonfree)))) diff --git a/james/vmware-perl-sdk.scm b/james/vmware-perl-sdk.scm deleted file mode 100644 index e275ee5..0000000 --- a/james/vmware-perl-sdk.scm +++ /dev/null @@ -1,623 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 James Richardson -;;; -;;; This file is not part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (james vmware-perl-sdk) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages) - #:use-module (guix packages) - #:use-module (gnu packages compression) - #:use-module (gnu packages perl) - #:use-module (gnu packages mail) - #:use-module (gnu packages tls) - #:use-module (gnu packages xml) - #:use-module (guix download) - ;; #:use-module (guix build-system gnu) - #:use-module (guix build-system perl) -;; #:use-module (gnu packages perl-web) - #:use-module (gnu packages web)) - -;;; -;;; Please: Try to add new module packages in alphabetic order. -;;; - - -(define-public perl-crypt-ssleay - (package - (name "perl-crypt-ssleay") - (version "0.72") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/N/NA/NANIS/Crypt-SSLeay-" - version - ".tar.gz")) - (sha256 - (base32 - "1s7zm6ph37kg8jzaxnhi4ff4snxl7mi5h14arxbri0kp6s0lzlzm")))) - (build-system perl-build-system) - (native-inputs - `(("perl-path-class" ,perl-path-class) - ("perl-try-tiny" ,perl-try-tiny))) - (inputs - `(("perl-lwp-protocol-https" - ,perl-lwp-protocol-https))) - (home-page - "http://search.cpan.org/dist/Crypt-SSLeay") - (synopsis "OpenSSL support for LWP") - (description "fill-in-yourself!") - (license license:artistic2.0))) - - -(define-public perl-soap-lite - (package - (name "perl-soap-lite") - (version "1.20") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/P/PH/PHRED/SOAP-Lite-" - version - ".tar.gz")) - (sha256 - (base32 - "1q91wgdldfpq6pg3phl9c2ibbazxyi7hm32plgir05qscfz631vy")))) - (build-system perl-build-system) - (native-inputs - `(("perl-io-stringy" ,perl-io-stringy) - ("perl-test-mockobject" ,perl-test-mockobject) - ("perl-test-warn" ,perl-test-warn) - ("perl-test-xml" ,perl-test-xml) - ("perl-xml-parser-lite" ,perl-xml-parser-lite))) - (inputs - `(("perl-class-inspector" ,perl-class-inspector) - ("perl-dimeo-tools" ,perl-dime-tools) - ("perl-fcgi" ,perl-fcgi) - ("perl-http-daemon" ,perl-http-daemon) - ("perl-io-sessiondata" ,perl-io-sessiondata) - ("perl-io-socket-ssl" ,perl-io-socket-ssl) - ("perl-libwww" ,perl-libwww) ; was perl-libwww-perl - ("perl-lwp-protocol-https" - ,perl-lwp-protocol-https) - ("perl-mime-tools" ,perl-mime-tools) - ("perl-mod_perl" ,perl-mod_perl) - ("perl-soap-transport-jabber" - ,perl-soap-transport-jabber) - ("perl-soap-transport-mq" - ,perl-soap-transport-mq) - ("perl-task-weaken" ,perl-task-weaken) - ("perl-uri" ,perl-uri) - ("perl-xml-parser" ,perl-xml-parser))) - (home-page - "http://search.cpan.org/dist/SOAP-Lite") - (synopsis "Perl's Web Services Toolkit") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-uuid - (package - (name "perl-uuid") - (version "0.27") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/J/JR/JRM/UUID-" - version - ".tar.gz")) - (sha256 - (base32 - "1vyiaf1i2qy1y35nbdrlzl9njn891j7mpixscq8j746pn38g47gz")))) - (build-system perl-build-system) - (native-inputs - `(("perl-devel-checklib" ,perl-devel-checklib))) - (home-page "http://search.cpan.org/dist/UUID") - (synopsis - "DCE compatible Universally Unique Identifier library for Perl") - (description "fill-in-yourself!") - (license license:artistic2.0))) - -(define-public perl-dime-tools - (package - (name "perl-dime-tools") - (version "0.04") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/N/NE/NEILB/DIME-Tools-" - version - ".tar.gz")) - (sha256 - (base32 - "0v0n7q7y2xznkg7w2cz7k9jw8nlz14s94x6mwh7njmc5pbygbpqz")))) - (build-system perl-build-system) - (inputs - `(("perl-data-uuid" ,perl-data-uuid) - ("perl-io-stringy" ,perl-io-stringy))) - (home-page - "http://search.cpan.org/dist/DIME-Tools") - (synopsis - "modules for parsing and generate DIME messages") - (description "fill-in-yourself!") - (license license:gpl2))) - -(define-public perl-fcgi - (package - (name "perl-fcgi") - (version "0.78") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/E/ET/ETHER/FCGI-" - version - ".tar.gz")) - (sha256 - (base32 - "1cxavhzg4gyw4gl9kirpbdimjr8gk1rjc3pqs3xrnh1gjybld5xa")))) - (build-system perl-build-system) - (home-page "http://search.cpan.org/dist/FCGI") - (synopsis "Fast CGI module") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-io-sessiondata - (package - (name "perl-io-sessiondata") - (version "1.03") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/P/PH/PHRED/IO-SessionData-" - version - ".tar.gz")) - (sha256 - (base32 - "1p9d77pqy9a8dbgw7h7vmmkg0rlckk19dchd4c8gvcyv7qm73934")))) - (build-system perl-build-system) - (home-page - "http://search.cpan.org/dist/IO-SessionData") - (synopsis "supporting module for SOAP::Lite") - (description "fill-in-yourself!") - (license #f))) - - -(define-public perl-mime-tools - (package - (name "perl-mime-tools") - (version "5.508") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/D/DS/DSKOLL/MIME-tools-" - version - ".tar.gz")) - (sha256 - (base32 - "05y92z5rhnwr2n1cjd7kljylz0xri4pffj1zanhxaidhs1nfizxd")))) - (build-system perl-build-system) - (native-inputs - `(("perl-test-deep" ,perl-test-deep))) - (inputs - `(("perl-convert-binhex" ,perl-convert-binhex) - ("perl-mailtools" ,perl-mailtools))) - (home-page - "http://search.cpan.org/dist/MIME-tools") - (synopsis "Tools to manipulate MIME messages") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-mod_perl - (package - (name "perl-mod_perl") - (version "2.0.10") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/S/SH/SHAY/mod_perl-" - version - ".tar.gz")) - (sha256 - (base32 - "0r1bhzwl5gr0202r6448943hjxsickzn55kdmb7dzad39vnq7kyi")))) - (build-system perl-build-system) - (home-page - "http://search.cpan.org/dist/mod_perl") - (synopsis - "Embed a Perl interpreter in the Apache/2.x HTTP server") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-soap-transport-jabber - (package - (name "perl-soap-transport-jabber") - (version "0.713") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/M/MK/MKUTTER/SOAP-Transport-JABBER-" - version - ".tar.gz")) - (sha256 - (base32 - "1hqizhkxhi9alxypkx2cbh85vr5fjri5brfgrwp3fj49ybm5jpyz")))) - (build-system perl-build-system) - (native-inputs - `(("perl-module-build" ,perl-module-build))) - (inputs - `(("perl-net-jabber" ,perl-net-jabber) - ("perl-soap-lite" ,perl-soap-lite))) - (home-page - "http://search.cpan.org/dist/SOAP-Transport-JABBER") - (synopsis "JABBER support for SOAP::Lite") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-soap-transport-mq - (package - (name "perl-soap-transport-mq") - (version "0.712") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/M/MK/MKUTTER/SOAP-Transport-MQ-" - version - ".tar.gz")) - (sha256 - (base32 - "0hlnacwy46rzg7v0kncn96dk5fqq8kcynaa0yn63hjyc6aiwv0i6")))) - (build-system perl-build-system) - (native-inputs - `(("perl-module-build" ,perl-module-build))) - (inputs - `(("perl-mqseries" ,perl-mqseries) - ("perl-soap-lite" ,perl-soap-lite))) - (home-page - "http://search.cpan.org/dist/SOAP-Transport-MQ") - (synopsis "MQ support for SOAP::Lite") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-test-xml - (package - (name "perl-test-xml") - (version "0.08") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/S/SE/SEMANTICO/Test-XML-" - version - ".tar.gz")) - (sha256 - (base32 - "1qiym068j0f3fpci5692jpn0v383pxy6k2mcv0x0v1pcrliwqm7b")))) - (build-system perl-build-system) - (inputs - `(("perl-xml-parser" ,perl-xml-parser) - ("perl-xml-sax" ,perl-xml-sax) - ("perl-xml-sax-writer" ,perl-xml-sax-writer) - ("perl-xml-semanticdiff" ,perl-xml-semanticdiff) - ("perl-xml-twig" ,perl-xml-twig) - ("perl-xml-xpath" ,perl-xml-xpath))) - (home-page - "http://search.cpan.org/dist/Test-XML") - (synopsis "Compare XML in perl tests") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-xml-parser-lite - (package - (name "perl-xml-parser-lite") - (version "0.721") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/P/PH/PHRED/XML-Parser-Lite-" - version - ".tar.gz")) - (sha256 - (base32 - "1fh8g77nkfv9n07ivilnfxdapx6jx13whf8q0anrmnxrr9pa6qjq")))) - (build-system perl-build-system) - (native-inputs - `(("perl-test-requires" ,perl-test-requires))) - (home-page - "http://search.cpan.org/dist/XML-Parser-Lite") - (synopsis - "Lightweight pure-perl XML Parser (based on regexps)") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-xml-sax-writer - (package - (name "perl-xml-sax-writer") - (version "0.56") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/P/PE/PERIGRIN/XML-SAX-Writer-" - version - ".tar.gz")) - (sha256 - (base32 - "00vx47493rdgwmirxfgspwanlc9if389jsxq2w1ibj3ja2igfwyh")))) - (build-system perl-build-system) - (inputs - `(("perl-xml-filter-buffertext" - ,perl-xml-filter-buffertext) - ("perl-xml-namespacesupport" - ,perl-xml-namespacesupport) - ("perl-xml-sax-base" ,perl-xml-sax-base))) - (home-page - "http://search.cpan.org/dist/XML-SAX-Writer") - (synopsis "SAX2 XML Writer") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-xml-semanticdiff - (package - (name "perl-xml-semanticdiff") - (version "1.0005") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/S/SH/SHLOMIF/XML-SemanticDiff-" - version - ".tar.gz")) - (sha256 - (base32 - "004kbmhl0zl9dmfw0g27ka0mzncm8pksxd81kpvlisg6ym16109z")))) - (build-system perl-build-system) - (native-inputs - `(("perl-module-build" ,perl-module-build))) - (inputs `(("perl-xml-parser" ,perl-xml-parser))) - (home-page - "http://search.cpan.org/dist/XML-SemanticDiff") - (synopsis - "Perl extension for comparing XML documents.") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-xml-twig - (package - (name "perl-xml-twig") - (version "3.52") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/M/MI/MIROD/XML-Twig-" - version - ".tar.gz")) - (sha256 - (base32 - "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy")))) - (build-system perl-build-system) - (inputs `(("perl-xml-parser" ,perl-xml-parser))) - (home-page - "http://search.cpan.org/dist/XML-Twig") - (synopsis "XML, The Perl Way") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-xml-filter-buffertext - (package - (name "perl-xml-filter-buffertext") - (version "1.01") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/R/RB/RBERJON/XML-Filter-BufferText-" - version - ".tar.gz")) - (sha256 - (base32 - "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg")))) - (build-system perl-build-system) - (home-page - "http://search.cpan.org/dist/XML-Filter-BufferText") - (synopsis - "Filter to put all characters() in one event") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-data-uuid - (package - (name "perl-data-uuid") - (version "1.221") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/R/RJ/RJBS/Data-UUID-" - version - ".tar.gz")) - (sha256 - (base32 - "0rw60wib0mj5z0v909mplh750y40hzyzf4z0b6h4ajxplyiv5irw")))) - (build-system perl-build-system) - (home-page - "http://search.cpan.org/dist/Data-UUID") - (synopsis - "Globally/Universally Unique Identifiers (GUIDs/UUIDs)") - (description "fill-in-yourself!") - (license license:bsd-3))) - - -(define-public perl-convert-binhex - (package - (name "perl-convert-binhex") - (version "1.125") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/S/ST/STEPHEN/Convert-BinHex-" - version - ".tar.gz")) - (sha256 - (base32 - "15v3489k179cx0fz3lix79ssjid0nhhpf6c33swpxga6pss92dai")))) - (build-system perl-build-system) - (native-inputs - `(("perl-file-slurp" ,perl-file-slurp) - ("perl-test-most" ,perl-test-most))) - (home-page - "http://search.cpan.org/dist/Convert-BinHex") - (synopsis - "extract data from Macintosh BinHex files") - (description "fill-in-yourself!") - (license (package-license perl)))) - - -(define-public perl-mailtools - (package - (name "perl-mailtools") - (version "2.18") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/M/MA/MARKOV/MailTools-" - version - ".tar.gz")) - (sha256 - (base32 - "09xm6ymyqwawb21v15wyy721ps2rfxiqx5qdy8912dsp09vrxvnz")))) - (build-system perl-build-system) - (inputs `(("perl-timedate" ,perl-timedate))) - (home-page - "http://search.cpan.org/dist/MailTools") - (synopsis "Various e-mail related modules") - (description "fill-in-yourself!") - (license (package-license perl)))) - -(define-public perl-net-jabber - (package - (name "perl-net-jabber") - (version "2.0") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/R/RE/REATMON/Net-Jabber-" - version - ".tar.gz")) - (sha256 - (base32 - "04c0r0r18a1fh2nsrrcwqdy0923pz44g8qz7bkisb9b6c553kfnz")))) - (build-system perl-build-system) - (inputs `(("perl-net-xmpp" ,perl-net-xmpp))) - (home-page - "http://search.cpan.org/dist/Net-Jabber") - (synopsis "Jabber Perl Library") - (description "fill-in-yourself!") - (license #f))) - -(define-public perl-net-xmpp - (package - (name "perl-net-xmpp") - (version "1.05") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/D/DA/DAPATRICK/Net-XMPP-" - version - ".tar.gz")) - (sha256 - (base32 - "0qlkjh46idkaw46di6j9y7jhy05zaahzm6x0cfhkbcn2fw2j00jc")))) - (build-system perl-build-system) - (native-inputs - `(("perl-lwp-online" ,perl-lwp-online) - ("perl-module-build" ,perl-module-build) - ("perl-yaml-tiny" ,perl-yaml-tiny))) - (inputs - `(("perl-authen-sasl" ,perl-authen-sasl) - ("perl-xml-stream" ,perl-xml-stream))) - (home-page - "http://search.cpan.org/dist/Net-XMPP") - (synopsis "XMPP Support Library") - (description "fill-in-yourself!") - (license license:lgpl2.1))) - -(define-public perl-xml-stream - (package - (name "perl-xml-stream") - (version "1.24") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/D/DA/DAPATRICK/XML-Stream-" - version - ".tar.gz")) - (sha256 - (base32 - "0p0xv63k5n5f350crh092d9511isrvzbrg0397lvcg6zvpsc9rdw")))) - (build-system perl-build-system) - (native-inputs - `(("perl-module-build" ,perl-module-build))) - (inputs - `(("perl-authen-sasl" ,perl-authen-sasl))) - (home-page - "http://search.cpan.org/dist/XML-Stream") - (synopsis - "XML stream support library for XMPP-like protocols") - (description "fill-in-yourself!") - (license license:lgpl2.1))) - -(define-public perl-lwp-online - (package - (name "perl-lwp-online") - (version "1.08") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/A/AD/ADAMK/LWP-Online-" - version - ".tar.gz")) - (sha256 - (base32 - "176f6vbk1018i0y7xj9d406ndbjgwzan2j9nihxnsahzg2vr2vz2")))) - (build-system perl-build-system) - (inputs - `(("perl-libwww" ,perl-libwww) ;; was perl-libwww-perl - ("perl-uri" ,perl-uri))) - (home-page - "http://search.cpan.org/dist/LWP-Online") - (synopsis - "Does your process have access to the web") - (description "fill-in-yourself!") - (license (package-license perl)))) - - diff --git a/non-free/licenses.scm b/non-free/licenses.scm new file mode 100644 index 0000000..fe552da --- /dev/null +++ b/non-free/licenses.scm @@ -0,0 +1,41 @@ +;;; Copyright © 2019 Alex Griffin +;;; +;;; This program is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see . + +(define-module (non-free licenses) + #:use-module (guix licenses) + #:export (nonfree + undistributable)) + +(define license (@@ (guix licenses) license)) + +(define* (nonfree uri #:optional (comment "")) + "Return a nonfree license, whose full text can be found +at URI, which may be a file:// URI pointing the package's tree." + (license "Nonfree" + uri + (string-append + "This a nonfree license. Check the URI for details. " + comment))) + +(define* (undistributable uri #:optional (comment "")) + "Return a nonfree license for packages which may not be redistributed, whose +full text can be found at URI, which may be a file:// URI pointing the +package's tree." + (license "Nonfree Undistributable" + uri + (string-append + "This a nonfree license. This package may NOT be redistributed " + "in prebuilt form. Check the URI for details. " + comment))) diff --git a/non-free/packages/linux.scm b/non-free/packages/linux.scm new file mode 100644 index 0000000..3f71b04 --- /dev/null +++ b/non-free/packages/linux.scm @@ -0,0 +1,422 @@ +;;; Copyright © 2019 Alex Griffin +;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2019 Giacomo Leidi +;;; Copyright © 2019 James Richardson +;;; +;;; This program is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see . +;;; +;;; This program is not part of Guix +;;; +(define-module (non-free packages linux) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages linux) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system linux-module) + #:use-module (guix build-system trivial) + #:use-module (non-free licenses)) + +(define (linux-urls version) + "Return a list of URLS for Linux VERSION." + (list (string-append "https://www.kernel.org/pub/linux/kernel/v" + (version-major version) ".x/linux-" version ".tar.xz"))) + +(define (corrupt-linux freedo version hash) + (package + (inherit freedo) + (name "linux") + (version version) + (source (origin + (method url-fetch) + (uri (linux-urls version)) + (sha256 (base32 hash)))) + (home-page "https://www.kernel.org/") + (synopsis "Linux kernel with nonfree binary blobs included") + (description + "The unmodified Linux kernel, including nonfree blobs, for running GuixSD +on hardware which requires nonfree software to function."))) + +(define-public linux + (corrupt-linux linux-libre "5.2.4" + "0hzfayq79bksng09ngw3k3h3zkd6ndfn059rvwpznypy1fg8pkdi")) + +(define-public linux-4.19 + (corrupt-linux linux-libre-4.19 "4.19.62" + "1p6s1ksrsq3za7644j0qf9brf6brwq39jxpfln5ypmyfi5qn9gh7")) + +(define-public linux-4.14 + (corrupt-linux linux-libre-4.14 "4.14.134" + "0b9xj1rwr5fpw2giirfghzxxc0wp1hwf4nqvalx314pxxysyf88b")) + +(define-public linux-4.9 + (corrupt-linux linux-libre-4.9 "4.9.186" + "0sjbp7m6d625rw06wv34a0805d1lgldii4pxiqfpja871m1q8914")) + +(define-public linux-4.4 + (corrupt-linux linux-libre-4.4 "4.4.186" + "113rjf8842glzi23y1g1yrwncihv2saah6wz0r726r06bk9p64hb")) + +(define-public linux-firmware + (let ((commit "92e17d0dd2437140fab044ae62baf69b35d7d1fa") + (revision "1")) + (package + (name "linux-firmware") + (version (git-version "20190502" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url (string-append + "https://git.kernel.org/pub/scm/" + "linux/kernel/git/firmware/linux-firmware.git")) + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1bsgp124jhs9bbjjq0fzmdsziwx1y5aivkgpj8v56ar0y2zmrw2d")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (destination (string-append %output "/lib/firmware"))) + (mkdir-p destination) + (copy-recursively source destination #:follow-symlinks? #t) + #t)))) + (home-page + "http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git") + (synopsis "Nonfree firmware blobs for Linux") + (description "Nonfree firmware blobs for enabling support for various +hardware in the Linux kernel. This is a large package which may be overkill +if your hardware is supported by one of the smaller firmware packages.") + (license + (nonfree + (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/" + "firmware/linux-firmware.git/plain/WHENCE")))))) + +(define-public amdgpu-firmware + (package + (inherit linux-firmware) + (name "amdgpu-firmware") + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (fw-dir (string-append %output "/lib/firmware/")) + (bin-dir (string-append fw-dir "/amdgpu"))) + (mkdir-p bin-dir) + (copy-recursively (string-append source "/amdgpu") bin-dir) + (install-file (string-append source "/LICENSE.amdgpu") fw-dir) + #t)))) + (home-page "http://support.amd.com/en-us/download/linux") + (synopsis "Nonfree firmware for AMD graphics chips") + (description "Nonfree firmware for AMD graphics chips. While most AMD +graphics cards can be run with the free Mesa, many modern cards require a +nonfree kernel module to run properly and support features like hibernation and +advanced 3D.") + (license + (nonfree + (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENSE.amdgpu"))))) + +(define-public ath3k-firmware + (package + (inherit linux-firmware) + (name "ath3k-firmware") + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (fw-dir (string-append %output "/lib/firmware"))) + (mkdir-p fw-dir) + (for-each (lambda (file) + (copy-file (string-append source "/" file) + (string-append fw-dir "/" file))) + (list "ath3k-1.fw" + "LICENCE.atheros_firmware" + "LICENSE.QualcommAtheros_ar3k" + "WHENCE")) + (copy-recursively (string-append source "/ar3k") + (string-append fw-dir "/ar3k")) + #t)))) + (synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver") + (description "Nonfree firmware blobs for the ath3k Bluetooth driver. ath3k +is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets.") + (license + (list + (nonfree + (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENCE.atheros_firmware")) + (nonfree + (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENSE.QualcommAtheros_ar3k")))))) + +(define-public iwlwifi-firmware + (package + (inherit linux-firmware) + (name "iwlwifi-firmware") + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (fw-dir (string-append %output "/lib/firmware/"))) + (mkdir-p fw-dir) + (for-each (lambda (file) + (copy-file file + (string-append fw-dir (basename file)))) + (cons* + (string-append source "/LICENCE.iwlwifi_firmware") + (find-files source + "iwlwifi-.*\\.ucode$"))) + #t)))) + (home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi") + (synopsis "Nonfree firmware for Intel wifi chips") + (description "The proprietary iwlwifi kernel module is required by many +modern Intel wifi cards (commonly found in laptops). This blob enables +support for 5GHz and 802.11ac, among others.") + (license + (nonfree (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENCE.iwlwifi_firmware"))))) + +(define-public broadcom-sta + (package + (name "broadcom-sta") + (version "6.30.223.271") + (source + (origin + (method url-fetch/tarbomb) + (uri (string-append "https://docs.broadcom.com/docs-and-downloads/" + "docs/linux_sta/hybrid-v35_64-nodebug-pcoem-" + (string-replace-substring version "." "_") + ".tar.gz")) + (patches + (parameterize + ((%patch-path + (map (lambda (directory) + (string-append directory "/nongnu/packages/patches")) + %load-path))) + ;; https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/broadcom-sta + ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/broadcom-wl-dkms + (search-patches "broadcom-sta-gcc.patch" + "broadcom-sta-license.patch" + "broadcom-sta-null-pointer-fix.patch" + "broadcom-sta-rdtscl.patch" + "broadcom-sta-linux-4.7.patch" + "broadcom-sta-linux-4.8.patch" + "broadcom-sta-debian-fix-kernel-warnings.patch" + "broadcom-sta-linux-4.11.patch" + "broadcom-sta-linux-4.12.patch" + "broadcom-sta-linux-4.15.patch" + "broadcom-sta-fix_mac_profile_discrepancy.patch" + "broadcom-sta-linux-5.1.patch"))) + (sha256 + (base32 + "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz")))) + (build-system linux-module-build-system) + (arguments + `(#:linux ,linux + #:tests? #f)) + (supported-systems '("x86_64-linux")) + (home-page "https://www.broadcom.com/support/802.11") + (synopsis "Broadcom 802.11 Linux STA wireless driver") + (description "This package contains Broadcom's IEEE 802.11a/b/g/n/ac hybrid +Linux device driver for the following chipsets: +@itemize +@item BCM4311 +@item BCM4312 +@item BCM4313 +@item BCM4321 +@item BCM4322 +@item BCM43224 +@item BCM43225 +@item BCM43227 +@item BCM43228 +@item BCM43142 +@item BCM4331 +@item BCM4352 +@item BCM4360 +@end itemize") + (license (nonfree "https://www.broadcom.com/support/802.11")))) + +(define-public broadcom-bt-firmware + (package + (name "broadcom-bt-firmware") + (version "12.0.1.1012") + (source + (origin + (method url-fetch) + (uri + (string-append + "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/04/" + "852bb503-de7b-4810-a7dd-cbab62742f09_7cf83a4c194116648d17707ae37d564f9c70bec2" + ".cab")) + (file-name (string-append name "-" version ".cab")) + (sha256 + (base32 + "1b1qjwxjk4y91l3iz157kms8601n0mmiik32cs6w9b1q4sl4pxx9")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils) + (ice-9 rdelim) + (ice-9 regex)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 rdelim) + (ice-9 regex)) + (let ((PATH (string-append (assoc-ref %build-inputs "cabextract") "/bin:" + (assoc-ref %build-inputs "bluez") "/bin")) + (source (assoc-ref %build-inputs "source")) + (firmware-dir (string-append %output "/lib/firmware/brcm/"))) + (setenv "PATH" PATH) + (system* "cabextract" source) + (mkdir-p firmware-dir) + ;; process the inf file to get the correct filenames + (with-input-from-file "bcbtums.inf" + (lambda () + (do ((line (read-line) (read-line)) + (devices '())) + ((eof-object? line) #t) + ;; these two `lets' are like awk patterns matching against + ;; records. link devices in this file with its vids and pids + (let ((rcrd (string-match "%.*%=(.*),.*VID_(....).*PID_(....)" + line))) + (when rcrd + (set! devices + (assoc-set! devices (match:substring rcrd 1) + `((vid . ,(match:substring rcrd 2)) + (pid . ,(match:substring rcrd 3))))))) + ;; find the hex file associated with each device, build the + ;; output file name + (let ((rcrd (string-match "\\[(RAMUSB.*)\\.CopyList\\]" line))) + (when rcrd + (let* ((key (match:substring rcrd 1)) + (hex-file (begin (do ((line (read-line) (read-line))) + ((string-match "^([0-9A-Z_.]+\\.hex)" line) + (string-drop-right line 1))))) + (chipset (car (string-tokenize + hex-file + char-set:letter+digit))) + (vid (assoc-ref (assoc-ref devices key) 'vid)) + (pid (assoc-ref (assoc-ref devices key) 'pid)) + (hcd-file (string-append chipset "-" + (string-downcase vid) "-" + (string-downcase pid) + ".hcd"))) + ;; finally convert the file, phew! + (system* "hex2hcd" + "-o" (string-append firmware-dir hcd-file) + hex-file))))))))))) + (native-inputs + `(("bluez" ,bluez) + ("cabextract" ,cabextract))) + (home-page "http://www.broadcom.com/support/bluetooth") + (synopsis "Broadcom bluetooth firmware") + (description + "This package contains nonfree firmware for the following bluetooth +chipsets from Broadcom: +@itemize +@item BCM4335C0 +@item BCM4350C5 +@item BCM4356A2 +@item BCM4371C2 +@item BCM20702A1 +@item BCM20702B0 +@item BCM20703A1 +@item BCM43142A0 +@end itemize") + (license + (undistributable + (string-append + "https://raw.githubusercontent.com/winterheart/broadcom-bt-firmware" + "/b60fa04881bf8f9b9d578f57d1dfa596cae2a82e" + "/LICENSE.broadcom_bcm20702"))))) + +(define-public rtlwifi-firmware + (package + (inherit linux-firmware) + (name "rtlwifi-firmware") + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (fw-dir (string-append %output "/lib/firmware/")) + (bin-dir (string-append fw-dir "/rtlwifi"))) + (mkdir-p bin-dir) + (copy-recursively (string-append source "/rtlwifi") bin-dir) + (install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) + #t)))) + (home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x") + (synopsis "Nonfree firmware for Realtek wifi chips") + (description + "Nonfree firmware for Realtek wifi chips. This package contains nonfree +firmware for the following chips: +@itemize +@item Realtek RTL8188EE firmware (rtlwifi/rtl8188efw.bin) +@item Realtek RTL8188EU firmware (rtlwifi/rtl8188eufw.bin) +@item Realtek RTL8192CE/RTL8188CE firmware (rtlwifi/rtl8192cfw.bin) +@item Realtek RTL8192CE/RTL8188CE B-cut firmware (rtlwifi/rtl8192cfwU_B.bin) +@item Realtek RTL8188CE A-cut firmware, version 4.816.2011 (rtlwifi/rtl8192cfwU.bin) +@item Realtek RTL8192CU/RTL8188CU UMC A-cut firmware (rtlwifi/rtl8192cufw_A.bin) +@item Realtek RTL8192CU/RTL8188CU UMC B-cut firmware (rtlwifi/rtl8192cufw_B.bin) +@item Realtek RTL8192CU/RTL8188CU TMSC firmware (rtlwifi/rtl8192cufw_TMSC.bin) +@item Realtek RTL8192CU/RTL8188CU fallback firmware (rtlwifi/rtl8192cufw.bin) +@item Realtek RTL8192DE firmware (rtlwifi/rtl8192defw.bin) +@item Realtek RTL8192EE wifi firmware (rtlwifi/rtl8192eefw.bin) +@item Realtek RTL8192EU non-WoWLAN firmware (rtlwifi/rtl8192eu_nic.bin) +@item Realtek RTL8192EU WoWLAN firmware (rtlwifi/rtl8192eu_wowlan.bin) +@item Realtek RTL8192SE/RTL8191SE firmware, version 4.816.2011 (rtlwifi/rtl8192sefw.bin) +@item Realtek RTL8192SU/RTL8712U firmware (rtlwifi/rtl8712u.bin) +@item Realtek RTL8723AU rev A wifi-with-BT firmware (rtlwifi/rtl8723aufw_A.bin) +@item Realtek RTL8723AU rev B wifi-with-BT firmware (rtlwifi/rtl8723aufw_B.bin) +@item Realtek RTL8723AU rev B wifi-only firmware (rtlwifi/rtl8723aufw_B_NoBT.bin) +@item Realtek RTL8723BE firmware, version 36 (rtlwifi/rtl8723befw_36.bin) +@item Realtek RTL8723BE firmware (rtlwifi/rtl8723befw.bin) +@item Realtek RTL8723BS BT firmware (rtlwifi/rtl8723bs_bt.bin) +@item Realtek RTL8723BS wifi non-WoWLAN firmware (rtlwifi/rtl8723bs_nic.bin) +@item Realtek RTL8723BS wifi WoWLAN firmware (rtlwifi/rtl8723bs_wowlan.bin) +@item Realtek RTL8723BU non-WoWLAN firmware (rtlwifi/rtl8723bu_nic.bin) +@item Realtek RTL8723BU WoWLAN firmware (rtlwifi/rtl8723bu_wowlan.bin) +@item Realtek RTL8723DE firmware (rtlwifi/rtl8723defw.bin) +@item Realtek RTL8723AE rev B firmware (rtlwifi/rtl8723fw_B.bin) +@item Realtek RTL8723AE rev A firmware (rtlwifi/rtl8723fw.bin) +@item Realtek RTL8821AE firmware, version 29 (rtlwifi/rtl8821aefw_29.bin) +@item Realtek RTL8821AE firmware (rtlwifi/rtl8821aefw_wowlan.bin) +@item Realtek RTL8821AE firmware (rtlwifi/rtl8821aefw.bin) +@item Realtek RTL8822BE firmware (rtlwifi/rtl8822befw.bin) +@end itemize") + (license + (nonfree + (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENCE.rtlwifi_firmware.txt"))))) -- 2.11.4.GIT