aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is 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
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu installer hardware)
  #:use-module (gnu build linux-modules)
  #:use-module (guix i18n)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-71)
  #:export (unsupported-pci-device?
            pci-device-description))

(define %unsupported-linux-modules
  ;; List of Linux modules that are useless without non-free firmware.
  ;;
  ;; Currently only drivers for PCI devices are listed.  USB devices such as
  ;; "btintel" would require support to list USB devices and read the USB
  ;; device ID database.  Punt for now as this is usually less critical.
  ;;
  ;; This list is currently manually maintained based on information on
  ;; non-free firmware available from
  ;; <https://packages.debian.org/search?keywords=firmware&searchon=names&suite=stable&section=all>.
  '(;; WiFi.
    "brcmfmac"
    "ipw2100"
    "ipw2200"
    "iwlwifi"
    "mwl8k"
    "rtl8188ee"
    "rtl818x_pci"
    "rtl8192ce"
    "rtl8192de"
    "rtl8192ee"

    ;; Ethernet.
    "bnx2"
    "bnx2x"
    "liquidio"

    ;; Graphics.
    "amdgpu"
    "radeon"

    ;; Multimedia.
    "ivtv"))

(define unsupported-pci-device?
  ;; Arrange to load the module alias database only once.
  (let ((aliases (delay (known-module-aliases))))
    (lambda (device)
      "Return true if DEVICE is known to not be supported by free software."
      (any (lambda (module)
             (member module %unsupported-linux-modules))
           (matching-modules (pci-device-module-alias device)
                             (force aliases))))))

(define (pci-device-description pci-database)
  "Return a procedure that, given a PCI device, returns a string describing
it."
  (define (with-fallback lookup)
    (lambda (vendor-id id)
      (let ((vendor name (lookup vendor-id id)))
        (values (or vendor (number->string vendor-id 16))
                (or name (number->string id 16))))))

  (define pci-lookup
    (with-fallback (load-pci-device-database pci-database)))

  (lambda (device)
    (let ((vendor name (pci-lookup (pci-device-vendor device)
                                   (pci-device-id device))))
      (if (network-pci-device? device)
          ;; TRANSLATORS: The two placeholders are the manufacturer
          ;; and name of a PCI device.
          (format #f (G_ "~a ~a (networking device)")
                  vendor name)
          (string-append vendor " " name)))))
Tobias Geerinckx-Rice 2021-07-03gnu: stockfish: Update to 14....* gnu/packages/games.scm (stockfish): Update to 14. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Michael Rohleder 2021-06-28gnu: opensurge: Update to 0.5.2.1....* gnu/packages/games.scm (opensurge): Update to 0.5.2.1. [arguments]: Keep installing into /bin. Tobias Geerinckx-Rice 2021-06-28gnu: freeciv: Update to 2.6.5....* gnu/packages/games.scm (freeciv): Update to 2.6.5. Tobias Geerinckx-Rice 2021-06-28gnu: extremetuxracer: Update to 0.8.1....* gnu/packages/games.scm (extremetuxracer): Update to 0.8.1. Tobias Geerinckx-Rice 2021-06-23Merge branch 'master' into core-updates...Conflicts: gnu/packages/cups.scm gnu/packages/python-web.scm gnu/packages/web.scm guix/build/maven/pom.scm Tobias Geerinckx-Rice 2021-06-22gnu: odamex: Update to 0.9.3....* gnu/packages/games.scm (odamex): Update to 0.9.3. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Solene Rapenne via Guix-patches via 2021-06-22gnu: armagetronad: Update to 0.2.9.1.0....* gnu/packages/games.scm (armagetronad): Update to 0.2.9.1.0. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Solene Rapenne via Guix-patches via 2021-06-22gnu: wesnoth: Update to 1.14.17....* gnu/packages/games.scm (wesnoth): Update to 1.14.17. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Solene Rapenne via Guix-patches via 2021-06-22gnu: widelands: Update description....* gnu/packages/games.scm (widelands)[description]: Update to mirror changes in the stable release. Nicolas Goaziou 2021-06-22gnu: widelands: Ensure Guix catches versioning scheme switch....* gnu/packages/games.scm (widelands-21): New variable. "21" was the last beta release. Upstream has now switched to a new versioning scheme, with lesser numbers. Nicolas Goaziou 2021-06-22gnu: widelands: Update to 1.0....* gnu/packages/games.scm (widelands): Update to 1.0. [source]: Download from github as there is no tarball for v1.0 on their website. [inputs]: Add curl. * gnu/packages/patches/widelands-system-wide_minizip.patch: Adjust for 1.0. CmakeLists.txt now already defines CMAKE_MODULE_PATH, so I've moved FindMinizip.cmake to this path. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Felix Gruber 2021-06-20gnu: corsix-th: Update to 0.65....* gnu/packages/games.scm (corsix-th): Update to 0.65. Tobias Geerinckx-Rice 2021-06-19Merge branch 'master' into core-updates...Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm Marius Bakke 2021-06-14gnu: Rename qtbase to qtbase-5....This change was automated via the following command: $ git ls-files | xargs sed -i 's/,qtbase)/,qtbase-5)/g' $ git ls-files | xargs sed -i 's/inherit qtbase)/inherit qtbase-5)/g' $ git ls-files | xargs sed -i 's/package-version qtbase)/package-version qtbase-5)/g' $ git checkout etc # to clear some spurious changes This is done so the qtbase package can be upgraded to version 6 in the following commit. Maxim Cournoyer 2021-06-13doc, gnu, guix: Fix typos....* doc/guix.texi: Fix various typos and reword a sentence. * gnu/packages/cpp.scm (cpplint)[description]: Fix typo. * gnu/packages/dns.scm (ldns): Fix typo in comment. * gnu/packages/games.scm (yamagi-quake2): Fix typo in comment. * gnu/packages/qt.scm (python-pyqtwebengine): Fix typo in comment. * gnu/packages/rails.scm (ruby-autoprefixer-rails): Fix typo in comment. * gnu/packages/syndication.scm (quiterss)[description]: Fix typo. * gnu/packages/terminals.scm (kmscon): Fix typo in comment. * gnu/packages/xml.scm (perl-xml-sax-base)[description]: Fix typo. (python-elementpath)[description]: Fix typo. * guix/build/asdf-build-system.scm (output-translation): Fix typo in docstring. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2021-06-06Merge branch 'master' into core-updates... Conflicts: gnu/local.mk gnu/packages/algebra.scm gnu/packages/bioinformatics.scm gnu/packages/curl.scm gnu/packages/docbook.scm gnu/packages/emacs-xyz.scm gnu/packages/maths.scm gnu/packages/plotutils.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/radio.scm gnu/packages/readline.scm gnu/packages/tls.scm gnu/packages/xml.scm gnu/packages/xorg.scm Marius Bakke 2021-06-02gnu: pioneer: Build with model files....Fixes <https://bugs.gnu.org/48686>. * gnu/packages/games.scm (pioneer)[arguments]: Add make-flags for building with model files. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Diego Nicola Barbato 2021-05-31gnu: tome4: Update to 1.7.3....* gnu/packages/games.scm (tome4): Update to 1.7.3. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Solene Rapenne via Guix-patches via 2021-05-26gnu: warzone2100: Update to 4.0.1....* gnu/packages/games.scm (warzone2100): Update to 4.0.1. [arguments]: Disable vulkan backend with "-DWZ_ENABLE_BACKEND_VULKAN=off" configure flag. [inputs]: Add sqlite. Kei Kebreau 2021-05-25gnu: openttd-engine: Update to 1.11.2....* gnu/packages/games.scm (openttd-engine): Update to 1.11.2. [build-system]: Switch to CMake. [arguments]: Enable tests. (openttd)[arguments]<#:configure-flags>: Use CMake flags. <#:phases>: Remove `configure'. Copy assets file before check step to enable tests. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Solene Rapenne via Guix-patches via 2021-05-23gnu: ltris: Update to 1.2.3....* gnu/packages/games.scm (ltris): Update to 1.2.3. [arguments]: Remove unnecessary #:configure-flags. Tobias Geerinckx-Rice 2021-05-22Merge branch 'master' into core-updatesMarius Bakke 2021-05-21gnu: pinball: Update to 3.1.20201218....* gnu/packages/games.scm (pinball): Update to 3.1.20201218. [source]: Tarballs no longer published on sourceforge, so use git-fetch. [native-inputs]: New field for bootstrapping inputs. [inputs]: Add libltdl. [arguments]: Add custom 'bootstrap' phase. * gnu/packages/patches/pinball-system-ltdl.patch: Adjust to latest source. * gnu/packages/patches/pinball-const-fix.patch, gnu/packages/patches/pinball-cstddef.patch, gnu/packages/patches/pinball-missing-separators.patch, gnu/packages/patches/pinball-src-deps.patch: Delete upstreamed patches. * gnu/local.mk (dist_patch_DATA): Remove them. Eric Bavier