summaryrefslogtreecommitdiff
path: root/nongnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'nongnu/packages')
-rw-r--r--nongnu/packages/anydesk.scm21
-rw-r--r--nongnu/packages/benchmark.scm14
-rw-r--r--nongnu/packages/cad.scm16
-rw-r--r--nongnu/packages/chrome.scm181
-rw-r--r--nongnu/packages/chromium.scm25
-rw-r--r--nongnu/packages/clojure.scm118
-rw-r--r--nongnu/packages/compression.scm21
-rw-r--r--nongnu/packages/coq.scm23
-rw-r--r--nongnu/packages/databases.scm45
-rw-r--r--nongnu/packages/dotnet.scm17
-rw-r--r--nongnu/packages/dyalog.scm17
-rw-r--r--nongnu/packages/editors.scm104
-rw-r--r--nongnu/packages/electron.scm104
-rw-r--r--nongnu/packages/emacs.scm17
-rw-r--r--nongnu/packages/emulators.scm17
-rw-r--r--nongnu/packages/engineering.scm73
-rw-r--r--nongnu/packages/firmware.scm296
-rw-r--r--nongnu/packages/fonts.scm185
-rw-r--r--nongnu/packages/game-client.scm368
-rw-r--r--nongnu/packages/game-development.scm214
-rw-r--r--nongnu/packages/gog.scm19
-rw-r--r--nongnu/packages/k8s.scm217
-rw-r--r--nongnu/packages/linux.scm785
-rw-r--r--nongnu/packages/lisp.scm78
-rw-r--r--nongnu/packages/messaging.scm266
-rw-r--r--nongnu/packages/mozilla.scm282
-rw-r--r--nongnu/packages/music.scm103
-rw-r--r--nongnu/packages/ncurses.scm314
-rw-r--r--nongnu/packages/nvidia.scm1362
-rw-r--r--nongnu/packages/patches/broadcom-sta-debian-fix-kernel-warnings.patch161
-rw-r--r--nongnu/packages/patches/broadcom-sta-fix_mac_profile_discrepancy.patch16
-rw-r--r--nongnu/packages/patches/broadcom-sta-gcc.patch11
-rw-r--r--nongnu/packages/patches/broadcom-sta-license.patch13
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-4.11.patch52
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-4.12.patch68
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-4.15.patch47
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-4.7.patch109
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-4.8.patch64
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-5.1.patch32
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-5.10.patch211
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-5.6.patch87
-rw-r--r--nongnu/packages/patches/broadcom-sta-linux-5.9.patch12
-rw-r--r--nongnu/packages/patches/broadcom-sta-null-pointer-fix.patch27
-rw-r--r--nongnu/packages/patches/broadcom-sta-rdtscl.patch22
-rw-r--r--nongnu/packages/playonlinux.scm17
-rw-r--r--nongnu/packages/printers.scm294
-rw-r--r--nongnu/packages/productivity.scm108
-rw-r--r--nongnu/packages/radio.scm58
-rw-r--r--nongnu/packages/scanner.scm17
-rw-r--r--nongnu/packages/steam-client.scm767
-rw-r--r--nongnu/packages/version-control.scm18
-rw-r--r--nongnu/packages/video.scm122
-rw-r--r--nongnu/packages/vpn.scm29
-rw-r--r--nongnu/packages/wasm.scm136
-rw-r--r--nongnu/packages/wine.scm21
55 files changed, 3965 insertions, 3856 deletions
diff --git a/nongnu/packages/anydesk.scm b/nongnu/packages/anydesk.scm
index 5ba0c7c..27b6a48 100644
--- a/nongnu/packages/anydesk.scm
+++ b/nongnu/packages/anydesk.scm
@@ -1,21 +1,6 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021 Korytov Pavel <thexcloud@gmail.com>
;;; Copyright © 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages anydesk)
#:use-module (gnu packages compression)
@@ -36,14 +21,14 @@
(define-public anydesk
(package
(name "anydesk")
- (version "6.1.1")
+ (version "6.3.0")
(source (origin
(method url-fetch)
(uri (string-append "https://download.anydesk.com/linux/anydesk-"
version "-amd64.tar.gz"))
(sha256
(base32
- "1ai58fsivb8al1279bayl800qavy0kfj40rjhf87g902ap3p4bhh"))))
+ "0lp4zvbdriwbzfnvblbbpzxsrs0l425rha9qjs9sy6ff6myk7qxi"))))
(build-system binary-build-system)
(arguments
`(#:validate-runpath? #f
diff --git a/nongnu/packages/benchmark.scm b/nongnu/packages/benchmark.scm
index d6a36f9..feb2c7d 100644
--- a/nongnu/packages/benchmark.scm
+++ b/nongnu/packages/benchmark.scm
@@ -1,17 +1,5 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021-2022 Petr Hodina <phodina@protonmail.com>
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
(define-module (nongnu packages benchmark)
#:use-module (guix packages)
diff --git a/nongnu/packages/cad.scm b/nongnu/packages/cad.scm
index c896a5f..a66bef3 100644
--- a/nongnu/packages/cad.scm
+++ b/nongnu/packages/cad.scm
@@ -1,17 +1,5 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021-2022 Petr Hodina <phodina@protonmail.com>
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
(define-module (nongnu packages cad)
#:use-module (guix packages)
@@ -158,7 +146,7 @@
openlibm
pulseaudio
qtbase-5
- qtserialport
+ qtserialport-5
qtmultimedia-5
zlib))
(synopsis "Layout, editing, and control software for your laser cutter")
diff --git a/nongnu/packages/chrome.scm b/nongnu/packages/chrome.scm
index 832b17d..d3bc509 100644
--- a/nongnu/packages/chrome.scm
+++ b/nongnu/packages/chrome.scm
@@ -1,44 +1,30 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2022 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2022, 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2022 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages chrome)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
- #:use-module (gnu packages cups)
- #:use-module (gnu packages fontutils)
- #:use-module (gnu packages databases)
- #:use-module (gnu packages gcc)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
- #:use-module (gnu packages glib)
- #:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
#:use-module (gnu packages linux)
- #:use-module (gnu packages nss)
- #:use-module (gnu packages xdisorg)
- #:use-module (gnu packages xml)
+ #:use-module (gnu packages pciutils)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages wget)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
- #:use-module (nonguix build-system binary)
+ #:use-module (nonguix build-system chromium-binary)
#:use-module (nonguix licenses)
#:use-module (ice-9 string-fun))
@@ -58,43 +44,31 @@
name "/" name "_" version "-1_amd64.deb"))
(sha256
(base32 hash))))
- (build-system binary-build-system)
+ (build-system chromium-binary-build-system)
(arguments
(list
;; almost 300MB, faster to download and build from Google servers
#:substitutable? #f
- #:patchelf-plan
- #~(let ((patchelf-inputs
- '("alsa-lib" "at-spi2-atk" "at-spi2-core" "atk" "cairo" "cups"
- "dbus" "expat" "fontconfig-minimal" "gcc" "gdk-pixbuf" "glib"
- "gtk" "libdrm" "libnotify" "libsecret" "libx11" "libxcb"
- "libxcomposite" "libxcursor" "libxdamage" "libxext" "libxfixes"
- "libxi" "libxkbcommon" "libxkbfile" "libxrandr" "libxrender"
- "libxtst" "mesa" "nspr" "pango" "zlib"))
- (path (string-append "opt/google/" #$appname "/")))
+ #:wrapper-plan
+ #~(let ((path (string-append "opt/google/" #$appname "/")))
(map (lambda (file)
- (cons (string-append path file) (list patchelf-inputs)))
+ (string-append path file))
'("chrome"
"chrome-sandbox"
"chrome_crashpad_handler"
- "nacl_helper"
"libEGL.so"
- "libGLESv2.so")))
+ "libGLESv2.so"
+ "liboptimization_guide_internal.so"
+ "libqt5_shim.so"
+ "libqt6_shim.so"
+ "libvk_swiftshader.so"
+ "libvulkan.so.1"
+ "WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))
#:install-plan
#~'(("opt/" "/share")
("usr/share/" "/share"))
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'unpack-deb
- (lambda* (#:key inputs #:allow-other-keys)
- (invoke "ar" "x" #$source)
- (invoke "rm" "-v" "control.tar.xz"
- "debian-binary"
- (string-append "google-chrome-" #$repo "_"
- #$version
- "-1_amd64.deb"))
- (invoke "tar" "xf" "data.tar.xz")
- (invoke "rm" "-vrf" "data.tar.xz" "etc")))
(add-before 'install 'patch-assets
;; Many thanks to
;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/google-chrome/default.nix
@@ -114,9 +88,24 @@
((old-exe) exe))
(substitute* (string-append usr/share "/menu/google-" #$appname ".menu")
(("/opt") share)
- ((old-exe) exe))
- #t)))
- (add-after 'install 'install-wrapper
+ ((old-exe) exe)))))
+ (add-after 'install 'install-icons
+ (lambda _
+ (define (format-icon-size name)
+ (car
+ (string-split
+ (string-drop-right (string-drop name 13) 4)
+ #\_)))
+ (let ((icons (string-append #$output "/share/icons/hicolor"))
+ (share (string-append #$output "/share/google/" #$appname)))
+ (for-each (lambda (icon)
+ (let* ((icon-name (basename icon))
+ (icon-size (format-icon-size icon-name))
+ (target (string-append icons "/" icon-size "x" icon-size "/apps/google-" #$appname ".png")))
+ (mkdir-p (dirname target))
+ (rename-file icon target)))
+ (find-files share "product_logo_.*\\.png")))))
+ (add-before 'install-wrapper 'install-exe
(lambda _
(let* ((bin (string-append #$output "/bin"))
(exe (string-append bin "/google-" #$appname))
@@ -125,68 +114,28 @@
(mkdir-p bin)
(symlink chrome-target exe)
(wrap-program exe
- `("FONTCONFIG_PATH" ":" prefix
- (,(string-join
- (list
- (string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
- #$output)
- ":")))
- `("LD_LIBRARY_PATH" ":" prefix
- (,(string-join
- (list
- (string-append #$(this-package-input "nss") "/lib/nss")
- (string-append #$(this-package-input "eudev") "/lib")
- (string-append #$(this-package-input "gcc") "/lib")
- (string-append #$(this-package-input "mesa") "/lib")
- (string-append #$(this-package-input "libxkbfile") "/lib")
- (string-append #$(this-package-input "zlib") "/lib")
- (string-append #$(this-package-input "libsecret") "/lib")
- (string-append #$(this-package-input "sqlcipher") "/lib")
- (string-append #$(this-package-input "libnotify") "/lib")
- (string-append #$(this-package-input "libdrm") "/lib")
- (string-append #$(this-package-input "pipewire") "/lib")
- #$output)
- ":")))
'("CHROME_WRAPPER" = (#$appname)))))))))
- (native-inputs (list tar))
(inputs
- (list alsa-lib
- at-spi2-atk
- at-spi2-core
- atk
- cairo
- cups
- dbus
- eudev
- expat
- fontconfig
- `(,gcc "lib")
- glib
- gtk
- libdrm
- libnotify
- librsvg
- libsecret
- libx11
- libxcb
- libxcomposite
- libxcursor
- libxdamage
- libxext
- libxfixes
- libxi
- libxkbcommon
- libxkbfile
- libxrandr
- libxrender
- libxtst
- mesa
- nspr
- nss
- pango
- pipewire-0.3
- sqlcipher
- zlib))
+ (list bzip2
+ curl
+ flac
+ font-liberation
+ gdk-pixbuf
+ harfbuzz
+ libexif
+ libglvnd
+ libpng
+ libva
+ libxscrnsaver
+ opus
+ pciutils
+ pipewire
+ qtbase-5
+ qtbase
+ snappy
+ util-linux
+ xdg-utils
+ wget))
(synopsis "Freeware web browser")
(supported-systems '("x86_64-linux"))
(description "Google Chrome is a cross-platform web browser developed by Google.")
@@ -194,10 +143,10 @@
(license (nonfree "https://www.google.com/intl/en/chrome/terms/")))))
(define-public google-chrome-stable
- (make-google-chrome "stable" "107.0.5304.68" "1x9svz5s8fm2zhnpzjpqckzfp37hjni3nf3pm63rwnvbd06y48ja"))
+ (make-google-chrome "stable" "123.0.6312.86" "1fjpwz5pdzjak7932kxvmp3ba2s5qyvj5b908sndg9l4qv1hkh96"))
(define-public google-chrome-beta
- (make-google-chrome "beta" "108.0.5359.40" "1zd8dbs5w2vdnck91pqiymwa2bnz53jgjbg89cr96y6jwab3i4b0"))
+ (make-google-chrome "beta" "124.0.6367.18" "18gv6s4v6g8nw80rfiamz0xx6bwzn567xvmmn95xx70lhcvz9s34"))
(define-public google-chrome-unstable
- (make-google-chrome "unstable" "109.0.5410.0" "0ljhc5lqdy01apzyj96xzl931d904i37x62257s1h35w0j78mps0"))
+ (make-google-chrome "unstable" "125.0.6368.2" "0cfsq2qh9apbafapxqdz8sb65mm6yqxpcl7kwx9g9yi0sngqcxsz"))
diff --git a/nongnu/packages/chromium.scm b/nongnu/packages/chromium.scm
index 56d0c6e..4467714 100644
--- a/nongnu/packages/chromium.scm
+++ b/nongnu/packages/chromium.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages chromium)
#:use-module ((guix licenses) #:prefix license:)
@@ -41,15 +26,15 @@
#:use-module (srfi srfi-1))
(define-public chromium-embedded-framework
- (let ((git-revision "d0bbcbb")
- (chromium-version "103.0.5060.114")
+ (let ((git-revision "5053a95")
+ (chromium-version "117.0.5938.150")
(arch (match (or (%current-target-system) (%current-system))
("aarch64-linux" "linuxarm64")
("armhf-linux" "linuxarm")
(_ "linux64"))))
(package
(name "chromium-embedded-framework")
- (version "103.0.9")
+ (version "117.2.4")
(source (origin
(method url-fetch)
(uri (string-append
@@ -60,7 +45,7 @@
"_" arch "_minimal.tar.bz2"))
(sha256
(base32
- "143x0jmasl4z16bkxlrbz874chd9x9xpc5qylb9h7j80gfcrzlsi"))))
+ "0vzzwq1k6bv9d209yg3samvfnfwj7s58y9r3p3pd98wxa9iyzf4j"))))
(build-system binary-build-system)
(arguments
`(#:patchelf-plan
diff --git a/nongnu/packages/clojure.scm b/nongnu/packages/clojure.scm
index 0bf8b45..1e9df62 100644
--- a/nongnu/packages/clojure.scm
+++ b/nongnu/packages/clojure.scm
@@ -1,22 +1,8 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
(define-module (nongnu packages clojure)
#:use-module (gnu packages compression)
@@ -26,6 +12,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (nonguix build-system binary)
@@ -35,14 +22,14 @@
(define leiningen-jar
(package
(name "leiningen-jar")
- (version "2.9.10")
+ (version "2.10.0")
(source (origin
(method url-fetch)
- (uri "https://codeberg.org/attachments/895a0a0d-f20d-4580-a277-e06b5eec3b6b")
+ (uri "https://codeberg.org/attachments/43cebda5-a7c2-405b-b641-5143a00051b5")
(file-name "leiningen-standalone.jar")
(sha256
(base32
- "1ja9q8lav83h5qhayjgc39f6yyvk1n5f6gfwznn561xm007m6a52"))))
+ "0d5vmpyp9ddxpj1s5c60fv2f5iimz1chbgfhchlaqxa0sfx9jwnj"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -64,7 +51,7 @@ lets you focus on your code.")
(package
(inherit leiningen-jar)
(name "leiningen")
- (version "2.9.10")
+ (version "2.10.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -73,7 +60,7 @@ lets you focus on your code.")
(file-name (git-file-name name version))
(sha256
(base32
- "1hl62ykq7sckfpgg5l3wpzq5smh6s572xnadr988vpl97l2x1g4y"))))
+ "0xvniav6iy1yrbamvbg8i3dq8issiczv3rbig2yc3nm08d2q0rig"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
@@ -100,7 +87,7 @@ lets you focus on your code.")
(define-public clj-kondo
(package
(name "clj-kondo")
- (version "2022.06.22")
+ (version "2024.03.13")
(source (origin
(method url-fetch/zipbomb)
(uri (string-append
@@ -108,26 +95,87 @@ lets you focus on your code.")
version "/clj-kondo-" version "-linux-amd64.zip"))
(sha256
(base32
- "057h48kf14pdnnyvgmbqkga1bspbr4ag22q2279s14c2c9bcinzz"))))
+ "0qdimdf854wsy19i39j18f01b3dhj4zccslymbkn8j9rm90k91m3"))))
(build-system binary-build-system)
(arguments
- `(#:patchelf-plan
- '(("clj-kondo" ("gcc:lib" "zlib")))
- #:install-plan
- '(("clj-kondo" "/bin/"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chmod
- (lambda _
- (chmod "clj-kondo" #o755))))))
+ (list #:patchelf-plan `'(("clj-kondo" ("gcc" "zlib")))
+ #:install-plan `'(("./clj-kondo" "/bin/"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'chmod
+ (lambda _
+ (chmod "clj-kondo" #o755))))))
(native-inputs
- `(("unzip" ,unzip)))
+ (list unzip))
(inputs
- `(("gcc:lib" ,gcc "lib")
- ("zlib" ,zlib)))
+ (list `(,gcc "lib")
+ zlib))
(supported-systems '("x86_64-linux"))
(home-page "https://github.com/clj-kondo/clj-kondo")
(synopsis "Linter for Clojure code")
(description "Clj-kondo performs static analysis on Clojure, ClojureScript
and EDN, without the need of a running REPL.")
(license license:epl1.0)))
+
+(define-public clojure-lsp
+ (package
+ (name "clojure-lsp")
+ (version "2024.03.13-13.11.00")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://github.com/clojure-lsp/clojure-lsp"
+ "/releases/download/" version
+ "/clojure-lsp-native-static-linux-amd64.zip"))
+ (sha256
+ (base32
+ "1l6w55aragyf8rzy087iqw97xnpih5syjwhf0jwbgrqps2k44ms5"))))
+ (build-system binary-build-system)
+ (arguments
+ `(#:install-plan
+ '(("./clojure-lsp" "/bin/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chmod
+ (lambda _
+ (chmod "./clojure-lsp" #o755))))))
+ (inputs (list `(,gcc "lib") zlib))
+ (supported-systems '("x86_64-linux"))
+ (home-page "https://github.com/clojure-lsp/clojure-lsp")
+ (synopsis "Clojure & ClojureScript Language Server (LSP) implementation")
+ (description "This package provides a Language Server for Clojure and ClojureScript
+languages. The goal of this project is to bring great editing tools for
+Clojure/Clojurescript to all editors and programatically via its CLI and API.
+It aims to work alongside you to help you navigate, identify and fix errors,
+perform refactors and more.")
+ (license license:expat)))
+
+(define-public babashka
+ (package
+ (name "babashka")
+ (version "1.3.189")
+ (source (origin
+ (method url-fetch/tarbomb)
+ (uri (string-append "https://github.com/babashka/babashka"
+ "/releases/download/v" version "/babashka-"
+ version "-linux-amd64.tar.gz"))
+ (sha256
+ (base32
+ "1gzra3y5iljjqi4rj1qxr3yniqla3qnhv881gkzrp788fwsvlmwv"))))
+ (build-system binary-build-system)
+ (arguments
+ `(#:patchelf-plan
+ '(("bb" ("gcc" "zlib")))
+ #:install-plan
+ '(("./bb" "/bin/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chmod
+ (lambda _
+ (chmod "bb" #o755))))))
+ (inputs (list `(,gcc "lib") zlib))
+ (supported-systems '("x86_64-linux"))
+ (home-page "https://github.com/babashka/babashka")
+ (synopsis "Native, fast starting Clojure interpreter for scripting")
+ (description "Babashka is a native Clojure interpreter for scripting with
+fast startup. Its main goal is to leverage Clojure in places where you would
+be using bash otherwise.")
+ (license license:epl1.0)))
diff --git a/nongnu/packages/compression.scm b/nongnu/packages/compression.scm
index 60b1352..bb0ae88 100644
--- a/nongnu/packages/compression.scm
+++ b/nongnu/packages/compression.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages compression)
#:use-module (guix packages)
@@ -25,14 +10,14 @@
(define-public unrar
(package
(name "unrar")
- (version "6.0.2")
+ (version "6.2.2")
(source (origin
(method url-fetch)
(uri (string-append "https://www.rarlab.com/rar/unrarsrc-"
version ".tar.gz"))
(sha256
(base32
- "1lzdsfb4d00silyk04lkvaklmxaiyqksyxx4h1krg77q6f1iigw1"))))
+ "1mbw20lh300r541dz4m84rvq7b542mnb70yc29afrjj6waknqza7"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; No tests.
diff --git a/nongnu/packages/coq.scm b/nongnu/packages/coq.scm
index d86fffb..6fcf7a7 100644
--- a/nongnu/packages/coq.scm
+++ b/nongnu/packages/coq.scm
@@ -1,22 +1,7 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Isaac Young <isyoung@pm.me>
;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages coq)
#:use-module (ice-9 match)
@@ -30,7 +15,7 @@
(define-public compcert
(package
(name "compcert")
- (version "3.11")
+ (version "3.13.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -39,7 +24,7 @@
(file-name (git-file-name name version))
(sha256
(base32
- "183b1fn7vhb9ykxax11x0bb2q6z5jnd874nzlxqnnm89j3ysr134"))))
+ "0yvj9g144p26k7674vcai12sh3jahs64ny9pana9zla16nxxpmcm"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -47,7 +32,7 @@
(add-before 'configure 'allow-newer-coq-version
(lambda _
(substitute* "configure"
- (("8.14.0") "8.16.0"))))
+ (("8.15.2") "8.17.1"))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((system ,(match (or (%current-target-system) (%current-system))
diff --git a/nongnu/packages/databases.scm b/nongnu/packages/databases.scm
new file mode 100644
index 0000000..96edcd9
--- /dev/null
+++ b/nongnu/packages/databases.scm
@@ -0,0 +1,45 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
+
+(define-module (nongnu packages databases)
+ #:use-module (guix build-system copy)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (gnu packages compression)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public datomic-cli-tools
+ (package
+ (name "datomic-cli-tools")
+ (version "1.0.91")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://datomic-releases-1fc2183a.s3.amazonaws.com"
+ "/tools/datomic-cli/datomic-cli-" version ".zip"))
+ (sha256
+ (base32
+ "1xicmbsig8f1p5r9rxkhndi0f9l9w421zf49rbx44yc6v0db523b"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("." "bin" #:include-regexp ("^\\./datomic"))
+ ("README.txt" "share/doc/datomic/"))
+ #:phases
+ ,#~(modify-phases %standard-phases
+ (add-after 'install 'make-scripts-executable
+ (lambda _
+ (for-each (lambda (f) (chmod f #o555))
+ (find-files (string-append #$output "/bin"))))))))
+ (native-inputs
+ (list unzip))
+ (home-page "https://docs.datomic.com/cloud/index.html")
+ (synopsis "Command-line tools for Datomic Cloud")
+ (description "View and Manage analytics, logs, and access control gateways
+for a Datomic Cloud instance on AWS.")
+ (license license:asl2.0)
+ (properties
+ `((release-monitoring-url
+ . "https://docs.datomic.com/cloud/releases.html")
+ (upstream-name . "datomic-cli")))))
diff --git a/nongnu/packages/dotnet.scm b/nongnu/packages/dotnet.scm
index 6f77ea8..a45a1ca 100644
--- a/nongnu/packages/dotnet.scm
+++ b/nongnu/packages/dotnet.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021 Jelle Licht <jlicht@fsfe.org>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages dotnet)
#:use-module (ice-9 match)
diff --git a/nongnu/packages/dyalog.scm b/nongnu/packages/dyalog.scm
index e3f6b1c..7408b68 100644
--- a/nongnu/packages/dyalog.scm
+++ b/nongnu/packages/dyalog.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 B. Wilson <x@wilsonb.com>
-;;;
-;;; 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
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages dyalog)
#:use-module (gnu packages autotools)
diff --git a/nongnu/packages/editors.scm b/nongnu/packages/editors.scm
new file mode 100644
index 0000000..114fe85
--- /dev/null
+++ b/nongnu/packages/editors.scm
@@ -0,0 +1,104 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2023, 2024 Giacomo Leidi <goodoldpaul@autistici.org>
+
+(define-module (nongnu packages editors)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages gtk)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses) :prefix license:)
+ #:use-module (nonguix build-system chromium-binary)
+ #:use-module (ice-9 match))
+
+(define-public vscodium
+ (package
+ (name "vscodium")
+ (version "1.88.1.24104")
+ (source
+ (let ((arch (match (or (%current-target-system) (%current-system))
+ ("aarch64-linux" "arm64")
+ ("armhf-linux" "armhf")
+ (_ "x64")))
+ (hash (match (or (%current-target-system) (%current-system))
+ ("aarch64-linux"
+ "0412222l9r81f3aa3zlzrg42hzslvvck5kds7zrmpssjrd41jxfh")
+ ("armhf-linux"
+ "1sblaigrxscx4l1kln1zxzm5da5lr50y1k6qb4igq6wxbdx55iay")
+ (_
+ "1n3gb12asid2qwwzf9fj974ws9n7has9l23ni8jscx9cp63l5rbl"))))
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "https://github.com/VSCodium/vscodium/releases/download/" version
+ "/VSCodium-linux-" arch "-" version ".tar.gz"))
+ (sha256
+ (base32 hash)))))
+ (build-system chromium-binary-build-system)
+ (arguments
+ (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
+ #:substitutable? #f
+ #:wrapper-plan
+ #~'("opt/vscodium/codium")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (mkdir-p "opt/vscodium")
+ (invoke "tar" "-xvf" #$source "-C" "opt/vscodium")))
+ (add-before 'install-wrapper 'install-entrypoint
+ (lambda _
+ (let* ((bin (string-append #$output "/bin")))
+ (delete-file (string-append #$output "/environment-variables"))
+ (mkdir-p bin)
+ (symlink (string-append #$output "/opt/vscodium/codium")
+ (string-append bin "/codium")))))
+ (add-after 'install-entrypoint 'install-resources
+ (lambda _
+ (let* ((icons
+ (string-append #$output
+ "/share/icons/hicolor/512x512/apps"))
+ (icon.png
+ (string-append #$output
+ "/opt/vscodium/resources/app/"
+ "resources/linux/code.png"))
+ (apps (string-append #$output "/share/applications")))
+ (mkdir-p icons)
+ (symlink icon.png
+ (string-append icons "/code.png"))
+ (mkdir-p apps)
+ (make-desktop-entry-file
+ (string-append apps "/" #$name ".desktop")
+ #:name "VSCodium"
+ #:generic-name "Text Editor"
+ #:exec (string-append #$output "/bin/codium")
+ #:icon "code"
+ #:type "Application"
+ #:actions '("new-empty-window")
+ #:keywords '("vscode")
+ #:categories '("TextEditor" "Development"
+ "IDE")
+ #:startup-notify #t
+ #:startup-w-m-class "Code"
+ #:comment
+ '(("en" "Code Editing. Redefined.")
+ (#f "Code Editing. Redefined."))))))
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
+ (lambda _
+ (wrap-program (string-append #$output "/bin/codium")
+ `("LD_LIBRARY_PATH" ":"
+ prefix
+ (,(string-join
+ (list (string-append #$output "/opt/vscodium"))
+ ":")))))))))
+ (supported-systems '("armhf-linux" "aarch64-linux" "x86_64-linux"))
+ (native-inputs
+ (list tar))
+ (inputs
+ (list gdk-pixbuf))
+ (home-page "https://vscodium.com/")
+ (synopsis "Community-driven, freely-licensed binary distribution of VSCode")
+ (description "VSCodium is a community-driven, freely-licensed binary
+distribution of Microsoft’s editor VSCode.")
+ (license license:expat)))
diff --git a/nongnu/packages/electron.scm b/nongnu/packages/electron.scm
new file mode 100644
index 0000000..a4a7b67
--- /dev/null
+++ b/nongnu/packages/electron.scm
@@ -0,0 +1,104 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2023 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2024 Andre A. Gomes <andremegafone@gmail.com>
+;;; Copyright © 2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+
+(define-module (nongnu packages electron)
+ #:use-module (nonguix build-system chromium-binary)
+ #:use-module ((nonguix licenses) :prefix license:)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (ice-9 match)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages video))
+
+(define (electron-source version hash)
+ (origin
+ (method url-fetch/zipbomb)
+ (uri
+ (string-append
+ "https://github.com/electron/electron/releases/download/v"
+ version "/electron-v" version "-"
+ (match (or (%current-system) (%current-target-system))
+ ("x86_64-linux" "linux-x64")
+ ("i686-linux" "linux-ia32")
+ ("aarch64-linux" "linux-arm64")
+ ("armhf-linux" "linux-armv7l"))
+ ".zip"))
+ (sha256 (base32 hash))))
+
+(define-public electron-27
+ (package
+ (name "electron")
+ (version "27.3.6")
+ (source (electron-source version
+ "12hjn1bfk8c25f54kk561mkjl7hsk8b16rj7a7gczswjdpx6fpi0"))
+ (build-system chromium-binary-build-system)
+ (arguments
+ `(#:wrapper-plan
+ `("electron"
+ "libffmpeg.so"
+ "libGLESv2.so"
+ "libEGL.so")
+ #:install-plan
+ `(("." "share/electron/" #:include
+ ("electron"
+ "chrome-sandbox"
+ "chrome_100_percent.pak"
+ "chrome_200_percent.pak"
+ "chrome_crashpad_handler"
+ "icudtl.dat"
+ "resources.pak"
+ "v8_context_snapshot.bin"
+ "version"
+ "libffmpeg.so"
+ ;; electron seems to force-load these from its directory.
+ "libEGL.so"
+ "libGLESv2.so"))
+ ("resources" "share/electron/")
+ ("locales" "share/electron/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install-wrapper 'wrap-where-patchelf-does-not-work
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/share/electron/electron"))
+ (wrapper (string-append out "/bin/electron")))
+ (mkdir-p (dirname wrapper))
+ (make-wrapper wrapper bin
+ `("LD_LIBRARY_PATH" ":"
+ prefix
+ (,(string-join
+ (list
+ (string-append out "/share/electron"))
+ ":")))))
+ #t)))))
+ (native-inputs `(("unzip" ,unzip)))
+ (inputs `(("gdk-pixbuf" ,gdk-pixbuf)
+ ("ffmpeg" ,ffmpeg)))
+ (home-page "https://www.electronjs.org/")
+ (synopsis "Cross platform desktop application shell")
+ (description "The Electron framework lets you write cross-platform desktop
+applications using JavaScript, HTML and CSS. It is based on Node.js and
+Chromium and is used by the Atom editor and many other apps.")
+ (license (license:nonfree
+ (string-append "https://github.com/electron/electron/blob/v"
+ version "/LICENSE")))))
+
+(define-public electron electron-27)
+
+(define-public electron-28
+ (package
+ (inherit electron-27)
+ (version "28.2.7")
+ (source (electron-source version
+ "0sw8nn1jr9x0p4s2g5yp5lrpy8mzq0sjd099x7axbg6cm1c80iff"))))
+(define-public electron-29
+ (package
+ (inherit electron-27)
+ (version "29.1.4")
+ (source (electron-source version
+ "1d96nhx9j9mzc3q3ald1imqdxdgq9by1qm4q703sjy3knq1p38w3"))))
diff --git a/nongnu/packages/emacs.scm b/nongnu/packages/emacs.scm
index dad2f94..ee1616c 100644
--- a/nongnu/packages/emacs.scm
+++ b/nongnu/packages/emacs.scm
@@ -1,23 +1,8 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2022 Fredrik Salomonsson <plattfot@posteo.net>
;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages emacs)
#:use-module ((guix licenses) #:prefix license:)
diff --git a/nongnu/packages/emulators.scm b/nongnu/packages/emulators.scm
index 0ec22c0..5dade3b 100644
--- a/nongnu/packages/emulators.scm
+++ b/nongnu/packages/emulators.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages emulators)
#:use-module (gnu packages backup)
diff --git a/nongnu/packages/engineering.scm b/nongnu/packages/engineering.scm
new file mode 100644
index 0000000..b05f6c0
--- /dev/null
+++ b/nongnu/packages/engineering.scm
@@ -0,0 +1,73 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2022 Demis Balbach <db@minikn.xyz>
+;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+
+(define-module (nongnu packages engineering)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages xorg)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module ((guix licenses) :prefix license:)
+ #:use-module (nonguix build-system chromium-binary)
+ #:use-module ((nonguix licenses) :prefix license:)
+ #:use-module (ice-9 match))
+
+(define-public lycheeslicer
+ (package
+ (name "lycheeslicer")
+ (version "4.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "https://mango-lychee.nyc3.cdn.digitaloceanspaces.com/LycheeSlicer-" version ".deb"))
+ (sha256
+ (base32 "1rv3f8d1sb5irn4y8hjzk2m7c9irw71ls8p1mqambxg79q9ffj9m"))))
+ (supported-systems '("x86_64-linux"))
+ (build-system chromium-binary-build-system)
+ (arguments
+ (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
+ #:wrapper-plan
+ #~'("lib/LycheeSlicer/lycheeslicer")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'binary-unpack 'setup-cwd
+ (lambda _
+ ;; Use the more standard lib directory for everything.
+ (rename-file "opt/" "lib")
+ (mkdir-p "share")
+ (copy-recursively "usr/share" "share")
+ ;; Remove unneeded files.
+ (delete-file-recursively "usr")))
+ (add-after 'setup-cwd 'fix-desktop-file
+ (lambda _
+ ;; Fix the .desktop file binary location.
+ (substitute* '("share/applications/lycheeslicer.desktop")
+ (("/opt/LycheeSlicer")
+ (string-append #$output "/lib/LycheeSlicer")))))
+ (add-before 'install-wrapper 'symlink-binary-file
+ (lambda _
+ (mkdir-p (string-append #$output "/bin"))
+ (symlink (string-append #$output "/lib/LycheeSlicer/lycheeslicer")
+ (string-append #$output "/bin/lycheeslicer"))))
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
+ (lambda _
+ (wrap-program (string-append #$output "/lib/LycheeSlicer/lycheeslicer")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-join
+ (list
+ (string-append #$output "/lib/LycheeSlicer"))
+ ":")))))))))
+ (inputs
+ (list libxscrnsaver))
+ (home-page "https://mango3d.io")
+ (synopsis "Slicer for resin 3d printers of different manufacturers")
+ (description "A user-friendly slicing software for resin 3d printers. It
+supports printers and resins of different manufacturers alongside
+community-created profiles as well. It offers a paid- and free version with a
+reduced feature set.")
+ (license (license:nonfree "https://mango3d.io/terms-and-conditions"))))
diff --git a/nongnu/packages/firmware.scm b/nongnu/packages/firmware.scm
index 4b7784e..22fd072 100644
--- a/nongnu/packages/firmware.scm
+++ b/nongnu/packages/firmware.scm
@@ -1,25 +1,24 @@
-;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2022-2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
-
-;;; 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 <https://www.gnu.org/licenses/>.
+;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
+;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il>
(define-module (nongnu packages firmware)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages cpio)
#:use-module (gnu packages efi)
#:use-module (gnu packages firmware)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix download)
#:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix guix-license:)
#:use-module (guix packages)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (nonguix licenses)
+ #:use-module (nongnu packages compression))
;; fwupd with LVFS nonfree repositories enabled
(define-public fwupd-nonfree
@@ -41,3 +40,270 @@
(string-append "--libexecdir="
#$output "/libexec")
"-Dsupported_build=true"))))))
+
+(define-public ov5640-firmware
+ (let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
+ (revision "1"))
+ (package
+ (name "ov5640-firmware")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://megous.com/git/linux-firmware")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:substitutable? #f
+ #:install-plan '(("ov5640_af.bin" "lib/firmware/"))))
+ (synopsis "Firmware for the OV5640 sensor in the PinePhone")
+ (description "This package provides binary firmware for the 0V5640 sensor
+in the PinePhone.")
+ (home-page "https://megous.com/git/linux-firmware")
+ (license (nonfree (string-append "unknown"))))))
+
+(define-public rtl8723bt-firmware
+ (let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
+ (revision "1"))
+ (package
+ (name "rtl8723bt-firmware")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://megous.com/git/linux-firmware")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:substitutable? #f
+ #:install-plan '(("rtl_bt/rtl8723cs_xx_fw.bin" "lib/firmware/"))))
+ (synopsis "Firmware for the RTL8723BS/CS")
+ (description "This package provides binary firmware for the RTL8723BS/CS
+WiFi/Bluetooth chip in the PinePhone.")
+ (home-page "https://megous.com/git/linux-firmware")
+ (license (nonfree (string-append "unknown"))))))
+
+(define-public anx7688-firmware
+ (let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
+ (revision "1"))
+ (package
+ (name "anx7688-firmware")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://megous.com/git/linux-firmware")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:substitutable? #f
+ #:install-plan '(("anx7688-fw.bin" "lib/firmware/"))))
+ (synopsis "Firmware for the ANX7688")
+ (description "This package provides binary firmware for the ANX7688
+HDMI to USB Type-C Bridge in the PinePhone.")
+ (home-page "https://megous.com/git/linux-firmware")
+ (license (nonfree (string-append "unknown"))))))
+
+(define-public ap6256-firmware
+ (let ((commit "056d5f6776e515f90bbbbead1be06857aaef17d0")
+ (revision "1"))
+ (package
+ (name "ap6256-firmware")
+ (version (git-version "2020.02" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://gitlab.manjaro.org/manjaro-arm/packages/community/ap6256-firmware")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1s52rpikw0gysph5lq7vr6b3nsxczg4ikgil9zdgmcknjnxk9kbv"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:substitutable? #f
+ #:install-plan '(;;Bluetooth firmware
+ ("BCM4345C5.hcd" "/lib/firmware/brcm/")
+ ;; WiFi firmware
+ ("fw_bcm43456c5_ag.bin" "/lib/firmware/brcm/")
+ ("fw_bcm43456c5_ag.bin"
+ "/lib/firmware/brcm/brcmfmac43456-sdio.bin")
+ ("brcmfmac43456-sdio.clm_blob"
+ "/lib/firmware/brcm/")
+ ("brcmfmac43456-sdio.AP6256.txt"
+ "/lib/firmware/brcm/")
+ ("brcmfmac43456-sdio.AP6256.txt"
+ "/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt"))))
+ (synopsis "Firmware for the wifi/bt module AP6256")
+ (description
+ "This package provides Firmware for the wifi/bt module AP6256,
+found in Pinebook Pro.")
+ (home-page "https://gitlab.manjaro.org/manjaro-arm/packages/community/ap6256-firmware")
+ (license (nonfree (string-append "unknown"))))))
+
+(define-public bluez-firmware
+ (package
+ (name "bluez-firmware")
+ (version "1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://bluez.sf.net/download/" name "-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1v4yv6gvlvvwslpb0lj1nsp4r900zxpvxz2ab0sbvimbiw8rw4dn"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'install-license-files 'relocate-copyright
+ (lambda* _
+ (install-file (string-append #$output
+ "/lib/firmware/BCM-LEGAL.txt")
+ (string-append #$output
+ "/share/doc/bluez-firmware-"
+ #$(package-version bluez-firmware)
+ "/BCM-LEGAL.txt")))))))
+ (synopsis "Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips")
+ (description "This package provides firmware for Broadcom BCM203x
+and STLC2300 Bluetooth chips.")
+ (home-page "https://github.com/RPi-Distro/bluez-firmware")
+ (license (list guix-license:gpl2+
+ (nonfree
+ "file:///share/doc/bluez-firmware-1.2/BCM-LEGAL.txt")))))
+
+(define dump-file-chunk
+ #~(lambda (in out count start)
+ (use-modules (rnrs io ports))
+ (call-with-output-file out
+ (lambda (out-port)
+ (put-bytevector
+ out-port
+ (call-with-input-file in
+ (lambda (in-port)
+ (seek in-port start SEEK_SET)
+ (get-bytevector-n in-port count))))))))
+
+(define-public facetimehd-firmware
+ (package
+ (name "facetimehd-firmware")
+ (version "1.43")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://updates.cdn-apple.com/2019/cert"
+ "/041-88431-20191011-e7ee7d98-2878-4cd9-bc0a-d98b3a1e24b1"
+ "/OSXUpd10.11.5.dmg"))
+ (sha256
+ (base32
+ "009kfk1nrrialgp69c5smzgbmd5xpvk35xmqr2fzb15h6pp33ka6"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan #~'(("firmware.bin" "/lib/firmware/facetimehd/"))
+ #:phases
+ (let ((dmg-subset-size 207733123)
+ (dmg-subset-offset 204909802)
+ (firmware-size 603715)
+ (firmware-offset 81920))
+ #~(modify-phases %standard-phases
+ (add-before 'install 'extract
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((firmware-in
+ (string-append
+ "System/Library/Extensions/AppleCameraInterface.kext"
+ "/Contents/MacOS/AppleCameraInterface")))
+ (let ((dmg-subset "dmg-subset"))
+ (#$dump-file-chunk #$source
+ dmg-subset
+ #$dmg-subset-size
+ #$dmg-subset-offset)
+ (system
+ (string-join
+ (list (search-input-file inputs "/bin/xz")
+ "--decompress"
+ "--stdout"
+ dmg-subset
+ "|"
+ (search-input-file inputs "/bin/cpio")
+ "--format=odc"
+ "--extract"
+ "--make-directories"
+ (string-append "./" firmware-in)))))
+ (let ((firmware-out "firmware.bin.gz"))
+ (#$dump-file-chunk firmware-in
+ firmware-out
+ #$firmware-size
+ #$firmware-offset)
+ (invoke
+ (search-input-file inputs "/bin/gzip")
+ "--decompress"
+ (string-append firmware-out))))))))))
+ (native-inputs
+ (list cpio gzip xz))
+ (synopsis "Firmware for the FacetimeHD (Broadcom 1570) PCIe webcam")
+ (description "Firmware for the FacetimeHD webcam. See
+@uref{https://github.com/patjak/facetimehd/wiki/Get-Started#firmware-extraction,
+patjak's facetimehd wiki} for more information.")
+ (home-page "https://support.apple.com")
+ (license (nonfree "https://www.apple.com/legal"))
+ (supported-systems '("i686-linux" "x86_64-linux"))))
+
+(define-public facetimehd-calibration
+ (package
+ (name "facetimehd-calibration")
+ (version "5.1.5769")
+ (source
+ (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append
+ "https://download.info.apple.com/Mac_OS_X"
+ "/031-30890-20150812-ea191174-4130-11e5-a125-930911ba098f"
+ "/bootcamp" version".zip"))
+ (sha256
+ (base32
+ "07jbh6d0djcvcgj5hhkkw7d6mvcl228yb8rp0a2qqw20ya72rpjf"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("." "/lib/firmware/facetimehd/"
+ #:include-regexp ("[0-9]{4}_01XX\\.dat")))
+ #:phases
+ (let ((calibration-files
+ '(("1771_01XX.dat" 19040 1644880)
+ ("1871_01XX.dat" 19040 1606800)
+ ("1874_01XX.dat" 19040 1625840)
+ ("9112_01XX.dat" 33060 1663920))))
+ #~(modify-phases %standard-phases
+ (add-before 'install 'extract
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke (search-input-file inputs "/bin/unrar")
+ "x"
+ "BootCamp/Drivers/Apple/AppleCamera64.exe")
+ (for-each (lambda (spec)
+ (apply #$dump-file-chunk "AppleCamera.sys" spec))
+ '#$calibration-files)))))))
+ (native-inputs
+ (list unrar unzip))
+ (synopsis "Calibration files for the FacetimeHD (Broadcom 1570) PCIe webcam")
+ (description "Calibration files for the FacetimeHD webcam. These are
+optional but make the colors look much better. See
+@uref{https://github.com/patjak/facetimehd/wiki/Extracting-the-sensor-calibration-files,
+patjak's facetimehd wiki} for more information.")
+ (home-page "https://support.apple.com/kb/DL1837")
+ (license (nonfree "https://www.apple.com/legal"))
+ (supported-systems '("i686-linux" "x86_64-linux"))))
diff --git a/nongnu/packages/fonts.scm b/nongnu/packages/fonts.scm
index 7120fef..7b6eb75 100644
--- a/nongnu/packages/fonts.scm
+++ b/nongnu/packages/fonts.scm
@@ -1,26 +1,14 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021 Korytov Pavel <thexcloud@gmail.com>
;;; Copyright © 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
(define-module (nongnu packages fonts)
#:use-module (ice-9 string-fun)
#:use-module (gnu packages compression)
+ #:use-module (guix deprecation)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix build-system font)
#:use-module (guix build-system copy)
@@ -90,13 +78,16 @@ font from the pack of Microsoft core fonts for the web."))
#:font-name "Comic Sans MS"
#:hash "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw"))
-(define-public font-microsoft-couirer-new
+(define-public font-microsoft-courier-new
(mscorefont
"courie32"
#:version "2.82"
#:font-name "Courier New"
#:hash "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv"))
+(define-public font-microsoft-couirer-new
+ (deprecated-package "font-microsoft-couirer-new" font-microsoft-courier-new))
+
(define-public font-microsoft-georgia
(mscorefont
"georgi32"
@@ -174,3 +165,163 @@ Included fonts:
("font-microsoft-trebuchet-ms" ,font-microsoft-trebuchet-ms)
("font-microsoft-verdana" ,font-microsoft-verdana)
("font-microsoft-webdings" ,font-microsoft-webdings)))))
+
+(define* (apple-font #:key
+ font-name
+ archive-timestamp
+ version
+ file
+ hash
+ synopsis
+ description)
+ (package
+ (name (string-append "font-apple-"
+ (string-replace-substring
+ (string-downcase font-name)
+ " " "-")))
+ (version version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ ;; Download link is unversioned, use a stable snapshot.
+ "https://web.archive.org/web/" archive-timestamp "/"
+ "https://devimages-cdn.apple.com/design/resources/download/"
+ file ".dmg"))
+ (sha256
+ (base32 hash))))
+ (build-system font-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source inputs #:allow-other-keys)
+ (let ((7z-exe (search-input-file inputs "/bin/7z")))
+ (invoke 7z-exe "x" source)
+ (invoke 7z-exe "x" (car (find-files "." "\\.pkg$")))
+ (invoke 7z-exe "x" "Payload~")))))))
+ (native-inputs (list p7zip))
+ (home-page "https://developer.apple.com/fonts")
+ (synopsis (string-append font-name " typeface by Apple."))
+ (description description)
+ (license
+ (nonfree
+ "https://www.apple.com"
+ "Specific license information is embedded in the font files."))))
+
+(define-public font-apple-sf-pro
+ (apple-font
+ #:font-name "SF Pro"
+ #:archive-timestamp "20230710073336"
+ #:file "SF-Pro"
+ #:version "19.0d6e1"
+ #:hash "19qa6fs6x5614sqw9a6idlizzsssw8256crz1ps2p2n6gwp2fvaq"
+ #:description "This neutral, flexible, sans-serif typeface is the system
+font for iOS, iPad OS, macOS and tvOS. SF Pro features nine weights, variable
+optical sizes for optimal legibility, four widths, and includes a rounded
+variant. SF Pro supports over 150 languages across Latin, Greek, and Cyrillic
+scripts."))
+
+(define-public font-apple-sf-compact
+ (apple-font
+ #:font-name "SF Compact"
+ #:archive-timestamp "20230710073418"
+ #:file "SF-Compact"
+ #:version "19.0d6e1"
+ #:hash "02127drlqvwscq6vaphmvsp85cn8j4zfhi0kb9a3fzc0z8b95hdq"
+ #:description "Sharing many features with SF Pro, SF Compact features an
+efficient, compact design that is optimized for small sizes and narrow columns.
+SF Compact is the system font for watchOS and includes a rounded variant."))
+
+(define-public font-apple-sf-mono
+ (apple-font
+ #:font-name "SF Mono"
+ #:archive-timestamp "20230710073457"
+ #:file "SF-Mono"
+ #:version "19.0d6e1"
+ #:hash "0vjdpl3xyxl2rmfrnjsxpxdizpdr4canqa1nm63s5d3djs01iad6"
+ #:description "This monospaced variant of San Francisco enables alignment
+between rows and columns of text, and is used in coding environments like Xcode.
+SF Mono features six weights and supports Latin, Greek, and Cyrillic scripts."))
+
+(define-public font-apple-sf-arabic
+ (apple-font
+ #:font-name "SF Arabic"
+ #:archive-timestamp "20230710073501"
+ #:file "SF-Arabic"
+ #:version "19.0d6e1"
+ #:hash "0phl3wi0lq7djcg8nqg1ml1f73bsfjzmvd2n8hkl6dbprmw614jp"
+ #:description "A contemporary interpretation of the Naskh style with a
+rational and flexible design, this extension of San Francisco is the Arabic
+system font on Apple platforms. Like San Francisco, SF Arabic features nine
+weights, variable optical sizes that automatically adjust spacing and contrast
+based on the point size, and includes a rounded variant."))
+
+(define-public font-apple-new-york
+ (apple-font
+ #:font-name "New York"
+ #:archive-timestamp "20230710073506"
+ #:file "NY"
+ #:version "17.0d5e1"
+ #:hash "1hgxyizpgam7y1xh36fsypd3a1nn417wdnnfk1zahq9vhxrrds2w"
+ #:description "A companion to San Francisco, this serif typeface is based on
+essential aspects of historical type styles. New York features six weights,
+supports Latin, Greek and Cyrillic scripts, and features variable optical sizes
+allowing it to perform as a traditional reading face at small sizes and a
+graphic display face at larger sizes."))
+
+;; At the time of this writing, `sf-symbols' is just `sf-pro' and `sf-compact'
+;; together plus one extra file, SFSymbolsFallback.otf. This package is
+;; probably of limited use on non-macOS but we'll include it for completeness
+;; and in case the situation changes in the future.
+(define-public font-apple-sf-symbols
+ (apple-font
+ #:font-name "SF Symbols"
+ #:archive-timestamp "20230710073513"
+ #:file "SF-Symbols-5"
+ #:version "5"
+ #:hash "1bwlq1nf75bv0x36qdk371r2pd5slf3jlv50wgsl0kpj1dds22sf"
+ #:description "With over 5,000 symbols, SF Symbols is a library of
+iconography designed to integrate seamlessly with San Francisco, the system
+font for Apple platforms. Symbols come in nine weights and three scales, and
+automatically align with text labels."))
+
+(define-public font-apple-color-emoji
+ (package
+ (name "font-apple-color-emoji")
+ (version "18.0d4e1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/pharcosyle/apple-fonts"
+ "/releases/download"
+ "/Apple-Color-Emoji-" version "/Apple.Color.Emoji.ttc"))
+ (sha256
+ (base32 "06i1ady7b2g1i2hl3f8yxn64g2i82c2ni9vdw25gpdqdj28vyqw3"))))
+ (build-system font-build-system)
+ (home-page "https://www.apple.com")
+ (synopsis "Apple Color Emoji typeface by Apple.")
+ (description "Color and black-and-white Apple emoji fonts.")
+ (license (nonfree "https://www.apple.com"))))
+
+(define-public font-apple-symbols
+ (package
+ (name "font-apple-symbols")
+ (version "17.0d1e2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/pharcosyle/apple-fonts"
+ "/releases/download"
+ "/Apple-Symbols-" version "/Apple.Symbols.ttf"))
+ (sha256
+ (base32 "14ivhsiszmy1ql69kpr1f33n07qgpaj7w43w2p5qnmlwcrvs3ccr"))))
+ (build-system font-build-system)
+ (home-page "https://www.apple.com")
+ (synopsis "Apple Symbols typeface by Apple.")
+ (description "An Apple system font intended to provide coverage for
+characters defined as symbols in the Unicode Standard.")
+ (license (nonfree "https://www.apple.com"))))
diff --git a/nongnu/packages/game-client.scm b/nongnu/packages/game-client.scm
new file mode 100644
index 0000000..d9843ee
--- /dev/null
+++ b/nongnu/packages/game-client.scm
@@ -0,0 +1,368 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2020 pkill-9
+;;; Copyright © 2020, 2021 ison <ison@airmail.cc>
+;;; Copyright © 2021 pineapples
+;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+;;; Copyright © 2021 Kozo <kozodev@runbox.com>
+;;; Copyright © 2021, 2022, 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2023 Elijah Malaby
+;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+
+(define-module (nongnu packages game-client)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module ((nonguix licenses) #:prefix license:)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages certs)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages elf)
+ #:use-module (gnu packages file)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphics)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages libbsd)
+ #:use-module (gnu packages libusb)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages logging)
+ #:use-module (gnu packages lsof)
+ #:use-module (nongnu packages nvidia)
+ #:use-module (gnu packages pciutils)
+ #:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages toolkits)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages xorg)
+ #:use-module (nonguix build-system chromium-binary)
+ #:use-module (nonguix multiarch-container)
+ #:use-module (nonguix utils))
+
+(define heroic-client
+ (package
+ (name "heroic-client")
+ (version "2.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/Heroic-Games-Launcher/"
+ "HeroicGamesLauncher/releases/download/v"
+ version "/heroic_" version "_amd64.deb"))
+ (sha256
+ (base32
+ "0ikb9r72n7xknns81mibipfwqh0r9hqnm5a3k4xsk8my1gajc60c"))))
+ (build-system chromium-binary-build-system)
+ (arguments
+ (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
+ #:wrapper-plan
+ #~'("lib/Heroic/heroic"
+ "lib/Heroic/libEGL.so"
+ "lib/Heroic/libGLESv2.so"
+ "lib/Heroic/libvk_swiftshader.so"
+ "lib/Heroic/libvulkan.so.1"
+ "lib/Heroic/chrome-sandbox"
+ "lib/Heroic/chrome_crashpad_handler"
+ "lib/Heroic/libffmpeg.so")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'binary-unpack 'setup-cwd
+ (lambda _
+ (copy-recursively "usr/" ".")
+ ;; Use the more standard lib directory for everything.
+ (rename-file "opt/" "lib")
+ ;; Remove unneeded files.
+ (delete-file-recursively "usr")
+ ;; Fix the .desktop file binary location.
+ (substitute* '("share/applications/heroic.desktop")
+ (("/opt/Heroic/")
+ (string-append #$output "/bin/")))))
+ (add-after 'install 'symlink-binary-file
+ (lambda _
+ (mkdir-p (string-append #$output "/bin"))
+ (symlink (string-append #$output "/lib/Heroic/heroic")
+ (string-append #$output "/bin/heroic"))))
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
+ (lambda _
+ (wrap-program (string-append #$output "/lib/Heroic/heroic")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-join
+ (list
+ (string-append #$output "/lib/Heroic"))
+ ":")))))))))
+ (home-page "https://heroicgameslauncher.com")
+ (synopsis "A Native GOG, Amazon and Epic Games Launcher")
+ (description "Heroic is an Open Source Game Launcher. Right now it supports launching
+games from the Epic Games Store using Legendary, GOG Games using our custom
+implementation with gogdl and Amazon Games using Nile.")
+ (license license:gpl3)))
+
+(define steam-client
+ (package
+ (name "steam-client")
+ (version "1.0.0.78")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://repo.steampowered.com/steam/archive/precise/steam_"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0390qy8vy7sx35hxl51yrbk6mvdz1vvpy96v07qva4bjbmsmjhhh"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; There are no tests.
+ #:validate-runpath? #f ; Looks for bin/steam which doesn't exist.
+ #:make-flags
+ (list "PREFIX=" (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ ;; Patch Makefile so it creates links to the store rather than /lib.
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* "Makefile"
+ (("-fns ")
+ "-fns $(DESTDIR)"))))
+ (delete 'patch-dot-desktop-files)
+ (add-after 'unpack 'patch-startscript
+ (lambda _
+ (substitute* "bin_steam.sh"
+ (("/usr") (assoc-ref %outputs "out")))))
+ (add-after 'patch-dot-desktop-files 'patch-desktop-file
+ (lambda _
+ (let ((path (string-append (assoc-ref %outputs "out")
+ "/share/applications/")))
+ (substitute* (string-append path "steam.desktop")
+ (("Exec=.*/steam") "Exec=steam"))
+ (copy-file (string-append path "steam.desktop")
+ (string-append path "steam-asound32.desktop"))
+ (substitute* (string-append path "steam-asound32.desktop")
+ (("Exec=steam %U") "Exec=steam %U -- --asound32")
+ (("Name=Steam") "Name=Steam (32-bit ALSA)")))))
+ ;; Steamdeps installs missing packages, which doesn't work with Guix.
+ (add-after 'install-binaries 'post-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out")))
+ (delete-file (string-append out "/lib/steam/bin_steamdeps.py"))
+ (delete-file (string-append out "/bin/steamdeps"))))))))
+ (home-page "https://store.steampowered.com")
+ (synopsis "Digital distribution platform for managing and playing games")
+ (description "Steam is a digital software distribution platform created by Valve.")
+ (license (license:nonfree "file:///share/doc/steam/steam_subscriber_agreement.txt"))))
+
+(define steam-client-libs
+ `(("at-spi2-core" ,at-spi2-core) ; Required (often) for SteamVR interface.
+ ("bash" ,bash) ; Required for steam startup.
+ ("coreutils" ,coreutils)
+ ("diffutils" ,diffutils)
+ ("dbus-glib" ,dbus-glib) ; Required for steam browser.
+ ("elfutils" ,elfutils) ; Required for capturing library dependencies in pv.
+ ("eudev" ,eudev) ; Required for steamwebhelper/heavy runtime.
+ ("fontconfig" ,fontconfig) ; Required for steam client.
+ ("file" ,file) ; Used for steam installation.
+ ("find" ,findutils) ; Required at least for some logging.
+ ("freetype" ,freetype) ; Required for steam login.
+ ("gawk" ,gawk)
+ ("gdk-pixbuf" ,gdk-pixbuf) ; Required for steam tray icon.
+ ("gcc:lib" ,gcc "lib") ; Required for steam startup.
+ ("grep" ,grep)
+ ("libbsd" ,libbsd)
+ ("libcap" ,libcap) ; Required for SteamVR, but needs pkexec too.
+ ("libusb" ,libusb) ; Required for SteamVR.
+ ("libva" ,libva) ; Required for hardware video encoding/decoding.
+ ("libvdpau" ,libvdpau) ; Required for hardware video encoding/decoding.
+ ("libvdpau-va-gl" ,libvdpau-va-gl) ; Additional VDPAU support.
+ ("llvm" ,llvm-for-mesa) ; Required for mesa.
+ ("lsof" ,lsof) ; Required for some friend's list actions.
+ ("mesa" ,mesa) ; Required for steam startup.
+ ("nss-certs" ,nss-certs) ; Required for steam login.
+ ("pciutils" ,pciutils) ; Tries to run lspci at steam startup.
+ ("procps" ,procps)
+ ("sed" ,sed)
+ ("tar" ,tar)
+ ("usbutils" ,usbutils) ; Required for SteamVR.
+ ("util-linux" ,util-linux) ; Required for steam login.
+ ("wayland" ,wayland) ; Required for mesa vulkan (e.g. libvulkan_radeon).
+ ("xdg-user-dirs" ,xdg-user-dirs) ; Suppress warning of missing xdg-user-dir.
+ ("flatpak-xdg-utils" ,flatpak-xdg-utils)
+ ("xz" ,xz)
+ ("zenity" ,zenity))) ; Required for progress dialogs.
+
+(define steam-gameruntime-libs
+ `(("alsa-lib" ,alsa-lib) ; Required for audio in most games.
+ ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio") ; Required for audio in most games.
+ ("font-dejavu" ,font-dejavu)
+ ("font-liberation" ,font-liberation)
+ ("imgui" ,imgui-1.86) ; Required for MangoHud.
+ ("mangohud" ,mangohud)
+ ("openal" ,openal) ; Prevents corrupt audio in Crypt of the Necrodancer.
+ ("pulseaudio" ,pulseaudio) ; Prevents corrupt audio in Sven Coop.
+ ("python" ,python) ; Required for KillingFloor2 and Wreckfest.
+ ("spdlog" ,spdlog))) ; Required for MangoHud.
+
+(define steam-container-libs
+ (append steam-client-libs
+ steam-gameruntime-libs
+ fhs-min-libs))
+
+(define steam-nvidia-container-libs
+ (modify-inputs steam-container-libs
+ (replace "mesa" nvda)))
+
+(define heroic-extra-client-libs
+ `(("curl" ,curl) ; Required for Heroic to download e.g. Wine.
+ ("which" ,which) ; Heroic complains about trying to use which (though works).
+ ("gtk+" ,gtk+))) ; Required for Heroic interface (gtk filechooser schema).
+
+(define steam-ld.so.conf
+ (packages->ld.so.conf
+ (list (fhs-union steam-container-libs
+ #:name "fhs-union-64")
+ (fhs-union steam-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))))
+
+(define steam-ld.so.cache
+ (ld.so.conf->ld.so.cache steam-ld.so.conf))
+
+(define steam-nvidia-ld.so.conf
+ (packages->ld.so.conf
+ (list (fhs-union steam-nvidia-container-libs
+ #:name "fhs-union-64")
+ (fhs-union steam-nvidia-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))))
+
+(define steam-nvidia-ld.so.cache
+ (ld.so.conf->ld.so.cache steam-nvidia-ld.so.conf))
+
+(define-public steam-container
+ (nonguix-container
+ (name "steam")
+ (wrap-package steam-client)
+ (run "/bin/steam")
+ (ld.so.conf steam-ld.so.conf)
+ (ld.so.cache steam-ld.so.cache)
+ (union64
+ (fhs-union steam-container-libs
+ #:name "fhs-union-64"))
+ (union32
+ (fhs-union steam-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))
+ (link-files '("share"))
+ (description "Steam is a digital software distribution platform created by
+Valve. This package provides a script for launching Steam in a Guix container
+which will use the directory @file{$HOME/.local/share/guix-sandbox-home} where
+all games will be installed.")))
+
+(define-public steam-nvidia-container
+ (nonguix-container
+ (inherit steam-container)
+ (name "steam-nvidia")
+ ;; Steam's .desktop files expect a "steam" executable, so provide that.
+ (binary-name "steam")
+ (ld.so.conf steam-nvidia-ld.so.conf)
+ (ld.so.cache steam-nvidia-ld.so.cache)
+ (union64
+ (fhs-union steam-nvidia-container-libs
+ #:name "fhs-union-64"))
+ (union32
+ (fhs-union steam-nvidia-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))
+ (preserved-env %nvidia-environment-variable-regexps)))
+
+(define-public steam (nonguix-container->package steam-container))
+(define-public steam-nvidia (nonguix-container->package steam-nvidia-container))
+
+(define-public heroic-container
+ (nonguix-container
+ (name "heroic")
+ (wrap-package heroic-client)
+ (run "/bin/heroic")
+ (ld.so.conf steam-ld.so.conf)
+ (ld.so.cache steam-ld.so.cache)
+ ;; TODO: Probably can remove some of the packages from these lists, at
+ ;; least changing the client libraries as Heroic is rather different from
+ ;; Steam. However, a good number will be needed to run games anyway. A
+ ;; better separation and testing in Steam as well would be helpful to
+ ;; differentiate what packages are needed for what in general. For now,
+ ;; this is easier and works.
+ (union64
+ (fhs-union `(,@heroic-extra-client-libs
+ ,@steam-container-libs)
+ #:name "fhs-union-64"))
+ ;; Don't include heroic-client-libs as they are not needed in 32-bit.
+ (union32
+ (fhs-union steam-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))
+ (link-files '("share"))
+ (description "Heroic is an Open Source Game Launcher. Right now it supports launching
+games from the Epic Games Store using Legendary, GOG Games using our custom
+implementation with gogdl and Amazon Games using Nile. This package provides
+a script for launching Heroic in a Guix container which will use the directory
+@file{$HOME/.local/share/guix-sandbox-home} where all games will be
+installed.")))
+
+(define-public heroic-nvidia-container
+ (nonguix-container
+ (inherit heroic-container)
+ (name "heroic-nvidia")
+ (ld.so.conf steam-nvidia-ld.so.conf)
+ (ld.so.cache steam-nvidia-ld.so.cache)
+ (union64
+ (fhs-union `(,@heroic-extra-client-libs
+ ,@steam-nvidia-container-libs)
+ #:name "fhs-union-64"))
+ (union32
+ (fhs-union steam-nvidia-container-libs
+ #:name "fhs-union-32"
+ #:system "i686-linux"))
+ (preserved-env %nvidia-environment-variable-regexps)))
+
+(define-public heroic (nonguix-container->package heroic-container))
+(define-public heroic-nvidia (nonguix-container->package heroic-nvidia-container))
+
+(define-public protonup-ng
+ (package
+ (name "protonup-ng")
+ (version "0.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cloudishBenne/protonup-ng")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0yd2mhhqxzarqxk85zf42s931jzc94f1cssn1hblsqghr79laa45"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:tests? #f)) ; there are no tests
+ (inputs
+ (list python-configparser python-requests))
+ (home-page "https://github.com/cloudishBenne/protonup-ng")
+ (synopsis "Manage Proton-GE Installations")
+ (description "ProtonUp-ng is a CLI program and API to automate the installation
+and update of GloriousEggroll's Proton-GE.")
+ (license license:gpl3)))
diff --git a/nongnu/packages/game-development.scm b/nongnu/packages/game-development.scm
index 16cd699..e23c4ca 100644
--- a/nongnu/packages/game-development.scm
+++ b/nongnu/packages/game-development.scm
@@ -1,31 +1,20 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2024 Timotej Lazar <timotej.lazar@araneo.si>
(define-module (nongnu packages game-development)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
#:use-module ((nonguix licenses) :prefix license:)
#:use-module (guix packages)
#:use-module (nonguix build-system binary)
#:use-module (guix build-system gnu)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module ((guix licenses) :prefix license:)
#:use-module (gnu packages audio)
#:use-module (gnu packages base)
#:use-module (gnu packages gcc)
@@ -174,128 +163,95 @@ development should opt for GLSL rather than Cg.")
"https://raw.githubusercontent.com/ValveSoftware/source-sdk-2013/master/LICENSE"))))
(define-public eduke32
- ;; There are no official releases.
- (let ((commit "188e14622cfe5c6f63b04b989b350bf2a29a893c")
- (revision "1")
- (duke-nukem-3d-directory "share/dukenukem3d"))
- (package
- (name "eduke32")
- (version (git-version "0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://voidpoint.io/terminx/eduke32.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0wy4bppiw4q2hn0v38msrjyvj2hzfvigakc23c2wqfnbl7rm0hrz"))
- ;; Unbundle libxmp.
- (modules '((guix build utils)))
- (snippet
- '(begin (delete-file-recursively "source/libxmp-lite") #t))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f
- ;; Add glu to rpath so that SDL can dlopen it.
- #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
- (assoc-ref %build-inputs "glu") "/lib"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unbundle-libxmp
- (lambda _
- (substitute* "GNUmakefile"
- (("-I\\$\\(libxmplite_inc\\)")
- (string-append "-I" (assoc-ref %build-inputs "libxmp") "/include"))
- (("^ *audiolib_deps \\+= libxmplite.*$") "")
- (("-logg") "-logg -lxmp"))
- (with-directory-excursion "source/audiolib/src"
- (for-each (lambda (file) (substitute* file (("libxmp-lite/") "")))
- '("multivoc.cpp" "xmp.cpp")))
- #t))
- (delete 'configure)
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (glu (assoc-ref inputs "glu"))
- (eduke (string-append out "/bin/eduke32"))
- (eduke-real (string-append out "/bin/.eduke32-real")))
- ;; TODO: Install custom .desktop file? Need icon.
- ;; See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=eduke32.
- (install-file "eduke32" (string-append out "/bin"))
- (install-file "mapster32" (string-append out "/bin"))
- (install-file "package/common/buildlic.txt"
- (string-append out "/share/licenses"))
- ;; Wrap program:
- ;; - Make sure current directory is writable, else eduke32 will segfault.
- ;; - Add ../share/dukenukem3d to the dir search list.
- ;; TODO: Skip store duke3d.grp When ~/.config/eduke32/duke3d.grp is found.
- (rename-file eduke eduke-real)
- (call-with-output-file eduke
- (lambda (p)
- (format p "\
-#!~a
-mkdir -p ~~/.config/eduke32
-cd ~~/.config/eduke32
-exec -a \"$0\" ~a\
- -g \"${0%/*}\"/../~a/*.grp\
- -g \"${0%/*}\"/../~a/*.zip\
- -g \"${0%/*}\"/../~a/*.map\
- -g \"${0%/*}\"/../~a/*.con\
- -g \"${0%/*}\"/../~a/*.def\
- \"$@\"~%"
- (which "bash") eduke-real
- ,duke-nukem-3d-directory
- ,duke-nukem-3d-directory
- ,duke-nukem-3d-directory
- ,duke-nukem-3d-directory
- ,duke-nukem-3d-directory)))
- (chmod eduke #o755)))))))
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (inputs
- `(("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer)))
- ("alsa-lib" ,alsa-lib)
- ("glu" ,glu)
- ("libvorbis" ,libvorbis)
- ("libvpx" ,libvpx)
- ("libxmp" ,libxmp)
- ("flac" ,flac)
- ("gtk+" ,gtk+-2)))
- (synopsis "Engine of the classic PC first person shooter Duke Nukem 3D")
- (description "EDuke32 is a free homebrew game engine and source port of the
-classic PC first person shooter Duke Nukem 3D—Duke3D for short. A thousands
-of features and upgrades were added for regular players and additional editing
-capabilities and scripting extensions for homebrew developers and mod
-creators. EDuke32 is open source but non-free software.
+ (package
+ (name "eduke32")
+ (version "20240316-10564-0bc78c53d")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dukeworld.com/eduke32/synthesis/"
+ version "/eduke32_src_" version ".tar.xz"))
+ (sha256
+ (base32 "1a9fw1kfriyrybjxl72b2434w3yiz2nxg6541lnyhzbdka2cp2lf"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove bundled libxmp and platform-specific stuff.
+ #~(for-each delete-file-recursively '("platform" "source/libxmp-lite")))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:license-file-regexp "buildlic.txt"
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'link-license
+ (lambda _
+ ;; Ensure the install-license-files phase can find it.
+ (link "package/common/buildlic.txt" "buildlic.txt")))
+ (add-after 'unpack 'unbundle-libxmp
+ (lambda _
+ (substitute* "Common.mak"
+ (("^LIBS :=" match) (string-append match " -lxmp")))
+ (with-directory-excursion "source/audiolib/src"
+ (for-each (lambda (file) (substitute* file (("libxmp-lite/") "")))
+ '("multivoc.cpp" "xmp.cpp")))))
+ (add-after 'unpack 'fix-share-path
+ (lambda _
+ (substitute* "source/duke3d/src/common.cpp"
+ (("/usr/local/share/games") (string-append #$output "/share")))))
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (install-file "eduke32" bin)
+ (install-file "mapster32" bin)
+ (install-file "package/sdk/m32help.hlp"
+ (string-append #$output "/share/eduke32"))))))))
+ (inputs (list alsa-lib
+ flac
+ glu
+ gtk+-2
+ libvorbis
+ libvpx
+ libxmp
+ sdl2
+ sdl2-mixer))
+ (native-inputs
+ (list gdk-pixbuf pkg-config))
+ (synopsis "Engine of the classic PC first person shooter Duke Nukem 3D")
+ (description "EDuke32 is a free homebrew game engine and source port of
+the classic PC first person shooter Duke Nukem 3D—Duke3D for short. A
+thousands of features and upgrades were added for regular players and
+additional editing capabilities and scripting extensions for homebrew
+developers and mod creators. EDuke32 is open source but non-free software.
This package does not contain any game file. You can either install packages
with game files or or put @file{.grp} game files manually in
@file{~/.config/eduke32/}.")
- (home-page "https://eduke32.com/")
- (license (license:nonfree
- "https://eduke32.com/buildlic.txt")))))
+ (home-page "https://eduke32.com")
+ (license
+ (list license:gpl2
+ (license:nonfree "file://package/common/buildlic.txt")))))
(define-public fury
- (package
- (inherit eduke32)
+ (package/inherit eduke32
(name "fury")
(arguments
(substitute-keyword-arguments (package-arguments eduke32)
- ((#:make-flags flags ''()) `(cons* "FURY=1" ,flags))
- ((#:phases phases '%standard-phases)
- `(modify-phases ,phases
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out")))
- (install-file "fury" (string-append out "/bin"))
- (install-file "mapster32" (string-append out "/bin"))
- (install-file "package/common/buildlic.txt"
- (string-append out "/share/licenses")))
- #t))))))
+ ((#:make-flags flags #~'())
+ #~(cons* "FURY=1" #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'disable-sdl-static
+ (lambda _
+ (substitute* "GNUmakefile"
+ (("SDL_STATIC := 1") ""))))
+ (replace 'install
+ (lambda _
+ (install-file "fury" (string-append #$output "/bin"))))))))
+ (inputs
+ (alist-delete "libvpx" (package-inputs eduke32)))
(synopsis "Game engine for the first-person shooter Ion Fury")
(description
- (string-append
- "This is the @code{eduke32} engine built with support for the Ion Fury
+ "This is the @code{eduke32} engine built with support for the Ion Fury
game. Game data is not provided. Run @command{fury} with the option
-@option{-j} to specify the directory containing @file{fury.grp}."))))
+@option{-j} to specify the directory containing @file{fury.grp}.")))
diff --git a/nongnu/packages/gog.scm b/nongnu/packages/gog.scm
index 6c2f023..f6deffb 100644
--- a/nongnu/packages/gog.scm
+++ b/nongnu/packages/gog.scm
@@ -1,18 +1,7 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2021-2022 Timotej Lazar <timotej.lazar@araneo.si>
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
+;;; Copyright © 2023 Eidvilas Markevičius <markeviciuseidvilas@gmail.com>
(define-module (nongnu packages gog)
#:use-module (gnu packages boost)
@@ -33,7 +22,7 @@
(define-public lgogdownloader
(package
(name "lgogdownloader")
- (version "3.9")
+ (version "3.12")
(source
(origin
(method git-fetch)
@@ -42,7 +31,7 @@
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1hbwgwdm1vn7lkz366q9q8f44sk1pvhgjffndwx49lh3md66xps2"))))
+ (base32 "0kmz5zsbci7iilbqdvql9c1vk2b1q2flsdr6psnkln07xp664di2"))))
(build-system qt-build-system)
(arguments
`(#:configure-flags '("-DUSE_QT_GUI=ON")
diff --git a/nongnu/packages/k8s.scm b/nongnu/packages/k8s.scm
new file mode 100644
index 0000000..6a8a216
--- /dev/null
+++ b/nongnu/packages/k8s.scm
@@ -0,0 +1,217 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+
+(define-module (nongnu packages k8s)
+ #:use-module (guix build-system copy)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses) :prefix license:))
+
+(define-public k9s
+ (package
+ (name "k9s")
+ (version "0.27.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/derailed/k9s/releases/download/v"
+ version "/k9s_Linux_amd64.tar.gz"))
+ (sha256
+ (base32
+ "14j37kl8pbmbid4np48cfv5k8vic6ngnc4pjh01qr6szplg861z5"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("k9s" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (invoke "tar" "-xvf" #$source))))))
+ (home-page "https://k9scli.io")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Kubernetes CLI To Manage Your Clusters In Style")
+ (description
+ "K9s provides a terminal UI to interact with your Kubernetes clusters. The
+aim of this project is to make it easier to navigate, observe and manage your
+applications in the wild. K9s continually watches Kubernetes for changes and
+offers subsequent commands to interact with your observed resources.")
+ (license license:asl2.0)))
+
+(define-public katenary
+ (package
+ (name "katenary")
+ (version "2.0.0-beta2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/metal3d/katenary/releases/download/"
+ version "/katenary-linux-amd64"))
+ (sha256
+ (base32
+ "0vk5c82bf5aasrgz2b7qdjlbmlcjha0r3swmrbs9y5mms18y7m3i"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("katenary" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (copy-file #$source "./katenary")
+ (chmod "katenary" #o644)))
+ (add-before 'install 'chmod
+ (lambda _
+ (chmod "katenary" #o555))))))
+ (home-page "https://github.com/metal3d/katenary")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Convert docker-compose to a configurable helm chart")
+ (description
+ "Katenary is a tool to help to transform docker-compose files to a working
+Helm Chart for Kubernetes.")
+ (license license:expat)))
+
+(define-public kubectl
+ (package
+ (name "kubectl")
+ (version "1.28.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://dl.k8s.io/release/v" version "/bin/linux/amd64/kubectl"))
+ (sha256
+ (base32
+ "1qbl4a2xv795apvbwahdb9kzcm2wys0am1c72as3iavgs3wxd9z7"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("kubectl" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (copy-file #$source "./kubectl")
+ (chmod "kubectl" #o644)))
+ (add-before 'install 'chmod
+ (lambda _
+ (chmod "kubectl" #o555))))))
+ (home-page "https://github.com/kubernetes/kubectl")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Kubernetes command line tool")
+ (description
+ "kubectl allows you to run commands against Kubernetes clusters. You can
+use kubectl to deploy applications, inspect and manage cluster resources, and
+view logs.")
+ (license license:asl2.0)))
+
+(define-public kompose
+ (package
+ (name "kompose")
+ (version "1.30.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/kubernetes/kompose/releases/download/v"
+ version "/kompose-linux-amd64"))
+ (sha256
+ (base32
+ "0sy3ci7s2dkjigasyv01nm1vg30wwhmdc0cmglzb23ws8bfrfjlh"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("kompose" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (copy-file #$source "./kompose")))
+ (add-before 'install 'chmod
+ (lambda _
+ (chmod "kompose" #o555))))))
+ (home-page "https://kompose.io")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Go from Docker Compose to Kubernetes")
+ (description
+ "Kompose is a conversion tool for Docker Compose to container orchestrators
+such as Kubernetes (or OpenShift).")
+ (license license:expat)))
+
+(define-public helm-kubernetes
+ (package
+ (name "helm-kubernetes")
+ (version "3.12.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://get.helm.sh/helm-v" version "-linux-amd64.tar.gz"))
+ (sha256
+ (base32
+ "1d99c506shnz5cr9xhkrla5r82nan7v3hz631jqflicd376i68qv"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("linux-amd64/helm" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (invoke "tar" "-xvf" #$source)))
+ (add-before 'install 'chmod
+ (lambda _
+ (chmod "linux-amd64/helm" #o555))))))
+ (home-page "https://helm.sh")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "The package manager for Kubernetes")
+ (description
+ "Helm helps you manage Kubernetes applications - Helm Charts help you
+define, install, and upgrade Kubernetes applications.")
+ (license license:asl2.0)))
+
+(define-public kind
+ (package
+ (name "kind")
+ (version "0.20.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://kind.sigs.k8s.io/dl/v" version "/kind-linux-amd64"))
+ (sha256
+ (base32
+ "1v9x953a5n0l3kz78wm29yh11vz56nmlvhi7xzcjscyksq9p4fji"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:substitutable? #f
+ #:install-plan
+ #~'(("kind" "bin/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (copy-file #$source "./kind")
+ (chmod "kind" #o644)))
+ (add-before 'install 'chmod
+ (lambda _
+ (chmod "kind" #o555))))))
+ (home-page "https://kind.sigs.k8s.io")
+ (synopsis "Tool for running local Kubernetes clusters using Docker containers")
+ (description "kind (Kubernetes in Docker) is designed for creating and managing
+local Kubernetes clusters using Docker containers as nodes. It provides
+a fast and straightforward way to run Kubernetes for development and
+testing tasks.
+
+Supporting multi-node cluster configurations, kind is ideal for testing
+more complex, real-world scenarios without demanding extensive resources.
+It’s a lightweight, portable, and configurable solution useful in
+continuous integration (CI) workflows.")
+ (license license:asl2.0)))
diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm
index 380dc1c..a18ed7e 100644
--- a/nongnu/packages/linux.scm
+++ b/nongnu/packages/linux.scm
@@ -1,40 +1,38 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; 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, 2021, 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; 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>
;;; Copyright © 2021 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Risto Stevcev <me@risto.codes>
;;; Copyright © 2021 aerique <aerique@xs4all.nl>
;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
-;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022, 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
;;; Copyright © 2022 Simen Endsjø <simendsjo@gmail.com>
-
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
+;;; Copyright © 2022 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
+;;; Copyright © 2023 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2023 Jelle Licht <jlicht@fsfe.org>
+;;; Copyright © 2023 Adam Kandur <rndd@tuta.io>
+;;; 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)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpio)
#:use-module (gnu packages linux)
#:use-module (guix licenses)
#:use-module (guix packages)
@@ -48,100 +46,291 @@
#:use-module (guix build-system trivial)
#:use-module (ice-9 match)
#:use-module (nonguix licenses)
+ #:use-module (srfi srfi-1)
#:export (corrupt-linux))
-(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 (linux-url version)
+ "Return a URL for Linux VERSION."
+ (string-append "mirror://kernel.org"
+ "/linux/kernel/v" (version-major version) ".x"
+ "/linux-" version ".tar.xz"))
-(define* (corrupt-linux freedo version hash #:key (name "linux"))
- (package
- (inherit freedo)
- (name name)
- (version version)
- (source (origin
- (method url-fetch)
- (uri (linux-urls version))
- (sha256 (base32 hash))
- ;; By default the linux-libre package will "make infodocs" for
- ;; supported kernels (version > 5.10) which needs the following
- ;; patch. Include the patch if it applies rather than disabling
- ;; the associated "build-doc" phase.
- (patches (if ((@@ (gnu packages linux) doc-supported?) version)
- (search-patches "linux-libre-infodocs-target.patch")
- '()))))
- (home-page "https://www.kernel.org/")
- (synopsis "Linux kernel with nonfree binary blobs included")
- (description
- "The unmodified Linux kernel, including nonfree blobs, for running Guix
-System on hardware which requires nonfree software to function.")))
+;;; If you are corrupting the kernel on your own, consider using output of
+;;; this procedure as a base for your options:
+;;; (corrupt-linux linux-libre-lts
+;;; #:configs (cons* "CONFIG_FOO=y"
+;;; (nonguix-extra-linux-options linux-libre-lts)
+(define-public (nonguix-extra-linux-options linux-or-version)
+ "Return a list containing additional options that nonguix sets by default
+for a corrupted linux package of specified version. linux-or-version can be
+some freedo package or an output of package-version procedure."
+ (define linux-version
+ (if (package? linux-or-version)
+ (package-version linux-or-version)
+ linux-or-version))
+
+ (reverse (fold (lambda (opt opts)
+ (if (version>=? linux-version (car opt))
+ (cons* (cdr opt) opts)
+ opts))
+ '()
+ ;; List of additional options for nonguix corrupted linux.
+ ;; Each member is a pair of a minimal version (>=) and the
+ ;; option itself. Option has to be in a format suitable for
+ ;; (@ (guix build kconfig) modify-defconfig) procedure.
+ ;;
+ ;; Do note that this list is intended for enabling use of
+ ;; hardware requiring non-free firmware. If a configuration
+ ;; option does work under linux-libre, it should go into Guix
+ ;; actual.
+ '(
+ ;; Driver for MediaTek mt7921e wireless chipset
+ ("5.15" . "CONFIG_MT7921E=m")))))
+
+(define* (corrupt-linux freedo
+ #:key
+ (name "linux")
+ (configs (nonguix-extra-linux-options freedo))
+ (defconfig #f))
-(define-public linux-6.0
- (corrupt-linux linux-libre-6.0 "6.0.9"
- "1irip1yk62carcisxlacwcxsiqib4qswx6h5mfhv8f97x04a4531"))
+ ;; TODO: This very directly depends on guix internals.
+ ;; Throw it all out when we manage kernel hashes.
+ (define gexp-inputs (@@ (guix gexp) gexp-inputs))
+
+ (define extract-gexp-inputs
+ (compose gexp-inputs force origin-uri))
+
+ (define (find-source-hash sources url)
+ (let ((versioned-origin
+ (find (lambda (source)
+ (let ((uri (origin-uri source)))
+ (and (string? uri) (string=? uri url)))) sources)))
+ (if versioned-origin
+ (origin-hash versioned-origin)
+ #f)))
+
+ (let* ((version (package-version freedo))
+ (url (linux-url version))
+ (pristine-source (package-source freedo))
+ (inputs (map gexp-input-thing (extract-gexp-inputs pristine-source)))
+ (sources (filter origin? inputs))
+ (hash (find-source-hash sources url)))
+ (package
+ (inherit
+ (customize-linux
+ #:name name
+ #:linux freedo
+ #:source (origin
+ (method url-fetch)
+ (uri url)
+ (hash hash))
+ #:configs configs
+ #:defconfig defconfig))
+ (version version)
+ (home-page "https://www.kernel.org/")
+ (synopsis "Linux kernel with nonfree binary blobs included")
+ (description
+ "The unmodified Linux kernel, including nonfree blobs, for running Guix System
+on hardware which requires nonfree software to function."))))
+
+(define-public linux-6.8
+ (corrupt-linux linux-libre-6.8))
+
+(define-public linux-6.6
+ (corrupt-linux linux-libre-6.6))
+
+(define-public linux-6.1
+ (corrupt-linux linux-libre-6.1))
(define-public linux-5.15
- (corrupt-linux linux-libre-5.15 "5.15.79"
- "0m61k7k6lj24z9a266q08wzghggjik2wizcabdwd1vn0vcqr18yb"))
+ (corrupt-linux linux-libre-5.15))
(define-public linux-5.10
- (corrupt-linux linux-libre-5.10 "5.10.155"
- "1wyla96qsdf50n7qjj4hdf36bj56whv7gc9mgw9bvrsqdi92gc7i"))
+ (corrupt-linux linux-libre-5.10))
(define-public linux-5.4
- (corrupt-linux linux-libre-5.4 "5.4.224"
- "0dixs4w7nmkjgxv9dxgjdy8v6r4parkpqyvdfyr0wqk0amdz4zcb"))
+ (corrupt-linux linux-libre-5.4))
(define-public linux-4.19
- (corrupt-linux linux-libre-4.19 "4.19.265"
- "1l5cdpgng1gci1p1gdr2jzqw486h3w56gpyc7fbq74hlc6nnwh1p"))
+ (corrupt-linux linux-libre-4.19))
-(define-public linux-4.14
- (corrupt-linux linux-libre-4.14 "4.14.299"
- "0p5ic2mrb9vl3qkzvqxhia3kygjv8xa6s1kqkwgd6b4rmq1kc8r6"))
+(define-public linux linux-6.8)
+;; linux-lts points to the *newest* released long-term support version.
+(define-public linux-lts linux-6.6)
-(define-public linux-4.9
- (corrupt-linux linux-libre-4.9 "4.9.333"
- "0ash877gkrrc063h6ncl9d4gzyhndanpxsdgf1a93abbfv281gs1"))
+(define-public linux-arm64-generic-5.10
+ (corrupt-linux linux-libre-arm64-generic-5.10 #:name "linux-arm64-generic"))
-(define-public linux linux-6.0)
-;; linux-lts points to the *newest* released long-term support version.
-(define-public linux-lts linux-5.15)
+(define-public linux-arm64-generic-5.4
+ (corrupt-linux linux-libre-arm64-generic-5.4 #:name "linux-arm64-generic"))
+
+(define-public linux-arm64-generic
+ (corrupt-linux linux-libre-arm64-generic #:name "linux-arm64-generic"))
+
+
+;;;
+;;; Linux-XanMod
+;;;
+
+(define* (make-linux-xanmod-source version xanmod-revision
+ #:key xanmod-branch kernel-hash xanmod-hash)
+
+ (define %upstream-linux-source
+ (@@ (gnu packages linux) %upstream-linux-source))
+
+ (define kernel-source
+ (%upstream-linux-source (version-major+minor version) kernel-hash))
+
+ (define xanmod-patch
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/xanmod/releases/" xanmod-branch "/"
+ version "-" xanmod-revision "/patch-"
+ version "-" xanmod-revision ".xz"))
+ (sha256 xanmod-hash)))
+
+ (origin
+ (inherit kernel-source)
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (let* ((xz-name (basename #+xanmod-patch))
+ (patch-xz-name (string-append (string-drop-right xz-name 3)
+ ".patch.xz"))
+ (patch-name (string-drop-right patch-xz-name 3)))
+ (copy-file #+xanmod-patch patch-xz-name)
+ (invoke #+(file-append xz "/bin/unxz") patch-xz-name)
+ (invoke #+(file-append patch "/bin/patch")
+ "--force" "--no-backup-if-mismatch"
+ #+@(origin-patch-flags kernel-source)
+ "--input" patch-name)
+ (for-each delete-file
+ (list patch-name
+ ;; EXTRAVERSION is used instead.
+ "localversion")))))))
+
+(define* (make-linux-xanmod version xanmod-revision source
+ #:key
+ (name "linux-xanmod")
+ (xanmod-defconfig "config_x86-64-v1"))
+
+ (define %default-extra-linux-options
+ (@@ (gnu packages linux) %default-extra-linux-options))
+
+ (define config->string
+ (@@ (gnu packages linux) config->string))
-(define-public linux-arm64-generic-6.0
- (corrupt-linux linux-libre-arm64-generic "6.0.9"
- "1irip1yk62carcisxlacwcxsiqib4qswx6h5mfhv8f97x04a4531"
- #:name "linux-arm64-generic"))
+ (define base-kernel
+ (customize-linux
+ #:name name
+ #:source source
+ #:defconfig xanmod-defconfig
+ ;; EXTRAVERSION is used instead.
+ #:configs (config->string
+ '(("CONFIG_LOCALVERSION" . "")))
+ #:extra-version xanmod-revision))
-(define-public linux-arm64-generic-5.15
- (corrupt-linux linux-libre-arm64-generic "5.15.79"
- "0m61k7k6lj24z9a266q08wzghggjik2wizcabdwd1vn0vcqr18yb"
- #:name "linux-arm64-generic"))
+ (package
+ (inherit base-kernel)
+ (version version)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-kernel)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; Since `customize-linux' replaces the configure phase, we add
+ ;; XanMod defconfig beforehand to ensure compatibility of the
+ ;; resulting package with `customize-linux'.
+ (add-before 'configure 'add-xanmod-defconfig
+ (lambda _
+ (rename-file
+ (string-append "CONFIGS/xanmod/gcc/" #$xanmod-defconfig)
+ ".config")
-(define-public linux-arm64-generic linux-arm64-generic-6.0)
+ ;; Adapted from `make-linux-libre*'.
+ (chmod ".config" #o666)
+ (let ((port (open-file ".config" "a"))
+ (extra-configuration
+ #$(config->string
+ (append %default-extra-linux-options
+ ;; NOTE: These are configs expected by Guix
+ ;; but missing from XanMod defconfig.
+ '(("CONFIG_BLK_DEV_NVME" . #t))))))
+ (display extra-configuration port)
+ (close-port port))
+ (invoke "make" "oldconfig")
+
+ (rename-file
+ ".config"
+ (string-append "arch/x86/configs/" #$xanmod-defconfig))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base-kernel)
+ ;; cpio is needed for CONFIG_IKHEADERS.
+ (prepend cpio zstd)))
+ (home-page "https://xanmod.org/")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Linux kernel distribution with custom settings and new features")
+ (description
+ "This package provides XanMod kernel, a general-purpose Linux kernel
+distribution with custom settings and new features. It's built to provide a
+stable, responsive and smooth desktop experience.")))
-(define-public linux-arm64-generic-lts linux-arm64-generic-5.15)
+;; Linux-XanMod sources
+(define-public linux-xanmod-version "6.8.6")
+(define-public linux-xanmod-revision "xanmod1")
+(define-public linux-xanmod-source
+ (make-linux-xanmod-source
+ linux-xanmod-version
+ linux-xanmod-revision
+ #:xanmod-branch "main"
+ #:kernel-hash (base32 "1wv5x7qhcd05m8m0myyqm2il6mha1sx11h7ppf8yjsxvx2jdwsf9")
+ #:xanmod-hash (base32 "1ry4qmsis7s2bb6hpkvq30ffgvhzj1w33js67ybnvagzda5vbmci")))
+
+(define-public linux-xanmod-lts-version "6.6.27")
+(define-public linux-xanmod-lts-revision "xanmod1")
+(define-public linux-xanmod-lts-source
+ (make-linux-xanmod-source
+ linux-xanmod-lts-version
+ linux-xanmod-lts-revision
+ #:xanmod-branch "lts"
+ #:kernel-hash (base32 "1l2nisx9lf2vdgkq910n5ldbi8z25ky1zvl67zgwg2nxcdna09nr")
+ #:xanmod-hash (base32 "0inlpdscdpqahwlsf8kc2zjp2p83yr2cfqyaxld6m4bjkbg23lvz")))
+
+;; Linux-XanMod packages
+(define-public linux-xanmod
+ (make-linux-xanmod linux-xanmod-version
+ linux-xanmod-revision
+ linux-xanmod-source))
+
+(define-public linux-xanmod-lts
+ (make-linux-xanmod linux-xanmod-lts-version
+ linux-xanmod-lts-revision
+ linux-xanmod-lts-source))
+
+
+;;;
+;;; Firmwares
+;;;
(define-public linux-firmware
(package
(name "linux-firmware")
- (version "20221109")
+ (version "20240312")
(source (origin
(method url-fetch)
- (uri (string-append "https://git.kernel.org/pub/scm/linux/kernel"
- "/git/firmware/linux-firmware.git/snapshot/"
- "linux-firmware-" version ".tar.gz"))
+ (uri (string-append "mirror://kernel.org/linux/kernel/firmware/"
+ "linux-firmware-" version ".tar.xz"))
(sha256
(base32
- "16yv7snsy5zvcwwzy0sr0lx3nf74qhi3nammdsx8c28rdm19jcn2"))))
+ "152bpl3lzd7jb2z1cl1sfax6jm71bspn7bwc00lci5qqmma7lcmj"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f
- #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (delete 'validate-runpath))))
+ (list #:tests? #f
+ #:strip-binaries? #f
+ #:validate-runpath? #f
+ #:make-flags #~(list (string-append "DESTDIR=" #$output))))
+ (native-inputs
+ (list rdfind))
(home-page
"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
(synopsis "Nonfree firmware blobs for Linux")
@@ -155,23 +344,23 @@ if your hardware is supported by one of the smaller firmware packages.")
(define (select-firmware keep)
"Modify linux-firmware copy list to retain only files matching KEEP regex."
- `(lambda _
- (use-modules (ice-9 regex))
- (substitute* "WHENCE"
- (("^(File|Link): *([^ ]*)(.*)" _ type file rest)
- (string-append (if (string-match ,keep file) type "Skip") ": " file rest)))))
+ #~(lambda _
+ (use-modules (ice-9 regex))
+ (substitute* "WHENCE"
+ (("^(File|RawFile|Link): *([^ ]*)(.*)" _ type file rest)
+ (string-append (if (string-match #$keep file) type "Skip") ": " file rest)))))
(define-public amdgpu-firmware
(package
(inherit linux-firmware)
(name "amdgpu-firmware")
(arguments
- `(#:license-file-regexp "LICENSE.amdgpu"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^amdgpu/")))))))
+ (cons* #:license-file-regexp "LICENSE.amdgpu"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^amdgpu/")))))))
(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
@@ -189,12 +378,12 @@ advanced 3D.")
(inherit amdgpu-firmware)
(name "radeon-firmware")
(arguments
- `(#:license-file-regexp "LICENSE.radeon"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^radeon/")))))))
+ (cons* #:license-file-regexp "LICENSE.radeon"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^radeon/")))))))
(synopsis "Nonfree firmware for older AMD graphics chips")
(description "Nonfree firmware for AMD graphics chips. While most AMD
graphics cards can be run with the free Mesa, some cards require a nonfree
@@ -246,12 +435,12 @@ and modules, userspace libraries, and bootloader/GPU firmware.")
(inherit linux-firmware)
(name "atheros-firmware")
(arguments
- `(#:license-file-regexp "LICEN[CS]E.*[Aa]th"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^(ar[3579]|ath[1369]|htc_[79]|qca/|wil6)")))))))
+ (cons* #:license-file-regexp "LICEN[CS]E.*[Aa]th"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^(ar[3579]|ath[1369]|htc_[79]|qca/|wil6)")))))))
(synopsis "Nonfree firmware blobs for Atheros wireless cards")
(description "Nonfree firmware blobs for Atheros wireless cards. This
package contains nonfree firmware for the following chips:
@@ -422,12 +611,12 @@ WLAN.TF.2.1-00021-QCARMSWP-1 (ath10k/QCA9377/hw1.0/firmware-6.bin)
(inherit linux-firmware)
(name "ibt-hw-firmware")
(arguments
- `(#:license-file-regexp "LICENCE.ibt_firmware"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^intel/ibt-")))))))
+ (cons* #:license-file-regexp "LICENCE.ibt_firmware"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^intel/ibt-")))))))
(home-page "http://www.intel.com/support/wireless/wlan/sb/CS-016675.htm")
(synopsis "Non-free firmware for Intel bluetooth chips")
(description "This firmware is required by the btintel kernel module to
@@ -443,12 +632,12 @@ laptops).")
(inherit linux-firmware)
(name "iwlwifi-firmware")
(arguments
- `(#:license-file-regexp "LICENCE.iwlwifi_firmware"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^iwlwifi-")))))))
+ (cons* #:license-file-regexp "LICENCE.iwlwifi_firmware"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^iwlwifi-")))))))
(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
@@ -464,12 +653,12 @@ support for 5GHz and 802.11ac, among others.")
(inherit linux-firmware)
(name "i915-firmware")
(arguments
- `(#:license-file-regexp "LICENCE.i915"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^i915/")))))))
+ (cons* #:license-file-regexp "LICENCE.i915"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^i915/")))))))
(home-page "https://01.org/linuxgraphics/gfx-docs/drm/gpu/i915.html")
(synopsis "Nonfree firmware for Intel integrated graphics")
(description "This package contains the various firmware for Intel
@@ -484,13 +673,12 @@ integrated graphics chipsets, including GuC, HuC and DMC.")
(inherit linux-firmware)
(name "realtek-firmware")
(arguments
- `(#:license-file-regexp "LICENCE.rtlwifi_firmware.txt"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware
- "^(rtlwifi|rtl_nic|rtl_bt|rtw88|rtw89)/")))))))
+ (cons* #:license-file-regexp "LICENCE.rtlwifi_firmware.txt"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^(rtlwifi|rtl_nic|rtl_bt|rtw88|rtw89)/")))))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x")
(synopsis "Nonfree firmware for Realtek ethernet, wifi, and bluetooth chips")
(description
@@ -580,8 +768,8 @@ package contains nonfree firmware for the following chips:
(deprecated-package "rtl-bt-firmware" realtek-firmware))
(define-public rtl8192eu-linux-module
- (let ((commit "1c42c4d780314add13dc7ad64f983e297f155499")
- (revision "4"))
+ (let ((commit "3af9a868a0ca622d830966ac83aea2bf17cd0d65")
+ (revision "7"))
(package
(name "rtl8192eu-linux-module")
(version (git-version "0.0.0" revision commit))
@@ -594,7 +782,7 @@ package contains nonfree firmware for the following chips:
(file-name (git-file-name name version))
(sha256
(base32
- "03kpm0vdjk1cnwn0y00fm56gd3pkcz1vvh9ybj4hrpsrklbbwi2p"))))
+ "0d2qzf7xbipjdp1zm2ffqhnda8wasqriqnv6dkl0mhqn2f8za3i8"))))
(build-system linux-module-build-system)
(arguments
`(#:make-flags
@@ -616,8 +804,176 @@ network adapters.")
;; hal/rtl8192e/hal8192e_fw.c
(license gpl2))))
+(define-public rtl8821ce-linux-module
+ (let ((commit "66983b69120a13699acf40a12979317f29012111")
+ (revision "11"))
+ (package
+ (name "rtl8821ce-linux-module")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tomaspinho/rtl8821ce")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0kj12jll0df1h4z6kzv3vylh22xlniki5kg414fv9sqgx1qgs5k7"))))
+ (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)) ; no test suite
+ (home-page "https://github.com/tomaspinho/rtl8821ce")
+ (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters")
+ (description "This is Realtek's RTL8821CE Linux driver for wireless
+network adapters.")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8821c/hal8821c_fw.c
+ (license gpl2))))
+
+(define-public rtl8821cu-linux-module
+ (let ((commit "4f6004af4c4171882f37e2e5d8fb3609fe260617")
+ (revision "2"))
+ (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 "09ig0rrkkn00i3d1n6p62n1610kcjgb2h9kbcqdsrmpnlnw5kfl2"))))
+ (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 "63cf0b4584aa8878b0fe8ab38017f31c319bde3d")
+ (revision "13"))
+ (package
+ (inherit rtl8821ce-linux-module)
+ (name "rtl8812au-aircrack-ng-linux-module")
+ (version (git-version "5.6.4.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aircrack-ng/rtl8812au")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "103pn6qlj116dm244ygf1wic9dq2qn80lafiyxynyhpckkyhhfxl"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Remove bundled tarballs, APKs, word lists, speadsheets,
+ ;; and other unnecessary unlicenced things.
+ (for-each delete-file-recursively (list "android"
+ "docs"
+ "tools"))))))
+ (supported-systems '("x86_64-linux" "i686-linux"))
+ (home-page "https://github.com/aircrack-ng/rtl8812au")
+ (synopsis "Linux driver for Realtek USB wireless network adapters")
+ (description
+ "This is Realtek's rtl8812au Linux driver for USB 802.11n wireless
+network adapters, modified by the aircrack-ng project to support monitor mode
+and frame injection. It provides a @code{88XXau} kernel module that supports
+RTL8812AU, RTL8821AU, and RTL8814AU chips.")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8812a/hal8812a_fw.c
+ (license gpl2+))))
+
+(define-public r8168-linux-module
+ (package
+ (name "r8168-linux-module")
+ (version "8.052.01")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mtorromeo/r8168")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01mi7hh92nc7jaxkfrpz7j0ci78djrhgmq0im4k1270mwmvr0yzj"))))
+ (arguments
+ (list #:tests? #f))
+ (build-system linux-module-build-system)
+ (home-page "https://github.com/mtorromeo/r8168")
+ (synopsis "Linux driver for Realtek PCIe network adapters")
+ (description
+ "Linux driver for Realtek PCIe network adapters. If the r8169 kernel module is
+giving you trouble, you can try this module.")
+ (license gpl2)))
+
(define broadcom-sta-version "6.30.223.271")
+(define (broadcom-sta-patch name commit hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://raw.githubusercontent.com/NixOS/nixpkgs/"
+ commit
+ "/pkgs/os-specific/linux/broadcom-sta/"
+ name
+ ".patch"))
+ (sha256
+ (base32
+ hash))))
+
(define broadcom-sta-x86_64-source
(origin
(method url-fetch/tarbomb)
@@ -626,29 +982,30 @@ network adapters.")
(string-replace-substring broadcom-sta-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"
- ;; source: https://github.com/NixOS/nixpkgs/commit/8ce65087c333097ab714d23800b69fc471ec48ca
- "broadcom-sta-linux-5.6.patch"
- "broadcom-sta-linux-5.9.patch"
- "broadcom-sta-linux-5.10.patch")))
+ ;; Keep these in sync with the list at
+ ;; https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/broadcom-sta.
+ ;; Nixpkgs is good about keeping broadcom patches up to date so updating
+ ;; for a new kernel release should be as simple as chaging the commit to
+ ;; the newest available and adding any new patches.
+ (let ((commit "355042e2ff5933b245e804c5eaff4ec3f340e71b"))
+ (list
+ (broadcom-sta-patch "i686-build-failure" commit "1522w2gb698svlkb2b4lijbd740agvs2ibpz4g0jlv8v31cybkf4")
+ (broadcom-sta-patch "license" commit "0rwlhafcmpp97cknqwv8gwf8sbxgqavgci1ywfkdxiylh4mhcvhr")
+ (broadcom-sta-patch "linux-4.7" commit "1nn1p6j77s9zfpxy5gl6qg1kha45pc7ww0yfkn5dmhazi288wamf")
+ (broadcom-sta-patch "linux-4.8" commit "0bjx4ayi30jbdm3sh38p52d6dnb3c44mqzqi8g51hhbn1kghkmq9")
+ (broadcom-sta-patch "linux-4.11" commit "1s3n87v9cn3qicd5v4wzj20psl4gcn1ghz0fnsq60n05rriicywp")
+ (broadcom-sta-patch "linux-4.12" commit "1kj7sfnw9hxjxzqm48565vniq7fkhapaqadfpw6l9bcnpf53xld3")
+ (broadcom-sta-patch "linux-4.15" commit "0bvk7nrvqa066dpn6vvb6x00yrxa37iqv87135kay9mllmkjd70b")
+ (broadcom-sta-patch "linux-5.1" commit "1kykpzhs19dwww6grav3qxsd28kn8y84i4b4csx2y5m2j629ncn0")
+ (broadcom-sta-patch "linux-5.6" commit "0v1jkaf60jgjkrjfcmx1gin4b65cdv39glqy7l3cswkmzb60lz4l")
+ (broadcom-sta-patch "linux-5.9" commit "1sgmbaahydk4j3i1jf8q1fz3a210fmakrpz0w1n9v3dcn23ladah")
+ (broadcom-sta-patch "linux-5.17" commit "1qsllvykhs3nvjwv8d6bgsm2sc9a1lxf8yqf6fa99p60ggd253ps")
+ (broadcom-sta-patch "linux-5.18" commit "1img0a0vqnkmq4c21aywq2ajyigzcfhbbpg1hw9nx7cbj9hf6d0l")
+ (broadcom-sta-patch "linux-6.0" commit "0rv74j5giafzl19f01yvfa5rgvsdvcimxzhks2fp44wpnxq241nb")
+ (broadcom-sta-patch "linux-6.1" commit "1pvx1h7iimcbfqdc13n1980ngxk9q6iyip8svn293x4h7jn472kf")
+ (broadcom-sta-patch "pedantic-fix" commit "1kxmw1iyxnfwad75h981sak5qk16p81xy1f2qxss2d0v97vkfkl5")
+ (broadcom-sta-patch "null-pointer-fix" commit "15c2vxgf7v5wy4s8w9jk7irf3fxxghy05gxmav1ss73a2azajdx7")
+ (broadcom-sta-patch "gcc" commit "0jcqk2vapyy2pbsjv9n8b3qp6vqz17d6s07cr04cx7075q7yhz5h"))))
(sha256
(base32
"1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz"))))
@@ -674,7 +1031,7 @@ network adapters.")
(_ broadcom-sta-i686-source)))
(build-system linux-module-build-system)
(arguments
- `(#:linux ,linux-lts
+ `(#:linux ,linux
#:tests? #f))
(supported-systems '("i686-linux" "x86_64-linux"))
(home-page "https://www.broadcom.com/support/802.11")
@@ -695,10 +1052,7 @@ Linux device driver for the following chipsets:
@item BCM4331
@item BCM4352
@item BCM4360
-@end itemize
-
-It is recommended that anyone who uses this package stays with Linux LTS
-releases.")
+@end itemize")
(license (nonfree "https://www.broadcom.com/support/802.11"))))
(define-public broadcom-bt-firmware
@@ -793,10 +1147,44 @@ chipsets from Broadcom:
"/b60fa04881bf8f9b9d578f57d1dfa596cae2a82e"
"/LICENSE.broadcom_bcm20702")))))
+(define-public facetimehd
+ (package
+ (name "facetimehd")
+ (version "0.6.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/patjak/facetimehd")
+ (commit version)))
+ (file-name (git-file-name "facetimehd" version))
+ (sha256
+ (base32
+ "18x12g55bw99ap9cw54v50s5m39dli4nx41jfhb35551mn0jp4c7"))))
+ (build-system linux-module-build-system)
+ (arguments
+ '(#:tests? #f))
+ (synopsis "Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam")
+ (description "Linux driver for the FacetimeHD webcam. According to Apple the
+following models contain a Facetime HD camera and should be compatible with this
+driver:
+@itemize
+@item iMac (21,5\", since mid 2011)
+@item iMac (27\", since mid 2011)
+@item MacBook Air (since mid 2011)
+@item MacBook Pro (15\", since early 2011)
+@item MacBook Pro (17\", since early 2011)
+@item MacBook Pro (13\", since early 2011)
+@item Thunderbolt display
+@end itemize")
+ (home-page "https://github.com/patjak/facetimehd")
+ (license gpl2)
+ (supported-systems '("i686-linux" "x86_64-linux"))))
+
(define-public intel-microcode
(package
(name "intel-microcode")
- (version "20221108")
+ (version "20240312")
(source
(origin
(method git-fetch)
@@ -807,15 +1195,15 @@ chipsets from Broadcom:
(commit (string-append "microcode-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1na797jixcwj27brzfy24lwgndc041kbnf1wh1l047nz7nnc35i5"))))
+ (base32 "1j1krkmp9kxmpq8bbbld8bm3y9rqhmlj5qfm43czikawnpw81571"))))
(build-system copy-build-system)
(arguments
- `(#:install-plan
- (let ((doc (string-append "share/doc/" ,name "-" ,version "/")))
- `(("intel-ucode" "lib/firmware/")
- ("README.md" ,doc)
- ("releasenote.md" ,doc)
- ("security.md" ,doc)))))
+ (list #:install-plan
+ #~(let ((doc (string-append "share/doc/" #$name "-" #$version "/")))
+ `(("intel-ucode" "lib/firmware/")
+ ("README.md" ,doc)
+ ("releasenote.md" ,doc)
+ ("security.md" ,doc)))))
(home-page
"https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files")
(synopsis "Processor microcode firmware for Intel CPUs")
@@ -831,12 +1219,12 @@ your CPU.")
(inherit linux-firmware)
(name "amd-microcode")
(arguments
- `(#:license-file-regexp "LICENSE.amd-ucode"
- ,@(substitute-keyword-arguments (package-arguments linux-firmware)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'select-firmware
- ,(select-firmware "^amd-ucode/")))))))
+ (cons* #:license-file-regexp "LICENSE.amd-ucode"
+ (substitute-keyword-arguments (package-arguments linux-firmware)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'select-firmware
+ #$(select-firmware "^amd-ucode/")))))))
(synopsis "Processor microcode firmware for AMD CPUs")
(description "Updated system processor microcode for AMD x86-64
processors. AMD releases microcode updates to correct processor behavior as
@@ -849,7 +1237,7 @@ documented in the respective processor revision guides.")
(define-public sof-firmware
(package
(name "sof-firmware")
- (version "2.2.2")
+ (version "2.2.6")
(source
(origin
(method url-fetch)
@@ -857,7 +1245,7 @@ documented in the respective processor revision guides.")
version "/sof-bin-v" version ".tar.gz"))
(sha256
(base32
- "1h7waw7ia3xjaprlvkcycamphnpcalrr2sjkhm59w7npwclqzwq0"))))
+ "018901g5hshrqf2d0rn7yhzxcy4gmdc4v6167df880kdcfkw48lk"))))
(build-system copy-build-system)
(arguments
`(#:install-plan
@@ -870,44 +1258,3 @@ audio DSPs that can be found on the Intel Skylake architecture. This
firmware can be built from source but need to be signed by Intel in order to be
loaded by Linux.")
(license bsd-3)))
-
-(define-public rtl8821ce-linux-module
- (let ((commit "50c1b120b06a3b0805e23ca9a4dbd274d74bb305")
- (revision "8"))
- (package
- (name "rtl8821ce-linux-module")
- (version (git-version "0.0.0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/tomaspinho/rtl8821ce")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "09dsmbsrpnbpbq4kigq324s8xb567pdjyb5h07kg6xcbcb5npkpz"))))
- (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)) ; no test suite
- (home-page "https://github.com/tomaspinho/rtl8821ce")
- (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters")
- (description "This is Realtek's RTL8821CE Linux driver for wireless
-network adapters.")
- (license gpl2))))
diff --git a/nongnu/packages/lisp.scm b/nongnu/packages/lisp.scm
index a6c6948..d868a5f 100644
--- a/nongnu/packages/lisp.scm
+++ b/nongnu/packages/lisp.scm
@@ -1,31 +1,23 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2023, 2024 André A. Gomes <andremegafone@gmail.com>
(define-module (nongnu packages lisp)
#:use-module (ice-9 match)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages lisp)
+ #:use-module (gnu packages lisp-xyz)
+ #:use-module (nongnu packages electron)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system asdf)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (nonguix build-system binary)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module ((nonguix licenses) #:prefix license:))
;; TODO: Split into differents outputs:
@@ -53,7 +45,7 @@
"/acl" version "express-" arch2 ".tbz2")))
(sha256
(base32
- "0ir1irpq5hhcmy0yp5p2jpnq5if1gr1fgxybqyvppx1j1jdfkcsp"))))
+ "1zxajn238aibsv0qknm5kiqjiplb4ggynjsxar390rwznh57qc46"))))
(build-system binary-build-system)
(inputs (list bash-minimal zlib openssl))
(arguments
@@ -75,6 +67,16 @@
"--directory=source" "-xvf" (assoc-ref inputs "source")
"--strip-components" "1")
(chdir "source")))
+ (add-after 'install 'update-license
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute*
+ (string-append (assoc-ref outputs "out")
+ "/share/allegro-cl/devel.lic")
+ ((";; License created on January 25, 2021, 8:32:19\\.")
+ ";; License created on January 17, 2023, 10:42:54.")
+ ((";; Expiration date: 2023-1-31 00:00:00")
+ ";; Expiration date: 2024-1-31 00:00:00"))
+ #t))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -119,3 +121,45 @@ then open a browser at http://localhost:PORT, where PORT is the indicated port."
(home-page "https://franz.com/products/allegrocl/")
(license (license:nonfree
"https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf"))))
+
+(define-public sbcl-cl-electron
+ (let ((commit "f2245dc1450a6ad416984cf932be50e00957390a")
+ (revision "3"))
+ (package
+ (name "sbcl-cl-electron")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atlas-engineer/cl-electron")
+ (commit commit)))
+ (file-name (git-file-name "cl-electron" version))
+ (sha256
+ (base32 "0c18xbwwnjaiwzd01dprdrwzp27nwihaf7pmkql1f5yk43x3ajs0"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs (list electron
+ sbcl-cl-json sbcl-iolib sbcl-cl-str sbcl-nclasses
+ sbcl-cl-ppcre sbcl-bordeaux-threads sbcl-lparallel
+ sbcl-parenscript sbcl-spinneret))
+ (arguments
+ '(#:tests? #f
+ #:asd-systems '("cl-electron" "cl-electron/demos")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "source/core.lisp"
+ (("\"electron\"")
+ (string-append "\"" (assoc-ref inputs "electron") "/bin/electron\""))))))))
+ (synopsis "Common Lisp interface to Electron")
+ (home-page "https://github.com/atlas-engineer/cl-electron")
+ (description "@command{cl-electron} is a binding to Electron for
+Common Lisp.")
+ (license license:bsd-3))))
+
+(define-public cl-electron
+ (sbcl-package->cl-source-package sbcl-cl-electron))
+
+(define-public ecl-cl-electron
+ (sbcl-package->ecl-package sbcl-cl-electron))
diff --git a/nongnu/packages/messaging.scm b/nongnu/packages/messaging.scm
index dd73744..e300915 100644
--- a/nongnu/packages/messaging.scm
+++ b/nongnu/packages/messaging.scm
@@ -1,40 +1,25 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021, 2022 PantherX OS Team <team@pantherx.org>
-;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022, 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Evgenii Lepikhin <johnlepikhin@gmail.com>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
-
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2023 Raven Hallsby <karl@hallsby.org>
(define-module (nongnu packages messaging)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages cups)
- #:use-module (gnu packages databases)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages kerberos)
#:use-module (gnu packages linux)
#:use-module (gnu packages nss)
#:use-module (gnu packages pulseaudio)
- #:use-module (gnu packages qt)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -44,13 +29,14 @@
#:use-module (guix utils)
#:use-module ((guix licenses) :prefix license:)
#:use-module (nonguix build-system binary)
+ #:use-module (nonguix build-system chromium-binary)
#:use-module ((nonguix licenses) :prefix license:)
#:use-module (ice-9 match))
(define-public element-desktop
(package
(name "element-desktop")
- (version "1.11.15")
+ (version "1.11.64")
(source
(origin
(method url-fetch)
@@ -59,105 +45,39 @@
"https://packages.riot.im/debian/pool/main/e/" name "/" name "_" version
"_amd64.deb"))
(sha256
- (base32 "0hpvmfncsmxlvhk6vjwkghw5lypmryzg21zih215nn1faqx2iy3a"))))
+ (base32 "043017i51kdpb6aqz7542dyrdw8d6jhqd9zw6v1c63phh1633y56"))))
(supported-systems '("x86_64-linux"))
- (build-system binary-build-system)
+ (build-system chromium-binary-build-system)
(arguments
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
- #:patchelf-plan
- #~'(("lib/Element/element-desktop"
- ("alsa-lib" "at-spi2-atk" "at-spi2-core" "atk" "cairo" "cups"
- "dbus" "expat" "fontconfig-minimal" "gcc" "gdk-pixbuf" "glib"
- "gtk+" "libdrm" "libnotify" "libsecret" "libx11" "libxcb"
- "libxcomposite" "libxcursor" "libxdamage" "libxext" "libxfixes"
- "libxi" "libxkbcommon" "libxkbfile" "libxrandr" "libxrender"
- "libxtst" "mesa" "nspr" "pango" "zlib")))
+ #:wrapper-plan
+ #~'("lib/Element/element-desktop")
#:phases
#~(modify-phases %standard-phases
- (replace 'unpack
+ (add-after 'binary-unpack 'setup-cwd
(lambda _
- (invoke "ar" "x" #$source)
- (invoke "tar" "xvf" "data.tar.xz")
(copy-recursively "usr/" ".")
;; Use the more standard lib directory for everything.
(rename-file "opt/" "lib")
;; Remove unneeded files.
(delete-file-recursively "usr")
- (delete-file "control.tar.gz")
- (delete-file "data.tar.xz")
- (delete-file "debian-binary")
;; Fix the .desktop file binary location.
(substitute* '("share/applications/element-desktop.desktop")
(("/opt/Element/")
- (string-append #$output "/lib/Element/")))))
- (add-after 'install 'symlink-binary-file-and-cleanup
+ (string-append #$output "/bin/")))))
+ (add-after 'install 'symlink-binary-file
(lambda _
- (delete-file (string-append #$output "/environment-variables"))
(mkdir-p (string-append #$output "/bin"))
(symlink (string-append #$output "/lib/Element/element-desktop")
(string-append #$output "/bin/element-desktop"))))
- (add-after 'install 'wrap-where-patchelf-does-not-work
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
(lambda _
(wrap-program (string-append #$output "/lib/Element/element-desktop")
- `("FONTCONFIG_PATH" ":" prefix
- (,(string-join
- (list
- (string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
- #$output)
- ":")))
`("LD_LIBRARY_PATH" ":" prefix
(,(string-join
(list
- (string-append #$(this-package-input "nss") "/lib/nss")
- (string-append #$(this-package-input "eudev") "/lib")
- (string-append #$(this-package-input "gcc") "/lib")
- (string-append #$(this-package-input "mesa") "/lib")
- (string-append #$(this-package-input "libxkbfile") "/lib")
- (string-append #$(this-package-input "zlib") "/lib")
- (string-append #$(this-package-input "libsecret") "/lib")
- (string-append #$(this-package-input "sqlcipher") "/lib")
- (string-append #$(this-package-input "libnotify") "/lib")
- (string-append #$output "/lib/Element")
- #$output)
+ (string-append #$output "/lib/Element"))
":")))))))))
- (native-inputs (list tar))
- (inputs
- (list alsa-lib
- at-spi2-atk
- at-spi2-core
- atk
- cairo
- cups
- dbus
- eudev
- expat
- fontconfig
- `(,gcc "lib")
- glib
- gtk+
- libdrm
- libnotify
- librsvg
- libsecret
- libx11
- libxcb
- libxcomposite
- libxcursor
- libxdamage
- libxext
- libxfixes
- libxi
- libxkbcommon
- libxkbfile
- libxrandr
- libxrender
- libxtst
- mesa
- nspr
- nss
- pango
- sqlcipher
- zlib))
(home-page "https://github.com/vector-im/element-desktop")
(synopsis "Matrix collaboration client for desktop")
(description "Element Desktop is a Matrix client for desktop with Element Web at
@@ -170,109 +90,48 @@ its core.")
(define-public signal-desktop
(package
(name "signal-desktop")
- (version "5.63.1")
+ (version "7.4.0")
(source
(origin
(method url-fetch)
(uri
(string-append
- "https://updates.signal.org/desktop/apt/pool/main/s/" name "/" name "_" version
+ "https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
"_amd64.deb"))
(sha256
- (base32 "1y94iikm6ckbs28vpcx4alriypjk14vzaf3sgwyqs4a5cj6rhdzv"))))
+ (base32 "069k7kcg8h16q0mm1bqdf7x66qji653apgwhnb52kdqsfzr1ibzm"))))
(supported-systems '("x86_64-linux"))
- (build-system binary-build-system)
+ (build-system chromium-binary-build-system)
(arguments
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
- #:patchelf-plan
- #~'(("lib/Signal/signal-desktop"
- ("alsa-lib" "at-spi2-atk" "at-spi2-core" "atk" "cairo" "cups"
- "dbus" "expat" "fontconfig-minimal" "gcc" "gdk-pixbuf" "glib"
- "gtk+" "libdrm" "libsecret" "libx11" "libxcb" "libxcomposite"
- "libxcursor" "libxdamage" "libxext" "libxfixes" "libxi"
- "libxkbcommon" "libxkbfile" "libxrandr" "libxshmfence" "libxtst"
- "mesa" "nspr" "pango" "pulseaudio" "zlib")))
+ #:wrapper-plan
+ #~'("lib/Signal/signal-desktop")
#:phases
#~(modify-phases %standard-phases
- (replace 'unpack
+ (add-after 'binary-unpack 'setup-cwd
(lambda _
- (invoke "ar" "x" #$source)
- (invoke "tar" "xvf" "data.tar.xz")
(copy-recursively "usr/" ".")
;; Use the more standard lib directory for everything.
(rename-file "opt/" "lib")
;; Remove unneeded files.
(delete-file-recursively "usr")
- (delete-file "control.tar.gz")
- (delete-file "data.tar.xz")
- (delete-file "debian-binary")
- (delete-file "environment-variables")
;; Fix the .desktop file binary location.
(substitute* '("share/applications/signal-desktop.desktop")
(("/opt/Signal/")
- (string-append #$output "/lib/Signal/")))))
- (add-after 'install 'symlink-binary-file-and-cleanup
+ (string-append #$output "/bin/")))))
+ (add-after 'install 'symlink-binary-file
(lambda _
- (delete-file (string-append #$output "/environment-variables"))
(mkdir-p (string-append #$output "/bin"))
(symlink (string-append #$output "/lib/Signal/signal-desktop")
(string-append #$output "/bin/signal-desktop"))))
- (add-after 'install 'wrap-where-patchelf-does-not-work
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
(lambda _
(wrap-program (string-append #$output "/lib/Signal/signal-desktop")
- `("FONTCONFIG_PATH" ":" prefix
- (,(string-join
- (list
- (string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
- #$output)
- ":")))
`("LD_LIBRARY_PATH" ":" prefix
(,(string-join
(list
- (string-append #$(this-package-input "nss") "/lib/nss")
- (string-append #$(this-package-input "eudev") "/lib")
- (string-append #$(this-package-input "gcc") "/lib")
- (string-append #$(this-package-input "mesa") "/lib")
- (string-append #$(this-package-input "libxkbfile") "/lib")
- (string-append #$(this-package-input "pulseaudio") "/lib")
- (string-append #$(this-package-input "zlib") "/lib")
- (string-append #$(this-package-input "libsecret") "/lib")
- (string-append #$output "/lib/Signal")
- #$output)
+ (string-append #$output "/lib/Signal"))
":")))))))))
- (native-inputs (list tar))
- (inputs (list alsa-lib
- at-spi2-atk
- at-spi2-core
- atk
- cairo
- cups
- dbus
- eudev
- expat
- fontconfig
- `(,gcc "lib")
- glib
- gtk+
- libdrm
- librsvg
- libsecret
- libx11
- libxcb
- libxcomposite
- libxdamage
- libxext
- libxfixes
- libxkbcommon
- libxkbfile
- libxrandr
- libxshmfence
- mesa
- nspr
- nss
- pango
- pulseaudio
- zlib))
(home-page "https://signal.org/")
(synopsis "Private messenger using the Signal protocol")
(description "Signal Desktop is an Electron application that links with Signal on Android
@@ -285,19 +144,21 @@ or iOS.")
(define-public zoom
(package
(name "zoom")
- (version "5.12.2.4816")
+ (version "5.17.5.2543")
(source
(origin
(method url-fetch)
(uri (string-append "https://cdn.zoom.us/prod/" version "/zoom_x86_64.tar.xz"))
(file-name (string-append name "-" version "-x86_64.tar.xz"))
(sha256
- (base32 "0vxlvxp0jzpc5xsh9wlxc74466i5ipg3fwpi0kv03rl8ib8y1n7p"))))
+ (base32 "06m53d3jrpiq1z5wd7m61lb3w8m8g72iaqx5sixnzn290gyyzgim"))))
(supported-systems '("x86_64-linux"))
(build-system binary-build-system)
(arguments
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
#:patchelf-plan
+ ;; Note: it seems like some (all?) of these only do anything in
+ ;; LD_LIBRARY_PATH, or at least needed there as well.
#~(let ((libs '("alsa-lib"
"at-spi2-atk"
"at-spi2-core"
@@ -337,6 +198,8 @@ or iOS.")
("lib/zoom/zoom"
,libs)
("lib/zoom/zopen"
+ ,libs)
+ ("lib/zoom/aomhost"
,libs)))
#:phases
#~(modify-phases %standard-phases
@@ -364,6 +227,54 @@ or iOS.")
"libxrender"
"zlib")))))
(wrap-program (string-append #$output "/lib/zoom/zoom")
+ '("QML2_IMPORT_PATH" = ())
+ '("QT_PLUGIN_PATH" = ())
+ '("QT_SCREEN_SCALE_FACTORS" = ())
+ `("FONTCONFIG_PATH" ":" prefix
+ (,(string-join
+ (list
+ (string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
+ #$output)
+ ":")))
+ `("LD_LIBRARY_PATH" prefix
+ ,(list (string-append #$(this-package-input "nss") "/lib/nss")
+ #$@(map (lambda (pkg)
+ (file-append (this-package-input pkg) "/lib"))
+ ;; TODO: Reuse this long list as it is
+ ;; needed for aomhost. Or perhaps
+ ;; aomhost has a shorter needed list,
+ ;; but untested.
+ '("alsa-lib"
+ "atk"
+ "at-spi2-atk"
+ "at-spi2-core"
+ "cairo"
+ "cups"
+ "dbus"
+ "eudev"
+ "expat"
+ "gcc"
+ "glib"
+ "mesa"
+ "mit-krb5"
+ "nspr"
+ "libxcb"
+ "libxcomposite"
+ "libxdamage"
+ "libxext"
+ "libxkbcommon"
+ "libxkbfile"
+ "libxrandr"
+ "libxshmfence"
+ "pango"
+ "pulseaudio"
+ "xcb-util"
+ "xcb-util-image"
+ "xcb-util-keysyms"
+ "xcb-util-wm"
+ "xcb-util-renderutil"
+ "zlib")))))
+ (wrap-program (string-append #$output "/lib/zoom/aomhost")
`("FONTCONFIG_PATH" ":" prefix
(,(string-join
(list
@@ -386,15 +297,23 @@ or iOS.")
"gcc"
"glib"
"mesa"
+ "mit-krb5"
"nspr"
+ "libxcb"
"libxcomposite"
"libxdamage"
+ "libxext"
"libxkbcommon"
"libxkbfile"
"libxrandr"
"libxshmfence"
"pango"
"pulseaudio"
+ "xcb-util"
+ "xcb-util-image"
+ "xcb-util-keysyms"
+ "xcb-util-wm"
+ "xcb-util-renderutil"
"zlib")))))))
(add-after 'wrap-where-patchelf-does-not-work 'rename-binary
;; IPC (for single sign-on and handling links) fails if the
@@ -410,6 +329,8 @@ or iOS.")
(lambda _
(delete-file (string-append #$output "/environment-variables"))
(mkdir-p (string-append #$output "/bin"))
+ (symlink (string-append #$output "/lib/zoom/aomhost")
+ (string-append #$output "/bin/aomhost"))
(symlink (string-append #$output "/lib/zoom/zoom")
(string-append #$output "/bin/zoom"))
(symlink (string-append #$output "/lib/zoom/zopen")
@@ -468,13 +389,16 @@ or iOS.")
libxrender
libxshmfence
mesa
+ mit-krb5
nspr
nss
pango
pulseaudio
- qtmultimedia
+ xcb-util
xcb-util-image
xcb-util-keysyms
+ xcb-util-renderutil
+ xcb-util-wm
zlib))
(home-page "https://zoom.us/")
(synopsis "Video conference client")
diff --git a/nongnu/packages/mozilla.scm b/nongnu/packages/mozilla.scm
index 636219b..0588ad6 100644
--- a/nongnu/packages/mozilla.scm
+++ b/nongnu/packages/mozilla.scm
@@ -1,4 +1,4 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver <mhw@netris.org>
@@ -14,27 +14,13 @@
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
-;;; Copyright © 2020-2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020-2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
-;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2021, 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2023 Tomas Volf <wolf@wolfsden.cz>
(define-module (nongnu packages mozilla)
#:use-module (guix build-system gnu)
@@ -60,6 +46,7 @@
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages hunspell)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages jemalloc)
@@ -67,7 +54,6 @@
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
- #:use-module (gnu packages libreoffice) ;for hunspell
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages m4)
@@ -79,6 +65,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages rust)
#:use-module (gnu packages rust-apps)
+ #:use-module (gnu packages speech)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages video)
#:use-module (nongnu packages wasm)
@@ -90,177 +77,39 @@
;; https://searchfox.org under the particular firefox release, like
;; mozilla-esr102.
(define-public rust-firefox-esr rust) ; 1.60 is the default in Guix
-(define-public rust-firefox (@@ (gnu packages rust) rust-1.61)) ; 1.63 is also listed, but 1.61 is the minimum needed
+(define-public rust-firefox rust) ; 1.65 is the minimum
-;; rust-cbindgen-0.23/0.24 dependencies
-(define-public rust-unicode-ident-1
+(define icu4c-73
(package
- (name "rust-unicode-ident")
- (version "1.0.3")
+ (inherit icu4c)
+ (version "73.1")
(source (origin
(method url-fetch)
- (uri (crate-uri "unicode-ident" version))
- (file-name (string-append name "-" version ".tar.gz"))
+ (uri (string-append
+ "https://github.com/unicode-org/icu/releases/download/release-"
+ (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
+ "/icu4c-"
+ (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
+ "-src.tgz"))
(sha256
(base32
- "1bqswc96ws8l6k7xx56dg521a3l5imi3mhlcz7rsi6a92mxb7xf4"))))
- (build-system cargo-build-system)
- (arguments
- `(#:skip-build? #t))
- (home-page "https://github.com/dtolnay/unicode-ident")
- (synopsis
- "Better optimized implementation of the older unicode-xid crate")
- (description
- "Determine whether characters have the XID_Start or XID_Continue properties
-according to Unicode Standard Annex #31")
- (license (list license:unicode license:expat))))
-
-(define-public rust-textwrap-0.15
- (package
- (inherit rust-textwrap-0.12)
- (name "rust-textwrap")
- (version "0.15.0")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "textwrap" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1yw513k61lfiwgqrfvsjw1a5wpvm0azhpjr2kr0jhnq9c56is55i"))))
- (arguments
- `(#:skip-build? #t
- #:cargo-inputs (("rust-hyphenation" ,rust-hyphenation-0.8)
- ("rust-smawk" ,rust-smawk-0.3)
- ("rust-terminal-size" ,rust-terminal-size-0.1)
- ("rust-unicode-linebreak" ,rust-unicode-linebreak-0.1)
- ("rust-unicode-width" ,rust-unicode-width-0.1))))))
+ "0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4"))))))
-(define-public rust-clap-lex-0.2
- (package
- (name "rust-clap-lex")
- (version "0.2.4")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "clap_lex" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1ib1a9v55ybnaws11l63az0jgz5xiy24jkdgsmyl7grcm3sz4l18"))))
- (build-system cargo-build-system)
- (arguments
- `(#:skip-build? #t
- #:cargo-inputs (("rust-os-str-bytes" ,rust-os-str-bytes-6))))
- (home-page "https://github.com/clap-rs/clap/tree/master/clap_lex")
- (synopsis "Minimal, flexible command line parser")
- (description "Minimal, flexible command line parser")
- (license (list license:expat license:asl2.0))))
-
-(define-public rust-clap-derive-3.2.15
- (package
- (inherit rust-clap-derive-3)
- (name "rust-clap-derive")
- (version "3.2.15")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "clap_derive" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1d2c4vs345fwihkd8cc7m6acbiydcwramkd5mnp36p0a7g6jm9cv"))))
- (arguments
- `(#:skip-build? #t
- #:cargo-inputs (("rust-heck" ,rust-heck-0.4)
- ("rust-proc-macro-error" ,rust-proc-macro-error-1)
- ("rust-proc-macro2" ,rust-proc-macro2-1)
- ("rust-quote" ,rust-quote-1)
- ("rust-syn" ,rust-syn-1))))))
-
-(define-public rust-clap-3.2.16
- (package
- (inherit rust-clap-3)
- (name "rust-clap")
- (version "3.2.16")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "clap" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1af06z8z7m3327yz1xvzxfjanclgpvvy3lssb745rig7adkbpnx3"))))
- (arguments
- `(#:skip-build? #t
- #:cargo-inputs (("rust-atty" ,rust-atty-0.2)
- ("rust-backtrace" ,rust-backtrace-0.3)
- ("rust-bitflags" ,rust-bitflags-1)
- ("rust-clap-derive" ,rust-clap-derive-3.2.15)
- ("rust-clap-lex" ,rust-clap-lex-0.2)
- ("rust-indexmap" ,rust-indexmap-1)
- ("rust-once-cell" ,rust-once-cell-1)
- ("rust-regex" ,rust-regex-1)
- ("rust-strsim" ,rust-strsim-0.10)
- ("rust-termcolor" ,rust-termcolor-1)
- ("rust-terminal-size" ,rust-terminal-size-0.1)
- ("rust-textwrap" ,rust-textwrap-0.15)
- ("rust-unicase" ,rust-unicase-2)
- ("rust-yaml-rust" ,rust-yaml-rust-0.4))))))
-
-(define-public rust-cbindgen-0.24
- (package
- (inherit rust-cbindgen-0.19)
- (name "rust-cbindgen")
- (version "0.24.3")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "cbindgen" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1yqxqsz2d0cppd8zwihk2139g5gy38wqgl9snj6rnk8gyvnqsdd6"))))
- (arguments
- `(#:cargo-inputs (("rust-clap" ,rust-clap-3.2.16)
- ("rust-heck" ,rust-heck-0.4)
- ("rust-indexmap" ,rust-indexmap-1)
- ("rust-log" ,rust-log-0.4)
- ("rust-proc-macro2" ,rust-proc-macro2-1)
- ("rust-quote" ,rust-quote-1)
- ("rust-serde" ,rust-serde-1)
- ("rust-serde-json" ,rust-serde-json-1)
- ("rust-syn" ,rust-syn-1)
- ("rust-tempfile" ,rust-tempfile-3)
- ("rust-toml" ,rust-toml-0.5))
- #:cargo-development-inputs (("rust-serial-test" ,rust-serial-test-0.5))))))
-
-;; Bug with firefox build (v101-102) with cbindgen-0.24, see
-;; https://bugzilla.mozilla.org/show_bug.cgi?id=1773259#c5 for possible patch
-;; (untested)
-(define-public rust-cbindgen-0.23
- (package
- (inherit rust-cbindgen-0.24)
- (name "rust-cbindgen")
- (version "0.23.0")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "cbindgen" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "006rn3fn4njayjxr2vd24g1awssr9i3894nbmfzkybx07j728vav"))))))
-
-;; Update this id with every firefox update to it's release date.
-;; It's used for cache validation and therefor can lead to strange bugs.
-(define %firefox-esr-build-id "20221115000000")
+;; Update this id with every firefox update to its release date.
+;; It's used for cache validation and therefore can lead to strange bugs.
+(define %firefox-esr-build-id "20240415130026")
(define-public firefox-esr
(package
(name "firefox-esr")
- (version "102.5.0esr")
+ (version "115.10.0esr")
(source
(origin
(method url-fetch)
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
version "/source/firefox-" version ".source.tar.xz"))
(sha256
- (base32 "1n2pq165fxmvgcr5mv3hhaid2vn7lh3jg03lf13kz4c5295x8z81"))))
+ (base32 "1wpf4vcrvnvhnfzqavbkzqbn51bds1l9f6ld4mzh9xwm7mrkrz8a"))))
(build-system gnu-build-system)
(arguments
(list
@@ -307,6 +156,7 @@ according to Unicode Standard Annex #31")
"--disable-elf-hack"))
#:imported-modules %cargo-utils-modules
#:modules `((ice-9 regex)
+ (ice-9 string-fun)
(ice-9 ftw)
(srfi srfi-1)
(srfi srfi-26)
@@ -383,6 +233,22 @@ according to Unicode Standard Annex #31")
(substitute* "build/RunCbindgen.py"
(("\"--frozen\",") ""))))
(delete 'bootstrap)
+ (add-before 'configure 'patch-SpeechDispatcherService.cpp
+ (lambda _
+ (let* ((lib "libspeechd.so.2")
+ (file "dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp")
+ (old-content (call-with-input-file file get-string-all)))
+ (substitute
+ file
+ `((,(format #f "~s" lib)
+ . ,(lambda (line _)
+ (string-replace-substring
+ line
+ lib
+ (string-append #$speech-dispatcher "/lib/" lib))))))
+ (if (string=? old-content
+ (call-with-input-file file get-string-all))
+ (error "substitute did nothing, phase requires an update")))))
(add-before 'configure 'set-build-id
;; Firefox will write the timestamp to output, which is harmful
;; for reproducibility, so change it to a fixed date. Use a
@@ -571,7 +437,7 @@ according to Unicode Standard Annex #31")
gtk+
gtk+-2
hunspell
- icu4c-71
+ icu4c-73
jemalloc
libcanberra
libevent
@@ -595,8 +461,9 @@ according to Unicode Standard Annex #31")
pipewire
pixman
pulseaudio
- startup-notification
+ speech-dispatcher
sqlite
+ startup-notification
eudev
unzip
zip
@@ -611,12 +478,12 @@ according to Unicode Standard Annex #31")
wasm32-wasi-clang-toolchain
m4
nasm
- node
+ node-lts
perl
pkg-config
python
rust-firefox-esr
- rust-cbindgen-0.23
+ rust-cbindgen-0.24
which
yasm))
(home-page "https://mozilla.org/firefox/")
@@ -663,71 +530,46 @@ MOZ_ENABLE_WAYLAND=1 exec ~a $@\n"
((firefox) out))
#t))))))
-;; Update this id with every firefox update to it's release date.
-;; It's used for cache validation and therefor can lead to strange bugs.
-(define %firefox-build-id "20221115000000")
+;; Update this id with every firefox update to its release date.
+;; It's used for cache validation and therefore can lead to strange bugs.
+(define %firefox-build-id "20240429124342")
(define-public firefox
(package
(inherit firefox-esr)
(name "firefox")
- (version "107.0")
+ (version "125.0.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
version "/source/firefox-" version ".source.tar.xz"))
(sha256
- (base32 "0jjqarvs5ppyb3395rs4i39cb55li8q8ha9w72zyjmvv75d2wmla"))))
+ (base32 "05jnpnc0qym08f7rlapjm36g729445k3nba2rvf4a0sabsw6c726"))))
(arguments
(substitute-keyword-arguments (package-arguments firefox-esr)
((#:phases phases)
#~(modify-phases #$phases
(replace 'set-build-id
(lambda _
- (setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))))))
+ (setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))
+ (replace 'remove-cargo-frozen-flag
+ (lambda _
+ ;; Remove --frozen flag from cargo invokation, otherwise it'll
+ ;; complain that it's not able to change Cargo.lock.
+ ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
+ (substitute* "build/RunCbindgen.py"
+ (("args.append\\(\"--frozen\"\\)") "pass"))))))))
(native-inputs
(modify-inputs (package-native-inputs firefox-esr)
(replace "rust" rust-firefox)
(replace "rust:cargo" `(,rust-firefox "cargo"))
- (replace "node" node-lts)
- (replace "rust-cbindgen" rust-cbindgen-0.24)))
+ (replace "rust-cbindgen" rust-cbindgen-0.26)))
(description
"Full-featured browser client built from Firefox source tree, without
the official icon and the name \"firefox\".")))
-(define-public firefox/wayland
- (package
- (inherit firefox)
- (name "firefox-wayland")
- (native-inputs '())
- (inputs
- `(("bash" ,bash-minimal)
- ("firefox" ,firefox)))
- (build-system trivial-build-system)
- (arguments
- '(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((bash (assoc-ref %build-inputs "bash"))
- (firefox (assoc-ref %build-inputs "firefox"))
- (out (assoc-ref %outputs "out"))
- (exe (string-append out "/bin/firefox")))
- (mkdir-p (dirname exe))
-
- (call-with-output-file exe
- (lambda (port)
- (format port "#!~a
-MOZ_ENABLE_WAYLAND=1 exec ~a $@\n"
- (string-append bash "/bin/bash")
- (string-append firefox "/bin/firefox"))))
- (chmod exe #o555)
-
- ;; Provide the manual and .desktop file.
- (copy-recursively (string-append firefox "/share")
- (string-append out "/share"))
- (substitute* (string-append
- out "/share/applications/firefox.desktop")
- ((firefox) out))
- #t))))))
+;; As of Firefox 121.0, Firefox uses Wayland by default. This means we no
+;; longer need a seperate package for Firefox on Wayland.
+(define-public firefox-wayland
+ (deprecated-package "firefox-wayland" firefox))
diff --git a/nongnu/packages/music.scm b/nongnu/packages/music.scm
new file mode 100644
index 0000000..dffd758
--- /dev/null
+++ b/nongnu/packages/music.scm
@@ -0,0 +1,103 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2022 Sughosha <sughosha@proton.me>
+;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+
+(define-module (nongnu packages music)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages cpp)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages linux)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 regex)
+ #:use-module ((nonguix licenses) #:prefix license:)
+ #:use-module (nonguix build-system binary))
+
+(define-public reaper
+ (package
+ (name "reaper")
+ (version "6.73")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.reaper.fm/files/"
+ (version-major version)
+ ".x/reaper"
+ (string-replace-substring version "." "")
+ "_"
+ (match (%current-system)
+ ("x86_64-linux" "linux_x86_64")
+ ("i686-linux" "linux_i686")
+ ("aarch64-linux" "linux_aarch64")
+ ("armhf-linux" "linux_armv7l"))
+ ".tar.xz"))
+ (sha256
+ (base32
+ (match (%current-system)
+ ("x86_64-linux" "1hd7fbk0px45fxhqa7nqcnij8ls2fhpjp60v840vy2zqs9fkcr52")
+ ("i686-linux" "11vk32mxyda9xl08pp2ivd1vsahnw6w7d08in4syz6iannfwp19b")
+ ("aarch64-linux" "0zpkaiwwxn8yh3s1d22qswshbgaxx5d8iy17hb3w256zgb722yjw")
+ ("armhf-linux" "18174b1lgsk73gxhala471ppzbrpa1cs953b5par998yqgh74znk"))))))
+ (build-system binary-build-system)
+ (arguments
+ (list #:strip-binaries? #f ;allocated section `.dynsym' not in segment
+ #:patchelf-plan #~`(("REAPER/reaper" ("libc" "gcc" "alsa-lib"))
+ ("REAPER/reamote-server" ("libc" "gcc"))
+ ("REAPER/Plugins/reaper_host_x86_64" ("libc" "gcc")))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((target (string-append #$output "/opt"))
+ (bin (string-append #$output "/bin"))
+ (libexec (string-append #$output "/libexec"))
+ (data (string-append #$output "/share"))
+ (doc (string-append data "/doc/reaper-"
+ #$version)))
+ (setenv "HOME" "/tmp")
+ (setenv "XDG_DATA_HOME" data)
+ (invoke "sh" "./install-reaper.sh" "--install"
+ target "--integrate-user-desktop")
+ (delete-file (string-append target
+ "/REAPER/uninstall-reaper.sh"))
+ (delete-file (string-append target
+ "/REAPER/libSwell.so"))
+ (symlink (search-input-file inputs
+ "/lib/libSwell.so")
+ (string-append target
+ "/REAPER/libSwell.so"))
+ (mkdir-p bin)
+ (symlink (string-append target "/REAPER/reaper")
+ (string-append bin "/reaper"))
+ (mkdir-p libexec)
+ (symlink (string-append target
+ "/REAPER/Plugins/reaper_host_x86_64")
+ (string-append libexec
+ "/reaper_host_x86_64"))
+ (mkdir-p doc)
+ (symlink (string-append target
+ "/REAPER/EULA.txt")
+ (string-append doc "/LICENSE"))))))))
+ (native-inputs
+ (list
+ which
+ xdg-utils))
+ (inputs
+ (list
+ alsa-lib
+ `(,gcc "lib")
+ wdl))
+ (supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux"
+ "armhf-linux"))
+ (home-page "https://www.reaper.fm")
+ (synopsis "Digital audio workstation")
+ (description
+ "REAPER is a digital audio production application offering multitrack
+audio and MIDI recording, editing, processing, mixing and mastering toolset.
+It supports a vast range of hardware, digital formats and plugins, and can be
+comprehensively extended, scripted and modified.")
+ (license (license:nonfree "file:///opt/REAPER/EULA.txt"))))
diff --git a/nongnu/packages/ncurses.scm b/nongnu/packages/ncurses.scm
index 5c27ae9..1a51d2c 100644
--- a/nongnu/packages/ncurses.scm
+++ b/nongnu/packages/ncurses.scm
@@ -1,4 +1,4 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
@@ -8,26 +8,13 @@
;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2022 B. Wilson <x@wilsonb.com>
-;;;
-;;; 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
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2022-2023 B. Wilson <x@wilsonb.com>
(define-module (nongnu packages ncurses)
#:use-module (gnu packages)
+ #:use-module (guix gexp)
#:use-module (guix licenses)
+ #:use-module (guix memoization)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -40,6 +27,17 @@
#:use-module (guix utils)
#:use-module (ice-9 match))
+(define ncurses-rollup-patch
+ (mlambda (version hash)
+ (origin
+ (method url-fetch)
+ (uri (match (string-split (version-major+minor+point version) #\.)
+ ((major minor point)
+ (string-append "https://invisible-mirror.net/archives"
+ "/ncurses/" major "." minor "/ncurses-"
+ major "." minor "-" point "-patch.sh.bz2"))))
+ (sha256 (base32 hash)))))
+
(define-public ncurses-5
(package
(name "ncurses")
@@ -57,172 +55,157 @@
"doc")) ;1 MiB of man pages
(arguments
(let ((patch-makefile-phase
- '(lambda _
- (for-each patch-makefile-SHELL
- (find-files "." "Makefile.in"))))
+ #~(lambda _
+ (for-each patch-makefile-SHELL
+ (find-files "." "Makefile.in"))))
(configure-phase
;; The 'configure' script does not understand '--docdir', so we must
;; override that and use '--mandir' instead.
- '(lambda* (#:key build target outputs configure-flags
- #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (apply invoke "./configure"
- (string-append "SHELL=" (which "sh"))
- (string-append "--build=" build)
- (string-append "--prefix=" out)
- (string-append "--mandir=" doc "/share/man")
- (if target
- (cons (string-append "--host=" target)
- configure-flags)
- configure-flags)))))
+ #~(lambda* (#:key build target outputs configure-flags
+ #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (apply invoke "./configure"
+ (string-append "SHELL=" (which "sh"))
+ (string-append "--build=" build)
+ (string-append "--prefix=" out)
+ (string-append "--mandir=" doc "/share/man")
+ (if target
+ (cons (string-append "--host=" target)
+ configure-flags)
+ configure-flags)))))
(apply-rollup-patch-phase
;; Ncurses distributes "stable" patchsets to be applied on top
;; of the release tarball. These are only available as shell
;; scripts(!) so we decompress and apply them in a phase.
;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
- '(lambda* (#:key inputs native-inputs #:allow-other-keys)
- (let ((rollup-patch (assoc-ref (or native-inputs inputs)
- "rollup-patch")))
- (when rollup-patch
- (copy-file rollup-patch
- (string-append (getcwd) "/rollup-patch.sh.bz2"))
- (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
- (invoke "sh" "rollup-patch.sh")))))
+ #~(lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((rollup-patch #$(ncurses-rollup-patch
+ (package-version this-package)
+ "16ny892yhimy6r4mmsgw3rcl0i15570ifn9c54g1ndyrk7kpmlgs")))
+ (copy-file rollup-patch
+ (string-append (getcwd) "/rollup-patch.sh.bz2"))
+ (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
+ (invoke "sh" "rollup-patch.sh"))))
(remove-shebang-phase
- '(lambda _
- ;; To avoid retaining a reference to the bootstrap Bash via the
- ;; shebang of the 'ncursesw6-config' script, simply remove that
- ;; shebang: it'll work just as well without it. Likewise, do not
- ;; retain a reference to the "doc" output.
- (substitute* "misc/ncurses-config.in"
- (("#!@SHELL@")
- "# No shebang here, use /bin/sh!\n")
- (("@SHELL@ \\$0")
- "$0")
- (("mandir=.*$")
- "mandir=share/man"))))
+ #~(lambda _
+ ;; To avoid retaining a reference to the bootstrap Bash via the
+ ;; shebang of the 'ncursesw6-config' script, simply remove that
+ ;; shebang: it'll work just as well without it. Likewise, do not
+ ;; retain a reference to the "doc" output.
+ (substitute* "misc/ncurses-config.in"
+ (("#!@SHELL@")
+ "# No shebang here, use /bin/sh!\n")
+ (("@SHELL@ \\$0")
+ "$0")
+ (("mandir=.*$")
+ "mandir=share/man"))))
(post-install-phase
- `(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; When building a wide-character (Unicode) build, create backward
- ;; compatibility links from the the "normal" libraries to the
- ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
- ,@(if (target-mingw?)
- '( ;; TODO: create .la files to link to the .dll?
- (with-directory-excursion (string-append out "/bin")
- (for-each
- (lambda (lib)
- (define lib.dll
- (string-append "lib" lib ".dll"))
- (define libw6.dll
- (string-append "lib" lib "w6.dll"))
+ #~(lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; When building a wide-character (Unicode) build, create backward
+ ;; compatibility links from the the "normal" libraries to the
+ ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
+ #$@(if (target-mingw?)
+ `( ;; TODO: create .la files to link to the .dll?
+ (with-directory-excursion (string-append out "/bin")
+ (for-each
+ (lambda (lib)
+ (define lib.dll
+ (string-append "lib" lib ".dll"))
+ (define libwx.dll
+ (string-append "lib" lib "w"
+ ,(version-major version) ".dll"))
- (when (file-exists? libw6.dll)
- (format #t "creating symlinks for `lib~a'~%" lib)
- (symlink libw6.dll lib.dll)))
- '("curses" "ncurses" "form" "panel" "menu"))))
- '())
- (with-directory-excursion (string-append out "/lib")
- (for-each (lambda (lib)
- (define libw.a
- (string-append "lib" lib "w.a"))
- (define lib.a
- (string-append "lib" lib ".a"))
+ (when (file-exists? libwx.dll)
+ (format #t "creating symlinks for `lib~a'~%" lib)
+ (symlink libw6.dll lib.dll)))
+ '("curses" "ncurses" "form" "panel" "menu"))))
+ #~())
+ (with-directory-excursion (string-append out "/lib")
+ (for-each (lambda (lib)
+ (define libw.a
+ (string-append "lib" lib "w.a"))
+ (define lib.a
+ (string-append "lib" lib ".a"))
- ,@(if (not (target-mingw?))
- `((define libw.so.x
- (string-append "lib" lib "w.so."
- ,(version-major version)))
- (define lib.so.x
- (string-append "lib" lib ".so."
- ,(version-major version)))
- (define lib.so
- (string-append "lib" lib ".so"))
- (define packagew.pc
- (string-append lib "w.pc"))
- (define package.pc
- (string-append lib ".pc")))
- '())
+ #$@(if (not (target-mingw?))
+ #~((define libw.so.x
+ (string-append "lib" lib "w.so."
+ #$(version-major version)))
+ (define lib.so.x
+ (string-append "lib" lib ".so."
+ #$(version-major version)))
+ (define lib.so
+ (string-append "lib" lib ".so"))
+ (define packagew.pc
+ (string-append lib "w.pc"))
+ (define package.pc
+ (string-append lib ".pc")))
+ #~())
- (when (file-exists? libw.a)
- (format #t "creating symlinks for `lib~a'~%" lib)
- (symlink libw.a lib.a)
- ,@(if (not (target-mingw?))
- '((symlink libw.so.x lib.so.x)
- (false-if-exception (delete-file lib.so))
- (call-with-output-file lib.so
- (lambda (p)
- (format p "INPUT (-l~aw)~%" lib)))
- (with-directory-excursion "pkgconfig"
- (format #t "creating symlink for `~a'~%"
- package.pc)
- (when (file-exists? packagew.pc)
- (symlink packagew.pc package.pc))))
- '())))
- '("curses" "ncurses" "form" "panel" "menu")))))))
- `(#:configure-flags
- ,(cons*
- 'quasiquote
- `(("--with-shared" "--without-debug" "--enable-widec"
+ (when (file-exists? libw.a)
+ (format #t "creating symlinks for `lib~a'~%" lib)
+ (symlink libw.a lib.a)
+ #$@(if (not (target-mingw?))
+ '((symlink libw.so.x lib.so.x)
+ (false-if-exception (delete-file lib.so))
+ (call-with-output-file lib.so
+ (lambda (p)
+ (format p "INPUT (-l~aw)~%" lib)))
+ (with-directory-excursion "pkgconfig"
+ (format #t "creating symlink for `~a'~%"
+ package.pc)
+ (when (file-exists? packagew.pc)
+ (symlink packagew.pc package.pc))))
+ #~())))
+ '("curses" "ncurses" "form" "panel" "menu")))))))
+ (list #:configure-flags
+ #~`("--with-shared" "--without-debug" "--enable-widec"
- "--enable-pc-files" "--with-versioned-syms=yes"
- ,(list 'unquote '(string-append "--with-pkg-config-libdir="
- (assoc-ref %outputs "out")
- "/lib/pkgconfig"))
+ "--enable-pc-files" "--with-versioned-syms=yes"
+ ,(string-append "--with-pkg-config-libdir="
+ #$output "/lib/pkgconfig")
- ;; By default headers land in an `ncursesw' subdir, which is not
- ;; what users expect.
- ,(list 'unquote '(string-append "--includedir=" (assoc-ref %outputs "out")
- "/include"))
- "--enable-overwrite" ;really honor --includedir
+ ;; By default headers land in an `ncursesw' subdir, which is not
+ ;; what users expect.
+ ,(string-append "--includedir=" #$output "/include")
+ "--enable-overwrite" ;really honor --includedir
- ;; Make sure programs like 'tic', 'reset', and 'clear' have a
- ;; correct RUNPATH.
- ,(list 'unquote '(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
- "/lib"))
+ ;; Make sure programs like 'tic', 'reset', and 'clear' have a
+ ;; correct RUNPATH.
+ ,(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
- ;; Starting from ncurses 6.1, "make install" runs "install -s"
- ;; by default, which doesn't work for cross-compiled binaries
- ;; because it invokes 'strip' instead of 'TRIPLET-strip'. Work
- ;; around this.
- ,@(if (%current-target-system) '("--disable-stripping") '())
+ ;; Starting from ncurses 6.1, "make install" runs "install -s"
+ ;; by default, which doesn't work for cross-compiled binaries
+ ;; because it invokes 'strip' instead of 'TRIPLET-strip'. Work
+ ;; around this.
+ #$@(if (%current-target-system) #~("--disable-stripping") #~())
- ;; Do not assume a default search path in ld, even if it is only to
- ;; filter it out in ncurses-config. Mainly because otherwise it ends
- ;; up using the libdir from binutils, which makes little sense and
- ;; causes an unnecessary runtime dependency.
- "cf_cv_ld_searchpath=/no-ld-searchpath"
+ ;; Do not assume a default search path in ld, even if it is only to
+ ;; filter it out in ncurses-config. Mainly because otherwise it ends
+ ;; up using the libdir from binutils, which makes little sense and
+ ;; causes an unnecessary runtime dependency.
+ "cf_cv_ld_searchpath=/no-ld-searchpath"
- ;; MinGW: Use term-driver created for the MinGW port.
- ,@(if (target-mingw?) '("--enable-term-driver") '()))))
- #:tests? #f ; no "check" target
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'apply-rollup-patch
- ,apply-rollup-patch-phase)
- (replace 'configure ,configure-phase)
- (add-after 'install 'post-install
- ,post-install-phase)
- (add-before 'configure 'patch-makefile-SHELL
- ,patch-makefile-phase)
- (add-before 'patch-source-shebangs 'remove-unneeded-shebang
- ,remove-shebang-phase)))))
+ ;; MinGW: Use term-driver created for the MinGW port.
+ #$@(if (target-mingw?) #~("--enable-term-driver") #~())
+ "CXXFLAGS=-std=c++11")
+ #:tests? #f ; no "check" target
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-rollup-patch
+ #$apply-rollup-patch-phase)
+ (replace 'configure #$configure-phase)
+ (add-after 'install 'post-install
+ #$post-install-phase)
+ (add-before 'configure 'patch-makefile-SHELL
+ #$patch-makefile-phase)
+ (add-before 'patch-source-shebangs 'remove-unneeded-shebang
+ #$remove-shebang-phase)))))
(native-inputs
- `(,@(if (%current-target-system)
- `(("self" ,this-package)) ;for `tic'
- '())
- ("rollup-patch"
- ,(origin
- (method url-fetch)
- (uri (match (string-split (version-major+minor+point version) #\.)
- ((major minor point)
- (string-append "https://invisible-mirror.net/archives"
- "/ncurses/" major "." minor "/ncurses-"
- major "." minor "-" point "-patch.sh.bz2"))))
- (sha256
- (base32
- "16ny892yhimy6r4mmsgw3rcl0i15570ifn9c54g1ndyrk7kpmlgs"))))
- ("pkg-config" ,pkg-config)))
+ (if (%current-target-system)
+ (list pkg-config this-package) ;for 'tic'
+ (list pkg-config)))
(native-search-paths
(list (search-path-specification
(variable "TERMINFO_DIRS")
@@ -237,13 +220,10 @@ ncursesw library provides wide character support.")
(license x11)
(home-page "https://www.gnu.org/software/ncurses/")))
-;; Needed by u-boot 2022.04+
-;; Consider merging into ncurses for next core-updates cycle.
(define-public ncurses/tinfo-5
(package/inherit ncurses-5
(name "ncurses-with-tinfo")
(arguments
(substitute-keyword-arguments (package-arguments ncurses-5)
((#:configure-flags cf)
- `(cons "--with-termlib=tinfo"
- ,cf))))))
+ #~(cons "--with-termlib=tinfo" #$cf))))))
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm
index b7f2e4b..2c6495e 100644
--- a/nongnu/packages/nvidia.scm
+++ b/nongnu/packages/nvidia.scm
@@ -1,29 +1,16 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2020 Hebi Li <hebi@lihebi.com>
;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2020, 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2020-2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022, 2023 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Alexey Abramov <levenson@mmer.org>
-;;;
-;;; This file is not part of GNU Guix.
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
+;;; Copyright © 2022, 2023, 2024 Hilton Chain <hako@ultrarare.space>
(define-module (nongnu packages nvidia)
#:use-module (guix packages)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -31,15 +18,19 @@
#:use-module ((guix licenses) #:prefix license-gnu:)
#:use-module ((nonguix licenses) #:prefix license:)
#:use-module (guix build-system linux-module)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages elf)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -47,245 +38,773 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
#:use-module (gnu packages lsof)
- #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages video)
#:use-module (gnu packages web)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (nongnu packages linux)
- #:use-module (ice-9 match)
- #:use-module (ice-9 regex)
- #:use-module (ice-9 format)
- #:use-module (ice-9 textual-ports)
- #:use-module (ice-9 match)
- #:use-module (srfi srfi-1))
+ #:use-module (ice-9 match))
+
+(define-public %nvidia-environment-variable-regexps
+ '("^__GL_" ; NVIDIA OpenGL settings.
+ "^__GLX_VENDOR_LIBRARY_NAME$" ; For GLVND.
+ ;; NVIDIA PRIME Render Offload.
+ "^__NV_PRIME_RENDER_OFFLOAD(_PROVIDER)?$"
+ "^__VK_LAYER_NV_optimus$"
+ ;; NVIDIA NGX.
+ "^__NGX_CONF_FILE$"
+ "^__NV_SIGNED_LOAD_CHECK$"
+ "^PROTON_ENABLE_NGX_UPDATER$"
+ ;; NVIDIA VDPAU settings.
+ "^VDPAU_NVIDIA_"
+ ;; GSYNC control for Vulkan direct-to-display applications.
+ "^VKDirectGSYNC(Compatible)?Allowed$"))
+
+(define-public nvidia-version "550.67")
+
+
+;;;
+;;; NVIDIA driver checkouts
+;;;
+
+
+(define* (nvidia-source-hash version #:optional (package "nvidia-driver"))
+ (define %nvidia-source-hashes
+ '(("550.67" .
+ (("nvidia-driver" .
+ "1qnsyzplkxfcc2sj6fcw3ylfp0njvb5z1c0y4v80zzqwqw4il84r")
+ ("nvidia-settings" .
+ "18sij736liyhqysvsnqwb6r58pf0zbggxyvyc11psc4ljxg30h8m")))))
+ (let ((hashes (assoc-ref %nvidia-source-hashes version)))
+ (assoc-ref hashes package)))
+
+(define (nvidia-source-unbundle-libraries version)
+ #~(begin
+ (use-modules (guix build utils))
+ (for-each delete-file
+ (find-files "." (string-join
+ '(;; egl-gbm
+ "libnvidia-egl-gbm\\.so\\."
+ ;; egl-wayland
+ "libnvidia-egl-wayland\\.so\\."
+ ;; libglvnd
+ "libEGL\\.so\\."
+ "libGL\\.so\\."
+ "libGLESv1_CM\\.so\\."
+ "libGLESv2\\.so\\."
+ "libGLX\\.so\\."
+ "libGLdispatch\\.so\\."
+ "libOpenGL\\.so\\."
+ ;; nvidia-settings
+ "libnvidia-gtk[23]\\.so\\."
+ ;; opencl-icd-loader
+ "libOpenCL\\.so\\.")
+ "|")))))
+
+(define* (make-nvidia-source
+ version hash
+ #:optional (get-cleanup-snippet nvidia-source-unbundle-libraries))
+ "Given VERSION and HASH of an NVIDIA driver installer, return an <origin> for
+its unpacked checkout. GET-CLEANUP-SNIPPET is a procedure that accepts the
+VERSION as argument and returns a G-expression."
+ (define installer
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://us.download.nvidia.com/XFree86/Linux-x86_64/"
+ version "/NVIDIA-Linux-x86_64-" version ".run"))
+ (sha256 hash)))
+ (origin
+ (method (@@ (guix packages) computed-origin-method))
+ (file-name (string-append "nvidia-driver-" version "-checkout"))
+ (sha256 #f)
+ (snippet (get-cleanup-snippet version))
+ (uri
+ (delay
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils)
+ (ice-9 ftw))
+ (set-path-environment-variable
+ "PATH" '("bin")
+ '#+(list bash-minimal
+ coreutils
+ gawk
+ grep
+ tar
+ which
+ xz
+ zstd))
+ (setenv "XZ_OPT" (string-join (%xz-parallel-args)))
+ (invoke "sh" #$installer "-x")
+ (copy-recursively
+ (car (scandir (canonicalize-path (getcwd))
+ (lambda (file)
+ (not (member file '("." ".."))))))
+ #$output)))))))
+
+(define-public nvidia-source
+ (make-nvidia-source
+ nvidia-version
+ (base32 (nvidia-source-hash nvidia-version))))
+
+
+;;;
+;;; NVIDIA drivers
+;;;
+
+
+(define %nvidia-script-create-device-nodes
+ (program-file
+ "create-device-nodes.scm"
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (ice-9 regex)
+ (rnrs io ports)
+ (srfi srfi-1)
+ (guix build utils))
+
+ (define %nvidia-character-devices
+ (call-with-input-file "/proc/devices"
+ (lambda (port)
+ (filter-map
+ (lambda (line)
+ (if (string-contains line "nvidia")
+ (apply cons (reverse (string-tokenize line)))
+ #f))
+ (string-split (get-string-all port) #\newline)))))
+
+ (define %nvidia-driver-device-minors
+ (let ((device-minor-regexp (make-regexp "^Device Minor: \t (.*)")))
+ (append-map
+ (lambda (file)
+ (call-with-input-file file
+ (lambda (port)
+ (filter-map
+ (lambda (line)
+ (let ((matched (regexp-exec device-minor-regexp line)))
+ (if matched
+ (match:substring matched 1)
+ #f)))
+ (string-split (get-string-all port) #\newline)))))
+ (find-files "/proc/driver/nvidia/gpus/" "information$"))))
+
+ (define (create-device-node path name minor)
+ (let ((major
+ (or (assoc-ref %nvidia-character-devices name)
+ (assoc-ref %nvidia-character-devices "nvidia-frontend")))
+ (mknod #$(file-append coreutils "/bin/mknod")))
+ (system* mknod "-Zm0666" path "c" major minor)))
+
+ (define (main args)
+ (case (string->symbol (first args))
+ ((nvidia_modeset)
+ (create-device-node "/dev/nvidia-modeset" "nvidia-modeset" "254"))
+ ((nvidia_uvm)
+ (begin
+ (create-device-node "/dev/nvidia-uvm" "nvidia-uvm" "0")
+ (create-device-node "/dev/nvidia-uvm-tools" "nvidia-uvm" "1")))
+ ((nvidia)
+ (begin
+ (create-device-node "/dev/nvidiactl" "nvidiactl" "255")
+ (for-each
+ (lambda (minor)
+ (create-device-node
+ (string-append "/dev/nvidia" minor) "nvidia" minor))
+ %nvidia-driver-device-minors)))))
+
+ (main (cdr (command-line)))))))
-; Used for closed-source packages
-(define nvidia-version "470.86")
+;; Adapted from <https://github.com/Frogging-Family/nvidia-all/blob/master/60-nvidia.rules>
+(define %nvidia-udev-rules
+ (mixed-text-file
+ "90-nvidia.rules" "\
+# Make sure device nodes are present even when the DDX is not started for the Wayland/EGLStream case
+KERNEL==\"nvidia\", RUN+=\"" %nvidia-script-create-device-nodes " nvidia\"
+KERNEL==\"nvidia_modeset\", RUN+=\"" %nvidia-script-create-device-nodes " nvidia_modeset\"
+KERNEL==\"nvidia_uvm\", RUN+=\"" %nvidia-script-create-device-nodes " nvidia_uvm\"
-; Used for the open-source kernel module package
-(define nversion "515.76")
+# Enable runtime PM for NVIDIA VGA/3D controller devices
+ACTION==\"bind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x03[0-9]*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"
+# Enable runtime PM for NVIDIA Audio devices
+ACTION==\"bind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x040300\", TEST==\"power/control\", ATTR{power/control}=\"auto\"
+# Enable runtime PM for NVIDIA USB xHCI Host Controller devices
+ACTION==\"bind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x0c0330\", TEST==\"power/control\", ATTR{power/control}=\"auto\"
+# Enable runtime PM for NVIDIA USB Type-C UCSI devices
+ACTION==\"bind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x0c8000\", TEST==\"power/control\", ATTR{power/control}=\"auto\"
+
+# Disable runtime PM for NVIDIA VGA/3D controller devices
+ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x03[0-9]*\", TEST==\"power/control\", ATTR{power/control}=\"on\"
+# Disable runtime PM for NVIDIA Audio devices
+ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x040300\", TEST==\"power/control\", ATTR{power/control}=\"on\"
+# Disable runtime PM for NVIDIA USB xHCI Host Controller devices
+ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x0c0330\", TEST==\"power/control\", ATTR{power/control}=\"on\"
+# Disable runtime PM for NVIDIA USB Type-C UCSI devices
+ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x0c8000\", TEST==\"power/control\", ATTR{power/control}=\"on\"
+"))
(define-public nvidia-driver
(package
(name "nvidia-driver")
(version nvidia-version)
- (source
- (origin
- (uri (format #f "http://us.download.nvidia.com/XFree86/Linux-x86_64/~a/~a.run"
- version
- (format #f "NVIDIA-Linux-x86_64-~a" version)))
- (sha256 (base32 "0krwcxc0j19vjnk8sv6mx1lin2rm8hcfhc2hg266846jvcws1dsg"))
- (method url-fetch)
- (file-name (string-append "nvidia-driver-" version "-checkout"))))
+ (source nvidia-source)
+ (build-system copy-build-system)
+ (arguments
+ (list #:modules '((guix build copy-build-system)
+ (guix build utils)
+ (ice-9 popen)
+ (ice-9 rdelim)
+ (ice-9 regex)
+ (srfi srfi-26))
+ #:install-plan
+ #~`((#$(match (or (%current-target-system) (%current-system))
+ ("i686-linux" "32")
+ ("x86_64-linux" ".")
+ (_ "."))
+ "lib/" #:include-regexp ("^./[^/]+\\.so"))
+ ("." "share/nvidia/" #:include-regexp ("nvidia-application-profiles"))
+ ("." "share/egl/egl_external_platform.d/" #:include-regexp ("(gbm|wayland)\\.json"))
+ ("10_nvidia.json" "share/glvnd/egl_vendor.d/")
+ ("90-nvidia.rules" "lib/udev/rules.d/")
+ ("nvidia-drm-outputclass.conf" "share/X11/xorg.conf.d/")
+ ("nvidia-dbus.conf" "share/dbus-1/system.d/")
+ ("nvidia.icd" "etc/OpenCL/vendors/")
+ ("nvidia_icd.json" "share/vulkan/icd.d/")
+ ("nvidia_layers.json" "share/vulkan/implicit_layer.d/"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'strip)
+ (add-after 'unpack 'create-misc-files
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; EGL external platform configuraiton
+ (substitute* '("10_nvidia_wayland.json"
+ "15_nvidia_gbm.json")
+ (("libnvidia-egl-(wayland|gbm)\\.so\\.." all)
+ (search-input-file inputs (string-append "lib/" all))))
+
+ ;; EGL vendor ICD configuration
+ (substitute* "10_nvidia.json"
+ (("libEGL_nvidia\\.so\\.." all)
+ (string-append #$output "/lib/" all)))
+
+ ;; OpenCL vendor ICD configuration
+ (substitute* "nvidia.icd"
+ (("libnvidia-opencl\\.so\\.." all)
+ (string-append #$output "/lib/" all)))
+
+ ;; Vulkan ICD & layer configuraiton
+ (substitute* '("nvidia_icd.json"
+ "nvidia_layers.json")
+ (("libGLX_nvidia\\.so\\.." all)
+ (string-append #$output "/lib/" all)))
+
+ ;; Add udev rules
+ (symlink #$%nvidia-udev-rules "90-nvidia.rules")))
+ (add-after 'install 'add-architecture-to-filename
+ (lambda _
+ (for-each
+ (lambda (path)
+ (let* ((out #$output)
+ (system #$(or (%current-target-system)
+ (%current-system)))
+ (dash (string-index system #\-))
+ (arch (string-take system dash))
+
+ (dot (string-index-right path #\.))
+ (base (string-take path dot))
+ (ext (string-drop path (+ 1 dot))))
+ ;; <...>/nvidia.icd -> <...>/nvidia.x86_64.icd
+ ;; <...>/nvidia_icd.json -> <...>/nvidia_icd.x86_64.json
+ (rename-file
+ (string-append out path)
+ (string-append out base "." arch "." ext))))
+ '("/etc/OpenCL/vendors/nvidia.icd"
+ "/share/egl/egl_external_platform.d/10_nvidia_wayland.json"
+ "/share/egl/egl_external_platform.d/15_nvidia_gbm.json"
+ "/share/glvnd/egl_vendor.d/10_nvidia.json"
+ "/share/vulkan/icd.d/nvidia_icd.json"
+ "/share/vulkan/implicit_layer.d/nvidia_layers.json"))))
+ (add-after 'install 'patch-elf
+ (lambda _
+ (let* ((ld.so (string-append #$(this-package-input "glibc")
+ #$(glibc-dynamic-linker)))
+ (rpath (string-join
+ (list (string-append #$output "/lib")
+ (string-append #$openssl-1.1 "/lib")
+ (string-append #$(this-package-input "egl-wayland") "/lib")
+ (string-append (ungexp (this-package-input "gcc") "lib") "/lib")
+ (string-append #$(this-package-input "glibc") "/lib")
+ (string-append #$(this-package-input "libdrm") "/lib")
+ (string-append #$(this-package-input "libglvnd") "/lib")
+ (string-append #$(this-package-input "libx11") "/lib")
+ (string-append #$(this-package-input "libxext") "/lib")
+ (string-append #$(this-package-input "openssl") "/lib")
+ (string-append #$(this-package-input "wayland") "/lib"))
+ ":")))
+ (define (patch-elf file)
+ (format #t "Patching ~a ..." file)
+ (unless (string-contains file ".so")
+ (invoke "patchelf" "--set-interpreter" ld.so file))
+ (invoke "patchelf" "--set-rpath" rpath file)
+ (display " done\n"))
+
+ (for-each (lambda (file)
+ (when (elf-file? file)
+ (patch-elf file)))
+ (find-files #$output)))))
+ (add-before 'patch-elf 'install-commands
+ (lambda _
+ (when (string-match
+ "x86_64-linux"
+ (or #$(%current-target-system) #$(%current-system)))
+ (for-each
+ (lambda (binary)
+ (let ((bindir (string-append #$output "/bin"))
+ (manual (string-append binary ".1.gz"))
+ (mandir (string-append #$output "/share/man/man1")))
+ (install-file binary bindir)
+ (when (file-exists? manual)
+ (install-file manual mandir))))
+ '("nvidia-cuda-mps-control"
+ "nvidia-cuda-mps-server"
+ "nvidia-smi")))))
+ (add-before 'patch-elf 'relocate-libraries
+ (lambda _
+ (let* ((version #$(package-version this-package))
+ (libdir (string-append #$output "/lib"))
+ (gbmdir (string-append libdir "/gbm"))
+ (vdpaudir (string-append libdir "/vdpau"))
+ (xorgmoddir (string-append libdir "/xorg/modules"))
+ (xorgdrvdir (string-append xorgmoddir "/drivers"))
+ (xorgextdir (string-append xorgmoddir "/extensions"))
+ (move-to-dir (lambda (file dir)
+ (install-file file dir)
+ (delete-file file))))
+ (for-each
+ (lambda (file)
+ (mkdir-p gbmdir)
+ (with-directory-excursion gbmdir
+ (symlink file "nvidia-drm_gbm.so")))
+ (find-files libdir "libnvidia-allocator\\.so\\."))
+
+ (for-each
+ (cut move-to-dir <> vdpaudir)
+ (find-files libdir "libvdpau_nvidia\\.so\\."))
+
+ (for-each
+ (cut move-to-dir <> xorgdrvdir)
+ (find-files libdir "nvidia_drv\\.so$"))
+
+ (for-each
+ (lambda (file)
+ (move-to-dir file xorgextdir)
+ (with-directory-excursion xorgextdir
+ (symlink (basename file)
+ "libglxserver_nvidia.so")))
+ (find-files libdir "libglxserver_nvidia\\.so\\.")))))
+ (add-after 'patch-elf 'create-short-name-symlinks
+ (lambda _
+ (define (get-soname file)
+ (when (elf-file? file)
+ (let* ((cmd (string-append "patchelf --print-soname " file))
+ (port (open-input-pipe cmd))
+ (soname (read-line port)))
+ (close-pipe port)
+ soname)))
+ (for-each
+ (lambda (lib)
+ (let ((lib-soname (get-soname lib)))
+ (when (string? lib-soname)
+ (let* ((soname (string-append
+ (dirname lib) "/" lib-soname))
+ (base (string-append
+ (regexp-substitute
+ #f (string-match "(.*)\\.so.*" soname) 1)
+ ".so"))
+ (source (basename lib)))
+ (for-each
+ (lambda (target)
+ (unless (file-exists? target)
+ (format #t "Symlinking ~a -> ~a..."
+ target source)
+ (symlink source target)
+ (display " done\n")))
+ (list soname base))))))
+ (find-files #$output "\\.so\\.")))))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (native-inputs (list patchelf))
+ (inputs
+ (list egl-gbm
+ egl-wayland
+ `(,gcc "lib")
+ glibc
+ libdrm
+ libglvnd-for-nvda
+ libx11
+ libxext
+ openssl
+ openssl-1.1
+ wayland))
+ (home-page "https://www.nvidia.com")
+ (synopsis "Proprietary NVIDIA driver (libraries)")
+ (description
+ "This package provides libraries of the proprietary NVIDIA driver. It's
+mainly used as a dependency of other packages. For user-facing purpose, use
+@code{nvda} instead.")
+ (license
+ (license:nonfree
+ (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
+
+(define-public nvidia-libs
+ (deprecated-package "nvidia-libs" nvidia-driver))
+
+
+;;;
+;;; NVIDIA frimwares
+;;;
+
+
+(define-public nvidia-firmware
+ (let ((base nvidia-driver))
+ (package
+ (inherit base)
+ (name "nvidia-firmware")
+ (arguments
+ (list #:install-plan
+ #~'(("firmware" #$(string-append "lib/firmware/nvidia/"
+ (package-version this-package))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'strip))))
+ (propagated-inputs '())
+ (inputs '())
+ (native-inputs '())
+ (synopsis "Proprietary NVIDIA driver (GSP firmwares)")
+ (description
+ "This package provides firmwares for NVIDIA's GPU System Processor.
+Firmware installation can be done with @code{nvidia-service-type}, however
+whether GSP mode is enabled by default or not depends on the specific GPU
+product.
+
+To enable GSP mode manually, add @code{\"NVreg_EnableGpuFirmware=1\"} to
+@code{kernel-arguments} field of the @code{operating-system} configuration."))))
+
+
+;;;
+;;; NVIDIA kernel modules
+;;;
+
+
+(define-public nvidia-module
+ (package
+ (name "nvidia-module")
+ (version nvidia-version)
+ (source nvidia-source)
(build-system linux-module-build-system)
(arguments
(list #:linux linux-lts
- #:tests? #f
- #:phases
- #~(modify-phases %standard-phases
- (replace 'unpack
- (lambda* (#:key inputs #:allow-other-keys #:rest r)
- (let ((source (assoc-ref inputs "source")))
- (invoke "sh" source "--extract-only")
- (chdir #$(format #f "NVIDIA-Linux-x86_64-~a" version)))))
- (replace 'build
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; We cannot use with-directory-excursion, because the install
- ;; phase needs to be in the kernel folder. Otherwise no .ko
- ;; would be installed.
- (chdir "kernel")
- ;; Patch Kbuild
- (substitute* "Kbuild"
- (("/bin/sh") (string-append #$bash-minimal "/bin/sh")))
- (invoke "make"
- "-j"
- (string-append "SYSSRC="
- (assoc-ref inputs "linux-module-builder")
- "/lib/modules/build")
- "CC=gcc")))
- (delete 'strip)
- (add-after 'install 'install-copy
- (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
- (chdir "..")
- (use-modules (ice-9 ftw)
- (ice-9 regex)
- (ice-9 textual-ports))
- (let* ((libdir (string-append #$output "/lib"))
- (bindir (string-append #$output "/bin"))
- (etcdir (string-append #$output "/etc")))
- ;; ------------------------------
- ;; Copy .so files
- (for-each
- (lambda (file)
- (format #t "Copying '~a'...~%" file)
- (install-file file libdir))
- (scandir "." (lambda (name)
- (string-contains name ".so"))))
-
- (install-file "nvidia_drv.so" (string-append #$output "/lib/xorg/modules/drivers/"))
- (install-file (string-append "libglxserver_nvidia.so."
- #$(package-version nvidia-driver))
- (string-append #$output "/lib/xorg/modules/extensions/"))
-
- ;; ICD Loader for OpenCL
- (let ((file (string-append etcdir "/OpenCL/vendors/nvidia.icd")))
- (mkdir-p (string-append etcdir "/OpenCL/vendors/"))
- (call-with-output-file file
- (lambda (port)
- (display (string-append #$output "/lib/libnvidia-opencl.so.1") port)))
- (chmod file #o555))
-
- ;; Add udev rules for nvidia
- (let ((rulesdir (string-append #$output "/lib/udev/rules.d/"))
- (rules (string-append #$output "/lib/udev/rules.d/90-nvidia.rules"))
- (sh (string-append #$bash-minimal "/bin/sh"))
- (mknod (string-append #$coreutils "/bin/mknod"))
- (cut (string-append #$coreutils "/bin/cut"))
- (grep (string-append #$grep "/bin/grep")))
- (mkdir-p rulesdir)
- (call-with-output-file rules
- (lambda (port)
- (put-string port
+ #:source-directory "kernel"
+ #:tests? #f
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'strip)
+ (add-before 'configure 'fixpath
+ (lambda* (#:key (source-directory ".") #:allow-other-keys)
+ (substitute* (string-append source-directory "/Kbuild")
+ (("/bin/sh") (which "sh")))))
+ (replace 'build
+ (lambda* (#:key (make-flags '()) (parallel-build? #t)
+ (source-directory ".")
+ inputs
+ #:allow-other-keys)
+ (apply invoke "make" "-C" (canonicalize-path source-directory)
+ (string-append "SYSSRC=" (search-input-directory
+ inputs "/lib/modules/build"))
+ `(,@(if parallel-build?
+ `("-j" ,(number->string
+ (parallel-job-count)))
+ '())
+ ,@make-flags)))))))
+ (home-page "https://www.nvidia.com")
+ (synopsis "Proprietary NVIDIA driver (kernel modules)")
+ (description
+ "This package provides kernel modules of the proprietary NVIDIA driver.
+Module setup can be done with @code{nvidia-service-type}, to actually use these
+modules, also add @code{modprobe.blacklist=nouveau} to @code{kernel-arguments}
+field of the @code{operating-system} configuration.
+
+If the NVIDIA card is not used for displaying, or on a Wayland environment,
+add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
+ (license
+ (license:nonfree
+ (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
+
+(define-public nvidia-module-open
+ (let ((base nvidia-module))
+ (package
+ (inherit base)
+ (name "nvidia-module-open")
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ;; NOTE: Kernels compiled with CONFIG_LTO_CLANG_THIN would cause an
+ ;; error here. See also:
+ ;; <https://github.com/NVIDIA/open-gpu-kernel-modules/issues/214>
+ ;; <https://github.com/llvm/llvm-project/issues/55820>
+ ((#:source-directory _) "kernel-open")))
+ (home-page "https://github.com/NVIDIA/open-gpu-kernel-modules")
+ (synopsis "Open source NVIDIA kernel modules")
+ (description
+ "This package provides open source NVIDIA kernel modules, however
+proprietary firmware and libraries are still necessary, and these modules
+require GPU System Processor to be present (Turing or later architectures) and
+enabled (see also the description of @code{nvidia-firmware} package).
+
+Module setup can be done with @code{nvidia-service-type} (with @code{module}
+field of @code{nvidia-configuration} set to @code{nvidia-module-open}), to
+actually use these modules, also add @code{modprobe.blacklist=nouveau} to
+@code{kernel-arguments} field of the @code{operating-system} configuration.
+
+If the NVIDIA card is not used for displaying, or on a Wayland environment,
+add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
+ (license license-gnu:gpl2))))
+
+
+;;;
+;;; ‘nvidia-settings’ packages
+;;;
+
+
+(define-public nvidia-settings
+ (package
+ (name "nvidia-settings")
+ (version nvidia-version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NVIDIA/nvidia-settings")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(delete-file-recursively "src/jansson"))
+ (sha256 (base32 (nvidia-source-hash version name)))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list "NV_USE_BUNDLED_LIBJANSSON=0"
+ (string-append "PREFIX=" #$output)
+ (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-application-profile-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/gtk+-2.x/ctkappprofile.c"
+ (("/usr") "/run/booted-system/profile"))))
+ (add-after 'install 'install-desktop-file
+ (lambda _
+ (substitute* "doc/nvidia-settings.desktop"
+ (("^Exec=.*") "Exec=nvidia-settings\n")
+ (("__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__") "Settings"))
+ (install-file "doc/nvidia-settings.desktop"
(string-append
- "KERNEL==\"nvidia\", "
- "RUN+=\"" sh " -c '" mknod " -m 666 /dev/nvidiactl c $$(" grep " nvidia-frontend /proc/devices | " cut " -d \\ -f 1) 255'\"" "\n"
- "KERNEL==\"nvidia_modeset\", "
- "RUN+=\"" sh " -c '" mknod " -m 666 /dev/nvidia-modeset c $$(" grep " nvidia-frontend /proc/devices | " cut " -d \\ -f 1) 254'\"" "\n"
- "KERNEL==\"card*\", SUBSYSTEM==\"drm\", DRIVERS==\"nvidia\", "
- "RUN+=\"" sh " -c '" mknod " -m 666 /dev/nvidia0 c $$(" grep " nvidia-frontend /proc/devices | " cut " -d \\ -f 1) 0'\"" "\n"
- "KERNEL==\"nvidia_uvm\", "
- "RUN+=\"" sh " -c '" mknod " -m 666 /dev/nvidia-uvm c $$(" grep " nvidia-uvm /proc/devices | " cut " -d \\ -f 1) 0'\"" "\n"
- "KERNEL==\"nvidia_uvm\", "
- "RUN+=\"" sh " -c '" mknod " -m 666 /dev/nvidia-uvm-tools c $$(" grep " nvidia-uvm /proc/devices | " cut " -d \\ -f 1) 0'\"" "\n" )))))
-
- ;; ------------------------------
- ;; Add a file to load nvidia drivers
- (mkdir-p bindir)
- (let ((file (string-append bindir "/nvidia-insmod"))
- (moddir (string-append "/lib/modules/" (utsname:release (uname)) "-gnu/extra")))
- (call-with-output-file file
- (lambda (port)
- (put-string port (string-append "#!" (assoc-ref inputs "bash-minimal") "/bin/sh" "\n"
- "modprobe ipmi_devintf" "\n"
- "insmod " #$output moddir "/nvidia.ko" "\n"
- "insmod " #$output moddir "/nvidia-modeset.ko" "\n"
- "insmod " #$output moddir "/nvidia-uvm.ko" "\n"
- "insmod " #$output moddir "/nvidia-drm.ko" "\n"))))
- (chmod file #o555))
- (let ((file (string-append bindir "/nvidia-rmmod")))
- (call-with-output-file file
- (lambda (port)
- (put-string port (string-append "#!" #$bash-minimal "/bin/sh" "\n"
- "rmmod " "nvidia-drm" "\n"
- "rmmod " "nvidia-uvm" "\n"
- "rmmod " "nvidia-modeset" "\n"
- "rmmod " "nvidia" "\n"
- "rmmod " "ipmi_devintf" "\n"))))
- (chmod file #o555))
-
- ;; ------------------------------
- ;; nvidia-smi
-
- (install-file "nvidia-smi" bindir)
-
- ;; ------------------------------
- ;; patchelf
- (let* ((ld.so (string-append #$glibc #$(glibc-dynamic-linker)))
-
- (rpath (string-join
- (list "$ORIGIN"
- (string-append #$output "/lib")
- (string-append #$glibc "/lib")
- (string-append #$libx11 "/lib")
- (string-append #$libxext "/lib")
- (string-append #$pango "/lib")
- (string-append #$gtk+ "/lib")
- (string-append #$gtk+-2 "/lib")
- (string-append #$atk "/lib")
- (string-append #$glib "/lib")
- (string-append #$cairo "/lib")
- (string-append #$gdk-pixbuf "/lib")
- (string-append #$wayland "/lib")
- (string-append #$gcc:lib "/lib"))
- ":")))
- (define (patch-elf file)
- (format #t "Patching ~a ...~%" file)
- (unless (string-contains file ".so")
- (invoke "patchelf" "--set-interpreter" ld.so file))
- (invoke "patchelf" "--set-rpath" rpath file))
- (for-each (lambda (file)
- (when (elf-file? file)
- (patch-elf file)))
- (find-files #$output ".*\\.so"))
- (patch-elf (string-append bindir "/" "nvidia-smi")))
-
- ;; ------------------------------
- ;; Create short name symbolic links
- (for-each (lambda (file)
- (let* ((short (regexp-substitute
- #f
- (string-match "([^/]*\\.so).*" file)
- 1))
- (major (cond
- ((or (string=? short "libGLX.so")
- (string=? short "libGLX_nvidia.so")
- (string=? short "libEGL_nvidia.so")) "0")
- ((string=? short "libGLESv2.so") "2")
- (else "1")))
- (mid (string-append short "." major))
- (short-file (string-append libdir "/" short))
- (mid-file (string-append libdir "/" mid)))
- ;; FIXME the same name, print out warning at least
- ;; [X] libEGL.so.1.1.0
- ;; [ ] libEGL.so.435.21
- (when (not (file-exists? short-file))
- (format #t "Linking ~a to ~a ...~%" short file)
- (symlink (basename file) short-file))
- (when (not (file-exists? mid-file))
- (format #t "Linking ~a to ~a ...~%" mid file)
- (symlink (basename file) mid-file))))
- (find-files libdir "\\.so\\."))
- (symlink (string-append "libglxserver_nvidia.so."
- #$(package-version nvidia-driver))
- (string-append #$output "/lib/xorg/modules/extensions/" "libglxserver_nvidia.so"))))))))
- (supported-systems '("x86_64-linux"))
- (native-inputs
- (list
- patchelf
- perl
- python-2
- which
- xz))
- (inputs
+ #$output "/share/applications"))
+ (install-file "doc/nvidia-settings.png"
+ (string-append
+ #$output "/share/icons/hicolor/128x128/apps"))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/nvidia-settings")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append out "/lib/"))))))))))
+ (native-inputs (list m4
+ pkg-config))
+ (inputs (list bash-minimal
+ dbus
+ glu
+ gtk+
+ gtk+-2
+ jansson
+ libvdpau
+ libx11
+ libxext
+ libxrandr
+ libxv
+ libxxf86vm))
+ (synopsis "Nvidia driver control panel")
+ (description
+ "This package provides Nvidia driver control panel for monitor
+configuration, creating application profiles, gpu monitoring and more.")
+ (home-page "https://github.com/NVIDIA/nvidia-settings")
+ (license license-gnu:gpl2)))
+
+
+;;;
+;;; ‘nvda’ packages
+;;;
+
+
+(define-public libglvnd-for-nvda
+ (hidden-package
+ (package
+ (inherit libglvnd)
+ (arguments
+ (substitute-keyword-arguments (package-arguments libglvnd)
+ ((#:configure-flags flags #~'())
+ #~(cons* "-Dc_link_args=-Wl,-rpath=$ORIGIN" #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (delete 'shrink-runpath))))))))
+
+(define-public mesa-for-nvda
+ (hidden-package
+ (package
+ (inherit mesa)
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs mesa)
+ (prepend libglvnd-for-nvda)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mesa)
+ ((#:configure-flags flags #~'())
+ #~(cons* "-Dglvnd=true" #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'install 'fix-egl-vendor-icd
+ (lambda _
+ (substitute* (string-append
+ #$output "/share/glvnd/egl_vendor.d/50_mesa.json")
+ (("libEGL_mesa\\.so\\.." all)
+ (string-append #$output "/lib/" all)))))
+ (add-after 'set-layer-path-in-manifests 'add-architecture-to-filename
+ (lambda _
+ (for-each
+ (lambda (path)
+ (let* ((out #$output)
+ (system #$(or (%current-target-system)
+ (%current-system)))
+ (dash (string-index system #\-))
+ (arch (string-take system dash))
+
+ (dot (string-index-right path #\.))
+ (base (string-take path dot))
+ (ext (string-drop path (+ 1 dot))))
+ ;; <...>/50_mesa.json -> <...>/50_mesa.x86_64.json
+ (rename-file
+ (string-append out path)
+ (string-append out base "." arch "." ext))))
+ '("/share/glvnd/egl_vendor.d/50_mesa.json"
+ "/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json"
+ "/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json")))))))))))
+
+;; nvda is used as a name because it has the same length as mesa which is
+;; required for grafting
+(define-public nvda
+ (package
+ (inherit nvidia-driver)
+ (name "nvda")
+ (version (string-pad-right
+ (package-version nvidia-driver)
+ (string-length (package-version mesa-for-nvda))
+ #\0))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list #:modules '((guix build union))
+ #:builder
+ #~(begin
+ (use-modules (guix build union))
+ (union-build
+ #$output
+ '#$(list (this-package-input "libglvnd")
+ (this-package-input "mesa")
+ (this-package-input "nvidia-driver"))))))
+ (native-search-paths
(list
- atk
- bash-minimal
- cairo
- coreutils
- `(,gcc "lib")
- gdk-pixbuf
- glib
- grep
- gtk+
- gtk+-2
- kmod
- glibc
- libx11
- libxext
- linux-lts
- pango
- wayland))
- (home-page "https://www.nvidia.com")
- (synopsis "Proprietary Nvidia driver")
- (description "This is the evil Nvidia driver. Don't forget to add
-nvidia-driver to the udev-rules in your config.scm:
-@code{(simple-service 'custom-udev-rules udev-service-type (list nvidia-driver))}
-Further xorg should be configured by adding:
-@code{(modules (cons* nvidia-driver %default-xorg-modules))
-(drivers '(\"nvidia\"))} to @code{xorg-configuration}.")
- (license (license:nonfree (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
+ ;; https://github.com/NVIDIA/egl-wayland/issues/39
+ (search-path-specification
+ (variable "__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS")
+ (files '("share/egl/egl_external_platform.d")))
+ ;; https://gitlab.freedesktop.org/glvnd/libglvnd/-/blob/master/src/EGL/icd_enumeration.md
+ (search-path-specification
+ (variable "__EGL_VENDOR_LIBRARY_DIRS")
+ (files '("share/glvnd/egl_vendor.d")))
+ ;; See also: ‘src/gbm/main/backend.c’ in mesa source.
+ (search-path-specification
+ (variable "GBM_BACKENDS_PATH")
+ (files '("lib/gbm")))
+ (search-path-specification
+ (variable "VDPAU_DRIVER_PATH")
+ (files '("lib/vdpau"))
+ (separator #f))
+ ;; https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md
+ (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
+ (synopsis "Nonguix's user-facing NVIDIA driver package")
+ (description
+ "This package provides a drop-in replacement for @code{mesa} and is
+intended to be installed by @code{nvidia-service-type}.
+
+To actually use the NVIDIA card, replacement must be applied for individual
+packages, this can be done either by rewriting inputs with
+@code{--with-input=mesa=nvda} or grafting with @code{--with-graft=mesa=nvda}.
+For a programmatical way, the procedure @code{replace-mesa} can be used.
+
+Additionally, if the NVIDIA card is not used for displaying, environment
+variables @code{__GLX_VENDOR_LIBRARY_NAME=nvidia} and
+@code{__NV_PRIME_RENDER_OFFLOAD=1} may be set.")
+ (native-inputs '())
+ (propagated-inputs
+ (append
+ (package-propagated-inputs mesa-for-nvda)
+ (package-propagated-inputs nvidia-driver)))
+ (inputs (list mesa-for-nvda nvidia-driver))
+ (outputs '("out"))))
+
+(define mesa/fake
+ (package
+ (inherit mesa)
+ (replacement nvda)))
+
+(define-public replace-mesa
+ (package-input-rewriting `((,mesa . ,mesa/fake))))
+
+
+;;;
+;;; Other packages
+;;;
+
+
+(define-public gpustat
+ (package
+ (name "gpustat")
+ (version "1.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "gpustat" version))
+ (sha256
+ (base32
+ "1wg3yikkqdrcxp5xscyb9rxifgfwv7qh73xv4airab63b3w8y7jq"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs (list python-blessed python-nvidia-ml-py python-psutil
+ python-six))
+ (native-inputs (list python-mock python-pytest python-pytest-runner))
+ (home-page "https://github.com/wookayin/gpustat")
+ (synopsis "Utility to monitor NVIDIA GPU status and usage")
+ (description
+ "This package provides an utility to monitor NVIDIA GPU status
+and usage.")
+ (license license-gnu:expat)))
(define-public nvidia-exec
(package
@@ -310,18 +829,18 @@ Further xorg should be configured by adding:
(add-after 'install 'wrap-nvx
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append #$output "/bin/nvx")
- `("PATH" ":" prefix
- ,(fold (lambda (input paths)
- (let* ((in (assoc-ref
- inputs input))
- (bin (string-append
- in "/bin")))
- (append (filter
- file-exists?
- (list bin))
- paths)))
- '()
- '("jq" "lshw" "lsof")))))))))
+ `("PATH" ":" prefix
+ ,(fold (lambda (input paths)
+ (let* ((in (assoc-ref
+ inputs input))
+ (bin (string-append
+ in "/bin")))
+ (append (filter
+ file-exists?
+ (list bin))
+ paths)))
+ '()
+ '("jq" "lshw" "lsof")))))))))
(inputs (list bash-minimal jq lshw lsof))
(home-page "https://github.com/pedro00dk/nvidia-exec")
(synopsis "GPU switching without login out for Nvidia Optimus laptops")
@@ -330,6 +849,34 @@ Further xorg should be configured by adding:
laptops.")
(license license-gnu:gpl3+)))
+(define-public nvidia-htop
+ (package
+ (name "nvidia-htop")
+ (version "1.0.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "nvidia-htop" version))
+ (sha256
+ (base32
+ "0lv9cpccpkbg0d577irm1lp9rx6pacyk2pk9v41k9s9hyl4b7hvx"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-libnvidia
+ (lambda _
+ (substitute* "nvidia-htop.py"
+ (("nvidia-smi")
+ (string-append #$(this-package-input
+ "nvidia-driver")
+ "/bin/nvidia-smi"))))))))
+ (inputs (list nvidia-driver))
+ (propagated-inputs (list python-termcolor))
+ (home-page "https://github.com/peci1/nvidia-htop")
+ (synopsis "Tool to enrich the output of nvidia-smi")
+ (description "This package provides tool for enriching the output of
+nvidia-smi.")
+ (license license-gnu:bsd-3)))
+
(define-public nvidia-nvml
(package
(name "nvidia-nvml")
@@ -368,257 +915,98 @@ simultaneous NVML calls from multiple threads.")
;; Doesn't have any specific LICENSE file, but see COPYRIGHT.txt for details.
(license (license:nonfree "file://COPYRIGHT.txt"))))
-(define-public nvidia-libs
- (package
- (name "nvidia-libs")
- (version nvidia-version)
- (source
- (origin
- (uri (format #f "http://us.download.nvidia.com/XFree86/Linux-x86_64/~a/~a.run"
- version
- (format #f "NVIDIA-Linux-x86_64-~a" version)))
- (sha256 (base32 "0krwcxc0j19vjnk8sv6mx1lin2rm8hcfhc2hg266846jvcws1dsg"))
- (method url-fetch)
- (file-name (string-append "nvidia-driver-" version "-checkout"))))
- (build-system copy-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'unpack
- (lambda* (#:key inputs #:allow-other-keys #:rest r)
- (let ((source (assoc-ref inputs "source")))
- (invoke "sh" source "--extract-only")
- (chdir ,(format #f "NVIDIA-Linux-x86_64-~a" version))
- #t)))
- (delete 'build)
- (delete 'check)
- (add-after 'install 'patch-symlink
- (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
- (use-modules (ice-9 ftw)
- (ice-9 regex)
- (ice-9 textual-ports))
- (let* ((out (assoc-ref outputs "out"))
- (libdir (string-append out "/lib"))
- (bindir (string-append out "/bin"))
- (etcdir (string-append out "/etc")))
- ;; ------------------------------
- ;; patchelf
- (let* ((libc (assoc-ref inputs "libc"))
- (ld.so (string-append libc ,(glibc-dynamic-linker)))
-
- (out (assoc-ref outputs "out"))
- (rpath (string-join
- (list "$ORIGIN"
- (string-append out "/lib")
- (string-append libc "/lib")
- (string-append (assoc-ref inputs "atk") "/lib")
- (string-append (assoc-ref inputs "cairo") "/lib")
- (string-append (assoc-ref inputs "gcc:lib") "/lib")
- (string-append (assoc-ref inputs "gdk-pixbuf") "/lib")
- (string-append (assoc-ref inputs "glib") "/lib")
- (string-append (assoc-ref inputs "gtk+") "/lib")
- (string-append (assoc-ref inputs "gtk2") "/lib")
- (string-append (assoc-ref inputs "libx11") "/lib")
- (string-append (assoc-ref inputs "libxext") "/lib")
- (string-append (assoc-ref inputs "pango") "/lib")
- (string-append (assoc-ref inputs "wayland") "/lib"))
- ":")))
- (define (patch-elf file)
- (format #t "Patching ~a ...~%" file)
- (unless (string-contains file ".so")
- (invoke "patchelf" "--set-interpreter" ld.so file))
- (invoke "patchelf" "--set-rpath" rpath file))
- (for-each (lambda (file)
- (when (elf-file? file)
- (patch-elf file)))
- (find-files out ".*\\.so")))
-
- ;; ------------------------------
- ;; Create short name symbolic links
- (for-each (lambda (file)
- (let* ((short (regexp-substitute
- #f
-
- (string-match "([^/]*\\.so).*" file)
- 1))
- (major (cond
- ((or (string=? short "libGLX.so")
- (string=? short "libGLX_nvidia.so")
- (string=? short "libEGL_nvidia.so")) "0")
- ((string=? short "libGLESv2.so") "2")
- (else "1")))
- (mid (string-append short "." major))
- (short-file (string-append libdir "/" short))
- (mid-file (string-append libdir "/" mid)))
- ;; FIXME the same name, print out warning at least
- ;; [X] libEGL.so.1.1.0
- ;; [ ] libEGL.so.435.21
- (when (not (file-exists? short-file))
- (format #t "Linking ~a to ~a ...~%" short file)
- (symlink (basename file) short-file))
- (when (not (file-exists? mid-file))
- (format #t "Linking ~a to ~a ...~%" mid file)
- (symlink (basename file) mid-file))))
- (find-files libdir "\\.so\\."))
- #t))))
- #:install-plan
- ,@(match (%current-system)
- ("x86_64-linux" '(`(("." "lib" #:include-regexp ("^./[^/]+\\.so")))))
- ("i686-linux" '(`(("32" "lib" #:include-regexp ("^./[^/]+\\.so")))))
- (_ '()))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (native-inputs
- `(("patchelf" ,patchelf)
- ("perl" ,perl)
- ("python" ,python-2)
- ("which" ,which)
- ("xz" ,xz)))
- (inputs
- `(("atk" ,atk)
- ("cairo" ,cairo)
- ("gcc:lib" ,gcc "lib")
- ("gdk-pixbuf" ,gdk-pixbuf)
- ("glib" ,glib)
- ("gtk+" ,gtk+)
- ("gtk2" ,gtk+-2)
- ("libc" ,glibc)
- ("libx11" ,libx11)
- ("libxext" ,libxext)
- ("wayland" ,wayland)))
- (home-page "https://www.nvidia.com")
- (synopsis "Libraries of the proprietary Nvidia driver")
- (description "These are the libraries of the evil Nvidia driver compatible
-with the ones usually provided by Mesa. To use these libraries with
-packages that have been compiled with a mesa output, take a look at the nvda
-package.")
- (license (license:nonfree (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
-
-(define-public nvidia-module
+(define-public nvidia-system-monitor
(package
- (name "nvidia-module")
- (version nversion)
+ (name "nvidia-system-monitor")
+ (version "1.5")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/NVIDIA/open-gpu-kernel-modules")
- (commit nversion)))
+ (url "https://github.com/congard/nvidia-system-monitor-qt")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1mkibm0i943ljcy921i63jzc0db6r4pm1ycmwbka9kddcviyb3gk"))))
- (build-system linux-module-build-system)
+ "0aghdqljvjmc02g9jpc7sb3yhha738ywny51riska56hkxd3jg2l"))))
+ (build-system cmake-build-system)
(arguments
- (list #:linux linux
- #:source-directory "kernel-open"
- #:tests? #f
- #:make-flags
- #~(list (string-append "CC=" #$(cc-for-target))
- (string-append "SYSSRC=" (assoc-ref %build-inputs
- "linux-module-builder")
- "/lib/modules/build"))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fixpath
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "kernel-open/Kbuild"
- (("/bin/sh") (string-append #$bash-minimal "/bin/sh")))))
- (replace 'build
- (lambda* (#:key make-flags outputs #:allow-other-keys)
- (apply invoke
- `("make" "-j"
- ,@make-flags "modules")))))))
- (inputs (list bash-minimal))
- (home-page "https://github.com/NVIDIA/open-gpu-kernel-modules")
- (synopsis "Nvidia kernel module")
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-nvidia-smi
+ (lambda _
+ (let ((nvidia-smi (string-append #$(this-package-input
+ "nvidia-driver")
+ "/bin/nvidia-smi")))
+ (substitute* "src/core/InfoProvider.cpp"
+ (("nvidia-smi")
+ nvidia-smi))
+ (substitute* "src/main.cpp"
+ (("which nvidia-smi")
+ (string-append "which " nvidia-smi))
+ (("exec..nvidia-smi")
+ (string-append "exec(\"" nvidia-smi))))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (install-file "qnvsm" bin)))))))
+ (inputs (list qtbase-5 qtdeclarative-5 nvidia-driver))
+ (home-page "https://github.com/congard/nvidia-system-monitor-qt")
+ (synopsis "Task manager for Nvidia graphics cards")
(description
- "This package provides Nvidia open-gpu-kernel-modules. However,
-they are only for the latest GPU architectures Turing and Ampere. Also they
-still require firmware file @code{gsp.bin} to be loaded as well as closed
-source userspace tools from the corresponding driver release.")
- (license license-gnu:gpl2)))
+ "This package provides a task manager for Nvidia graphics cards.")
+ (license license-gnu:expat)))
-(define-public nvidia-settings
+(define-public python-nvidia-ml-py
(package
- (name "nvidia-settings")
- (version nvidia-version)
+ (name "python-nvidia-ml-py")
+ (version "11.495.46")
(source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/NVIDIA/nvidia-settings")
- (commit version)))
- (file-name (git-file-name name version))
+ (method url-fetch)
+ (uri (pypi-uri "nvidia-ml-py" version))
(sha256
(base32
- "1lnj5hwmfkzs664fxlhljqy323394s1i7qzlpsjyrpm07sa93bky"))))
- (build-system gnu-build-system)
+ "09cnb7xasd7brby52j70y7fqsfm9n6gvgqf769v0cmj74ypy2s4g"))))
+ (build-system python-build-system)
(arguments
- (list #:tests? #f ;no test suite
- #:make-flags
- #~(list (string-append "PREFIX=" #$output)
- (string-append "CC=" #$(cc-for-target)))
- #:phases
- #~(modify-phases %standard-phases
- (delete 'configure)
- (add-after 'install 'wrap-program
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (wrap-program (string-append out "/bin/nvidia-settings")
- `("LD_LIBRARY_PATH" ":" prefix
- (,(string-append out "/lib/"))))))))))
- (native-inputs (list m4
- pkg-config))
- (inputs (list bash-minimal
- dbus
- glu
- gtk+
- gtk+-2
- libvdpau
- libx11
- libxext
- libxrandr
- libxv
- libxxf86vm))
- (synopsis "Nvidia driver control panel")
- (description
- "This package provides Nvidia driver control panel for monitor
-configuration, creating application profiles, gpu monitoring and more.")
- (home-page "https://github.com/NVIDIA/nvidia-settings")
- (license license-gnu:gpl2)))
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-libnvidia
+ (lambda _
+ (substitute* "pynvml.py"
+ (("libnvidia-ml.so.1")
+ (string-append #$(this-package-input
+ "nvidia-driver")
+ "/lib/libnvidia-ml.so.1"))))))))
+ (inputs (list nvidia-driver))
+ (home-page "https://forums.developer.nvidia.com")
+ (synopsis "Python Bindings for the NVIDIA Management Library")
+ (description "This package provides official Python Bindings for the NVIDIA
+Management Library")
+ (license license-gnu:bsd-3)))
-;; nvda is used as a name because it has the same length as mesa which is
-;; required for grafting
-(define-public nvda
+(define-public python-py3nvml
(package
- (inherit nvidia-libs)
- (name "nvda")
- (source #f)
- (build-system trivial-build-system)
+ (name "python-py3nvml")
+ (version "0.2.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "py3nvml" version))
+ (sha256
+ (base32
+ "0wxxky9amy38q7qjsdmmznk1kqdzwd680ps64i76cvlab421vvh9"))))
+ (build-system python-build-system)
(arguments
- (list #:modules '((guix build union))
- #:builder #~(begin
- (use-modules (guix build union)
- (srfi srfi-1)
- (ice-9 regex))
- (union-build (assoc-ref %outputs "out")
- (list #$mesa #$nvidia-libs)
- #:resolve-collision (lambda (files) (let ((file
- (if (string-match "nvidia-libs" (first files))
- (first files)
- (last files))))
- (format #t "chosen ~a ~%" file)
- file))))))
- (description "These are the libraries of the evil Nvidia driver,
-packaged in such a way that you can use the transformation option
-@code{--with-graft=mesa=nvda} to use the nvidia driver with a package that requires mesa.")
- (inputs
- (list mesa
- nvidia-libs))
- (outputs '("out"))))
-
-(define mesa/fake
- (package
- (inherit mesa)
- (replacement nvda)))
-
-(define-public replace-mesa
- (package-input-rewriting `((,mesa . ,mesa/fake))))
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-libnvidia
+ (lambda _
+ (substitute* "py3nvml/py3nvml.py"
+ (("libnvidia-ml.so.1")
+ (string-append #$(this-package-input
+ "nvidia-driver")
+ "/lib/libnvidia-ml.so.1"))))))))
+ (propagated-inputs (list nvidia-driver python-xmltodict))
+ (home-page "https://github.com/fbcotter/py3nvml")
+ (synopsis "Unoffcial Python 3 Bindings for the NVIDIA Management Library")
+ (description "This package provides unofficial Python 3 Bindings for the
+NVIDIA Management Library")
+ (license license-gnu:bsd-3)))
diff --git a/nongnu/packages/patches/broadcom-sta-debian-fix-kernel-warnings.patch b/nongnu/packages/patches/broadcom-sta-debian-fix-kernel-warnings.patch
deleted file mode 100644
index e9bf66a..0000000
--- a/nongnu/packages/patches/broadcom-sta-debian-fix-kernel-warnings.patch
+++ /dev/null
@@ -1,161 +0,0 @@
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -1968,7 +1968,7 @@
-
- if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
- WL_DBG(("Beacon is larger than buffer. Discarding\n"));
-- return err;
-+ return -E2BIG;
- }
- notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
- WL_BSS_INFO_MAX, GFP_KERNEL);
-@@ -1992,9 +1992,15 @@
- beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
- wl_rst_ie(wl);
-
-- wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
-- wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
-+ err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
-+ if (err)
-+ goto inform_single_bss_out;
-+
-+ err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
- offsetof(struct wl_cfg80211_bss_info, frame_buf));
-+ if (err)
-+ goto inform_single_bss_out;
-+
- notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
- wl_get_ielen(wl);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
-@@ -2006,14 +2012,14 @@
- #endif
- if (freq == 0) {
- WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
-- kfree(notif_bss_info);
-- return -EINVAL;
-+ err = -EINVAL;
-+ goto inform_single_bss_out;
- }
- channel = ieee80211_get_channel(wiphy, freq);
- if (unlikely(!channel)) {
- WL_ERR(("ieee80211_get_channel error\n"));
-- kfree(notif_bss_info);
-- return -EINVAL;
-+ err = -EINVAL;
-+ goto inform_single_bss_out;
- }
-
- WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
-@@ -2021,28 +2027,37 @@
- mgmt->u.beacon.capab_info, &bi->BSSID));
-
- signal = notif_bss_info->rssi * 100;
-- cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
-- le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
-- if (unlikely(!cbss)) {
-- WL_ERR(("cfg80211_inform_bss_frame error\n"));
-- kfree(notif_bss_info);
-- return -EINVAL;
-- }
-
-- notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
-- notify_ielen = le32_to_cpu(bi->ie_length);
-+ if (!wl->scan_request) {
-+ cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
-+ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
-+ if (unlikely(!cbss)) {
-+ WL_ERR(("cfg80211_inform_bss_frame error\n"));
-+ err = -ENOMEM;
-+ goto inform_single_bss_out;
-+ }
-+ } else {
-+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
-+ notify_ielen = le32_to_cpu(bi->ie_length);
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
-- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
-- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
-- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
-+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
-+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
-+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
- #else
-- cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
-- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
-- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
-+ cbss = cfg80211_inform_bss(wiphy, channel,
-+ wl->active_scan ?
-+ CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
-+ (const u8 *)(bi->BSSID.octet), 0,
-+ beacon_proberesp->capab_info,
-+ beacon_proberesp->beacon_int,
-+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
- #endif
--
-- if (unlikely(!cbss))
-- return -ENOMEM;
-+ if (unlikely(!cbss)) {
-+ WL_ERR(("cfg80211_inform_bss error\n"));
-+ err = -ENOMEM;
-+ goto inform_single_bss_out;
-+ }
-+ }
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
- cfg80211_put_bss(wiphy, cbss);
-@@ -2050,6 +2065,7 @@
- cfg80211_put_bss(cbss);
- #endif
-
-+inform_single_bss_out:
- kfree(notif_bss_info);
-
- return err;
-@@ -2316,6 +2332,9 @@
- if (err)
- goto update_bss_info_out;
-
-+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
-+ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
-+
- ie = ((u8 *)bi) + bi->ie_offset;
- ie_len = bi->ie_length;
- } else {
-@@ -2328,11 +2347,18 @@
- ie_len = bss->len_information_elements;
- #endif
- wl->conf->channel = *bss->channel;
-+ }
-+
-+ if (bss) {
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
- cfg80211_put_bss(wiphy, bss);
- #else
- cfg80211_put_bss(bss);
- #endif
-+ } else {
-+ WL_DBG(("Could not update BSS\n"));
-+ err = -EINVAL;
-+ goto update_bss_info_out;
- }
-
- tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
-@@ -2360,10 +2386,17 @@
- struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
- s32 err = 0;
-
-- wl_get_assoc_ies(wl);
-+ err = wl_get_assoc_ies(wl);
-+ if (err)
-+ return err;
-+
- memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
- memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
-- wl_update_bss_info(wl);
-+
-+ err = wl_update_bss_info(wl);
-+ if (err)
-+ return err;
-+
- cfg80211_roamed(ndev,
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
- &wl->conf->channel,
diff --git a/nongnu/packages/patches/broadcom-sta-fix_mac_profile_discrepancy.patch b/nongnu/packages/patches/broadcom-sta-fix_mac_profile_discrepancy.patch
deleted file mode 100644
index 586bfcc..0000000
--- a/nongnu/packages/patches/broadcom-sta-fix_mac_profile_discrepancy.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-https://bugs.archlinux.org/task/61090
-
---- a/src/wl/sys/wl_cfg80211_hybrid.c 2015-09-19 00:47:30.000000000 +0200
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2018-11-14 14:06:03.313487995 +0100
-@@ -1444,11 +1444,10 @@
- s32 rate;
- s32 err = 0;
-
- if (memcmp(mac, wl->profile->bssid, ETHER_ADDR_LEN)) {
- WL_ERR(("Wrong Mac address, mac = %pM profile =%pM\n", mac, wl->profile->bssid));
-- return -ENOENT;
- }
-
- err = wl_dev_ioctl(dev, WLC_GET_RATE, &rate, sizeof(rate));
- if (err) {
- WL_DBG(("Could not get rate (%d)\n", err));
diff --git a/nongnu/packages/patches/broadcom-sta-gcc.patch b/nongnu/packages/patches/broadcom-sta-gcc.patch
deleted file mode 100644
index f93e3f1..0000000
--- a/nongnu/packages/patches/broadcom-sta-gcc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile 2014-06-26 10:42:08.000000000 +0000
-+++ b/Makefile 2014-07-17 22:44:01.662297228 +0000
-@@ -126,6 +126,8 @@
- EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include
- #EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR
-
-+EXTRA_CFLAGS += -Wno-date-time
-+
- EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
-
- KBASE ?= /lib/modules/`uname -r`
diff --git a/nongnu/packages/patches/broadcom-sta-license.patch b/nongnu/packages/patches/broadcom-sta-license.patch
deleted file mode 100644
index aebb463..0000000
--- a/nongnu/packages/patches/broadcom-sta-license.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c
---- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900
-+++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900
-@@ -171,6 +171,8 @@
- static void wl_free_if(wl_info_t *wl, wl_if_t *wlif);
- static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info);
-
-+MODULE_LICENSE("MIXED/Proprietary");
-+
- #if defined(WL_CONFIG_RFKILL)
- #include <linux/rfkill.h>
- static int wl_init_rfkill(wl_info_t *wl);
-
diff --git a/nongnu/packages/patches/broadcom-sta-linux-4.11.patch b/nongnu/packages/patches/broadcom-sta-linux-4.11.patch
deleted file mode 100644
index a779f8c..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-4.11.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index a9671e2..da36405 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -30,6 +30,9 @@
- #include <linux/kthread.h>
- #include <linux/netdevice.h>
- #include <linux/ieee80211.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+#include <linux/sched/signal.h>
-+#endif
- #include <net/cfg80211.h>
- #include <linux/nl80211.h>
- #include <net/rtnetlink.h>
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 489c9f5..f8278ad 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -117,6 +117,9 @@ int wl_found = 0;
-
- typedef struct priv_link {
- wl_if_t *wlif;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+ unsigned long last_rx;
-+#endif
- } priv_link_t;
-
- #define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
-@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
- {
- struct sk_buff *oskb = (struct sk_buff *)p;
- struct sk_buff *skb;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+ priv_link_t *priv_link;
-+#endif
- uchar *pdata;
- uint len;
-
-@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
- if (skb == NULL) return;
-
- skb->dev = wl->monitor_dev;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+ priv_link = MALLOC(wl->osh, sizeof(priv_link_t));
-+ priv_link = netdev_priv(skb->dev);
-+ priv_link->last_rx = jiffies;
-+#else
- skb->dev->last_rx = jiffies;
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
- skb_reset_mac_header(skb);
- #else
diff --git a/nongnu/packages/patches/broadcom-sta-linux-4.12.patch b/nongnu/packages/patches/broadcom-sta-linux-4.12.patch
deleted file mode 100644
index 8abc73d..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-4.12.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index da36405..d3741eb 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
- #endif
-
- static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ enum nl80211_iftype type, struct vif_params *params);
-+#else
- enum nl80211_iftype type, u32 *flags, struct vif_params *params);
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
- static s32
- wl_cfg80211_scan(struct wiphy *wiphy,
-@@ -466,7 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
-
- static s32
- wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ enum nl80211_iftype type,
-+#else
- enum nl80211_iftype type, u32 *flags,
-+#endif
- struct vif_params *params)
- {
- struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
-@@ -2361,6 +2369,20 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- const wl_event_msg_t *e, void *data)
- {
- struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ struct cfg80211_bss *bss;
-+ struct wlc_ssid *ssid;
-+ ssid = &wl->profile->ssid;
-+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
-+ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
-+ struct cfg80211_roam_info roam_info = {
-+ .bss = bss,
-+ .req_ie = conn_info->req_ie,
-+ .req_ie_len = conn_info->req_ie_len,
-+ .resp_ie = conn_info->resp_ie,
-+ .resp_ie_len = conn_info->resp_ie_len,
-+ };
-+#endif
- s32 err = 0;
-
- wl_get_assoc_ies(wl);
-@@ -2368,12 +2390,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- wl_update_bss_info(wl);
- cfg80211_roamed(ndev,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ &roam_info,
-+#else
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
- &wl->conf->channel,
- #endif
- (u8 *)&wl->bssid,
- conn_info->req_ie, conn_info->req_ie_len,
-- conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
-+ conn_info->resp_ie, conn_info->resp_ie_len,
-+#endif
-+ GFP_KERNEL);
- WL_DBG(("Report roaming result\n"));
-
- set_bit(WL_STATUS_CONNECTED, &wl->status);
diff --git a/nongnu/packages/patches/broadcom-sta-linux-4.15.patch b/nongnu/packages/patches/broadcom-sta-linux-4.15.patch
deleted file mode 100644
index 523fa29..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-4.15.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-See: https://lkml.org/lkml/2017/11/25/90
-
-diff -urNZ a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
---- a/src/wl/sys/wl_linux.c 2015-09-18 22:47:30.000000000 +0000
-+++ b/src/wl/sys/wl_linux.c 2018-01-31 22:52:10.859856221 +0000
-@@ -93,7 +93,11 @@
-
- #include <wlc_wowl.h>
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-+static void wl_timer(struct timer_list *tl);
-+#else
- static void wl_timer(ulong data);
-+#endif
- static void _wl_timer(wl_timer_t *t);
- static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
-
-@@ -2298,9 +2302,15 @@
- }
-
- static void
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-+wl_timer(struct timer_list *tl)
-+{
-+ wl_timer_t *t = from_timer(t, tl, timer);
-+#else
- wl_timer(ulong data)
- {
- wl_timer_t *t = (wl_timer_t *)data;
-+#endif
-
- if (!WL_ALL_PASSIVE_ENAB(t->wl))
- _wl_timer(t);
-@@ -2352,9 +2362,13 @@
-
- bzero(t, sizeof(wl_timer_t));
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-+ timer_setup(&t->timer, wl_timer, 0);
-+#else
- init_timer(&t->timer);
- t->timer.data = (ulong) t;
- t->timer.function = wl_timer;
-+#endif
- t->wl = wl;
- t->fn = fn;
- t->arg = arg;
diff --git a/nongnu/packages/patches/broadcom-sta-linux-4.7.patch b/nongnu/packages/patches/broadcom-sta-linux-4.7.patch
deleted file mode 100644
index 566680a..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-4.7.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-Since Linux 4.7, the enum ieee80211_band is no longer used
-
-This shall cause no problem's since both enums ieee80211_band
-and nl80211_band were added in the same commit:
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
-
-This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
-
-Reference:
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
-
---- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:57:36.159340297 -0500
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:58:18.442323435 -0500
-@@ -236,7 +236,7 @@
- #endif
-
- #define CHAN2G(_channel, _freq, _flags) { \
-- .band = IEEE80211_BAND_2GHZ, \
-+ .band = NL80211_BAND_2GHZ, \
- .center_freq = (_freq), \
- .hw_value = (_channel), \
- .flags = (_flags), \
-@@ -245,7 +245,7 @@
- }
-
- #define CHAN5G(_channel, _flags) { \
-- .band = IEEE80211_BAND_5GHZ, \
-+ .band = NL80211_BAND_5GHZ, \
- .center_freq = 5000 + (5 * (_channel)), \
- .hw_value = (_channel), \
- .flags = (_flags), \
-@@ -379,7 +379,7 @@
- };
-
- static struct ieee80211_supported_band __wl_band_2ghz = {
-- .band = IEEE80211_BAND_2GHZ,
-+ .band = NL80211_BAND_2GHZ,
- .channels = __wl_2ghz_channels,
- .n_channels = ARRAY_SIZE(__wl_2ghz_channels),
- .bitrates = wl_g_rates,
-@@ -387,7 +387,7 @@
- };
-
- static struct ieee80211_supported_band __wl_band_5ghz_a = {
-- .band = IEEE80211_BAND_5GHZ,
-+ .band = NL80211_BAND_5GHZ,
- .channels = __wl_5ghz_a_channels,
- .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
- .bitrates = wl_a_rates,
-@@ -395,7 +395,7 @@
- };
-
- static struct ieee80211_supported_band __wl_band_5ghz_n = {
-- .band = IEEE80211_BAND_5GHZ,
-+ .band = NL80211_BAND_5GHZ,
- .channels = __wl_5ghz_n_channels,
- .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
- .bitrates = wl_a_rates,
-@@ -1876,8 +1876,8 @@
- wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
- #endif
- wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
-- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
-- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
-+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
-+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
- wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
- wdev->wiphy->cipher_suites = __wl_cipher_suites;
- wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
-@@ -2000,7 +2000,7 @@
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
- freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
- (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
-- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
-+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
- #else
- freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
- #endif
-@@ -2116,7 +2116,7 @@
- return err;
- }
- chan = wf_chspec_ctlchan(chanspec);
-- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
-+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
- freq = ieee80211_channel_to_frequency(chan, band);
- channel = ieee80211_get_channel(wiphy, freq);
- cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
-@@ -2250,10 +2250,10 @@
- join_params->params.chanspec_list[0] =
- ieee80211_frequency_to_channel(chan->center_freq);
-
-- if (chan->band == IEEE80211_BAND_2GHZ) {
-+ if (chan->band == NL80211_BAND_2GHZ) {
- chanspec |= WL_CHANSPEC_BAND_2G;
- }
-- else if (chan->band == IEEE80211_BAND_5GHZ) {
-+ else if (chan->band == NL80211_BAND_5GHZ) {
- chanspec |= WL_CHANSPEC_BAND_5G;
- }
- else {
-@@ -2885,7 +2885,7 @@
-
- if (phy == 'n' || phy == 'a' || phy == 'v') {
- wiphy = wl_to_wiphy(wl);
-- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
-+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
- }
-
- return err;
diff --git a/nongnu/packages/patches/broadcom-sta-linux-4.8.patch b/nongnu/packages/patches/broadcom-sta-linux-4.8.patch
deleted file mode 100644
index 20e8a9a..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-4.8.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone@canonical.com>
-Date: Fri, 2 Sep 2016 17:35:34 +0200
-Subject: [PATCH 1/1] Add support for Linux 4.8
-
-Orginal author: Krzysztof Kolasa
----
- src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index 2fc71fe..ec5e472 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- s32 err = 0;
-
- if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+ struct cfg80211_scan_info info = {
-+ .aborted = true,
-+ };
-+ WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
-+ cfg80211_scan_done(wl->scan_request, &info);
-+#else
- WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
- cfg80211_scan_done(wl->scan_request, true);
-+#endif
- wl->scan_request = NULL;
- }
-
-@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
-
- scan_done_out:
- if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+ struct cfg80211_scan_info info = {
-+ .aborted = false,
-+ };
-+ cfg80211_scan_done(wl->scan_request, &info);
-+#else
- cfg80211_scan_done(wl->scan_request, false);
-+#endif
- wl->scan_request = NULL;
- }
- rtnl_unlock();
-@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
- s32 err = 0;
-
- if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+ struct cfg80211_scan_info info = {
-+ .aborted = true,
-+ };
-+ cfg80211_scan_done(wl->scan_request, &info);
-+#else
- cfg80211_scan_done(wl->scan_request, true);
-+#endif
- wl->scan_request = NULL;
- }
-
---
-2.7.4
-
diff --git a/nongnu/packages/patches/broadcom-sta-linux-5.1.patch b/nongnu/packages/patches/broadcom-sta-linux-5.1.patch
deleted file mode 100644
index 8f04a73..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-5.1.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit bcb06af629a36eb84f9a35ac599ec7e51e2d39fb
-Author: georgewhewell <georgerw@gmail.com>
-Date: Sat May 18 21:22:37 2019 +0100
-
- find src -type f -name \'*.c\' -exec sed -i "s/get_ds()/KERNEL_DS/g" {} \;
-
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index 7b606e0..51c81bc 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -450,7 +450,7 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
- ifr.ifr_data = (caddr_t)&ioc;
-
- fs = get_fs();
-- set_fs(get_ds());
-+ set_fs(KERNEL_DS);
- #if defined(WL_USE_NETDEV_OPS)
- err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
- #else
-diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
-index c4c610b..9c3c74e 100644
---- a/src/wl/sys/wl_iw.c
-+++ b/src/wl/sys/wl_iw.c
-@@ -117,7 +117,7 @@ dev_wlc_ioctl(
- ifr.ifr_data = (caddr_t) &ioc;
-
- fs = get_fs();
-- set_fs(get_ds());
-+ set_fs(KERNEL_DS);
- #if defined(WL_USE_NETDEV_OPS)
- ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
- #else
diff --git a/nongnu/packages/patches/broadcom-sta-linux-5.10.patch b/nongnu/packages/patches/broadcom-sta-linux-5.10.patch
deleted file mode 100644
index c77fdc5..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-5.10.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
-From: Joan Bruguera <joanbrugueram@gmail.com>
-Date: Tue, 13 Oct 2020 19:35:55 +0200
-Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
-
-Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
-
-Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
-
-NB: Some checks in wlc_ioctl_internal are likely superfluous,
- but I'm not familiar enough with the driver to remove them with confidence.
-
-See also: https://lwn.net/Articles/722267/
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
-
-Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
----
- src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
- src/wl/sys/wl_iw.c | 25 ++-------------------
- src/wl/sys/wl_linux.c | 40 ++++++++++++++++++++++++++++-----
- src/wl/sys/wl_linux.h | 2 ++
- src/wl/sys/wlc_pub.h | 1 +
- 5 files changed, 42 insertions(+), 51 deletions(-)
-
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index 73c4b82..2e6df32 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -38,6 +38,7 @@
- #include <wlioctl.h>
- #include <proto/802.11.h>
- #include <wl_cfg80211_hybrid.h>
-+#include <wl_linux.h>
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
- #include <linux/sched/signal.h>
-@@ -443,30 +444,8 @@ static void key_endian_to_host(struct wl_wsec_key *key)
- static s32
- wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
- {
-- struct ifreq ifr;
-- struct wl_ioctl ioc;
-- mm_segment_t fs;
-- s32 err = 0;
--
- BUG_ON(len < sizeof(int));
--
-- memset(&ioc, 0, sizeof(ioc));
-- ioc.cmd = cmd;
-- ioc.buf = arg;
-- ioc.len = len;
-- strcpy(ifr.ifr_name, dev->name);
-- ifr.ifr_data = (caddr_t)&ioc;
--
-- fs = get_fs();
-- set_fs(KERNEL_DS);
--#if defined(WL_USE_NETDEV_OPS)
-- err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#else
-- err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#endif
-- set_fs(fs);
--
-- return err;
-+ return wlc_ioctl_internal(dev, cmd, arg, len);
- }
-
- static s32
-diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
-index 9c3c74e..e346b15 100644
---- a/src/wl/sys/wl_iw.c
-+++ b/src/wl/sys/wl_iw.c
-@@ -37,6 +37,7 @@ typedef const struct si_pub si_t;
-
- #include <wl_dbg.h>
- #include <wl_iw.h>
-+#include <wl_linux.h>
-
- extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
- uint32 reason, char* stringBuf, uint buflen);
-@@ -103,29 +104,7 @@ dev_wlc_ioctl(
- int len
- )
- {
-- struct ifreq ifr;
-- wl_ioctl_t ioc;
-- mm_segment_t fs;
-- int ret;
--
-- memset(&ioc, 0, sizeof(ioc));
-- ioc.cmd = cmd;
-- ioc.buf = arg;
-- ioc.len = len;
--
-- strcpy(ifr.ifr_name, dev->name);
-- ifr.ifr_data = (caddr_t) &ioc;
--
-- fs = get_fs();
-- set_fs(KERNEL_DS);
--#if defined(WL_USE_NETDEV_OPS)
-- ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#else
-- ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#endif
-- set_fs(fs);
--
-- return ret;
-+ return wlc_ioctl_internal(dev, cmd, arg, len);
- }
-
- static int
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index cca7ee1..e491df7 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -1647,10 +1647,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- goto done2;
- }
-
-- if (get_fs().seg == KERNEL_DS.seg)
-- buf = ioc.buf;
--
-- else if (ioc.buf) {
-+ if (ioc.buf) {
- if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
- bcmerror = BCME_NORESOURCE;
- goto done2;
-@@ -1671,7 +1668,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- WL_UNLOCK(wl);
-
- done1:
-- if (ioc.buf && (ioc.buf != buf)) {
-+ if (ioc.buf) {
- if (copy_to_user(ioc.buf, buf, ioc.len))
- bcmerror = BCME_BADADDR;
- MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
-@@ -1684,6 +1681,39 @@ done2:
- return (OSL_ERROR(bcmerror));
- }
-
-+int
-+wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
-+{
-+ wl_info_t *wl;
-+ wl_if_t *wlif;
-+ int bcmerror;
-+
-+ if (!dev)
-+ return -ENETDOWN;
-+
-+ wl = WL_INFO(dev);
-+ wlif = WL_DEV_IF(dev);
-+ if (wlif == NULL || wl == NULL || wl->dev == NULL)
-+ return -ENETDOWN;
-+
-+ bcmerror = 0;
-+
-+ WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
-+
-+ WL_LOCK(wl);
-+ if (!capable(CAP_NET_ADMIN)) {
-+ bcmerror = BCME_EPERM;
-+ } else {
-+ bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
-+ }
-+ WL_UNLOCK(wl);
-+
-+ ASSERT(VALID_BCMERROR(bcmerror));
-+ if (bcmerror != 0)
-+ wl->pub->bcmerror = bcmerror;
-+ return (OSL_ERROR(bcmerror));
-+}
-+
- static struct net_device_stats*
- wl_get_stats(struct net_device *dev)
- {
-diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
-index 5b1048e..c8c1f41 100644
---- a/src/wl/sys/wl_linux.h
-+++ b/src/wl/sys/wl_linux.h
-@@ -22,6 +22,7 @@
- #define _wl_linux_h_
-
- #include <wlc_types.h>
-+#include <wlc_pub.h>
-
- typedef struct wl_timer {
- struct timer_list timer;
-@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
- extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
- extern void wl_free(wl_info_t *wl);
- extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
-+extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
- extern struct net_device * wl_netdev_get(wl_info_t *wl);
-
- #endif
-diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
-index 53a98b8..2b5a029 100644
---- a/src/wl/sys/wlc_pub.h
-+++ b/src/wl/sys/wlc_pub.h
-@@ -24,6 +24,7 @@
-
- #include <wlc_types.h>
- #include <wlc_utils.h>
-+#include <siutils.h>
- #include "proto/802.11.h"
- #include "proto/bcmevent.h"
-
---
-2.28.0
diff --git a/nongnu/packages/patches/broadcom-sta-linux-5.6.patch b/nongnu/packages/patches/broadcom-sta-linux-5.6.patch
deleted file mode 100644
index df5af79..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-5.6.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From dd057e40a167f4febb1a7c77dd32b7d36056952c Mon Sep 17 00:00:00 2001
-From: Herman van Hazendonk <github.com@herrie.org>
-Date: Tue, 31 Mar 2020 17:09:55 +0200
-Subject: [PATCH] Add fixes for 5.6 kernel
-
-Use ioremap instead of ioremap_nocache and proc_ops instead of file_operations on Linux kernel 5.6 and above.
-
-Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
----
- src/shared/linux_osl.c | 6 +++++-
- src/wl/sys/wl_linux.c | 21 ++++++++++++++++++++-
- 2 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
-index 6157d18..dcfc075 100644
---- a/src/shared/linux_osl.c
-+++ b/src/shared/linux_osl.c
-@@ -942,7 +942,11 @@ osl_getcycles(void)
- void *
- osl_reg_map(uint32 pa, uint size)
- {
-- return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+ return (ioremap((unsigned long)pa, (unsigned long)size));
-+ #else
-+ return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
-+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
- }
-
- void
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 0d05100..6d9dd0d 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -582,10 +582,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
- }
- wl->bcm_bustype = bustype;
-
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+ if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
-+ WL_ERROR(("wl%d: ioremap() failed\n", unit));
-+ goto fail;
-+ }
-+ #else
- if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
- WL_ERROR(("wl%d: ioremap() failed\n", unit));
- goto fail;
- }
-+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
-
- wl->bar1_addr = bar1_addr;
- wl->bar1_size = bar1_size;
-@@ -772,8 +779,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
- if ((val & 0x0000ff00) != 0)
- pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
- bar1_size = pci_resource_len(pdev, 2);
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+ bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
-+ bar1_size);
-+ #else
- bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
- bar1_size);
-+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
- wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
- pdev->irq, bar1_addr, bar1_size);
-
-@@ -3335,12 +3347,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
- }
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+static const struct proc_ops wl_fops = {
-+ .proc_read = wl_proc_read,
-+ .proc_write = wl_proc_write,
-+};
-+#else
- static const struct file_operations wl_fops = {
- .owner = THIS_MODULE,
- .read = wl_proc_read,
- .write = wl_proc_write,
- };
--#endif
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */
-
- static int
- wl_reg_proc_entry(wl_info_t *wl)
diff --git a/nongnu/packages/patches/broadcom-sta-linux-5.9.patch b/nongnu/packages/patches/broadcom-sta-linux-5.9.patch
deleted file mode 100644
index 56de11d..0000000
--- a/nongnu/packages/patches/broadcom-sta-linux-5.9.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u -r a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
---- a/src/wl/sys/wl_linux.c 2020-10-12 21:19:15.256305165 +0000
-+++ b/src/wl/sys/wl_linux.c 2020-10-12 21:20:38.687530895 +0000
-@@ -1643,7 +1643,7 @@
- goto done2;
- }
-
-- if (segment_eq(get_fs(), KERNEL_DS))
-+ if (get_fs().seg == KERNEL_DS.seg)
- buf = ioc.buf;
-
- else if (ioc.buf) {
diff --git a/nongnu/packages/patches/broadcom-sta-null-pointer-fix.patch b/nongnu/packages/patches/broadcom-sta-null-pointer-fix.patch
deleted file mode 100644
index adef19f..0000000
--- a/nongnu/packages/patches/broadcom-sta-null-pointer-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Description: Fixing null pointer crash
-
-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
-Bug-Ubuntu: https://launchpad.net/bugs/1415880
-Last-Update: 2015-08-18
-
----
- src/wl/sys/wl_linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 860b935..295156f 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
- wlif = WL_DEV_IF(dev);
- wl = WL_INFO(dev);
-
-+ skb->prev = NULL;
- if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
-- skb->prev = NULL;
-
- TXQ_LOCK(wl);
-
---
-1.9.1
-
diff --git a/nongnu/packages/patches/broadcom-sta-rdtscl.patch b/nongnu/packages/patches/broadcom-sta-rdtscl.patch
deleted file mode 100644
index 1b9862c..0000000
--- a/nongnu/packages/patches/broadcom-sta-rdtscl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
-is renamed to rdtsc(). Move the macro contents in-line and call the
-new function. References:
-
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
-
-diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
---- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300
-+++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200
-@@ -932,7 +932,11 @@
- uint cycles;
-
- #if defined(__i386__)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
-+ cycles = (u32)rdtsc();
-+#else
- rdtscl(cycles);
-+#endif
- #else
- cycles = 0;
- #endif
diff --git a/nongnu/packages/playonlinux.scm b/nongnu/packages/playonlinux.scm
index 45f8340..8027c2d 100644
--- a/nongnu/packages/playonlinux.scm
+++ b/nongnu/packages/playonlinux.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages playonlinux)
#:use-module ((guix licenses) :prefix license:)
diff --git a/nongnu/packages/printers.scm b/nongnu/packages/printers.scm
index 6a10da2..77d5f98 100644
--- a/nongnu/packages/printers.scm
+++ b/nongnu/packages/printers.scm
@@ -1,26 +1,12 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2021 Kahka F
-;;; Copyright © 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2021, 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
(define-module (nongnu packages printers)
#:use-module (gnu packages)
#:use-module (gnu packages cups)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
@@ -29,149 +15,147 @@
(define-public hplip-plugin
(package
- (inherit hplip)
- (name "hplip-plugin")
- (description "Hewlett-Packard printer drivers with nonfree plugin.")
- (source (origin (inherit (package-source hplip))
- (snippet
- (delete '(for-each
- delete-file
- (find-files "." (lambda
- (file stat)
- (elf-file? file))))
- (origin-snippet (package-source hplip))))))
- (inputs (alist-delete "python-pyqt" (package-inputs hplip)))
- (native-inputs
- (append
- `(("hplip-plugin"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://developers.hp.com/sites/default/files/hplip-"
- (package-version hplip) "-plugin.run"))
- (sha256
- (base32
- "1ffqnmmghxqclv66qq14wypfha2xalcrbrjw0dqkmpvbnzwbn49g")))))
- (package-native-inputs hplip)))
- (arguments
- (substitute-keyword-arguments
- (package-arguments hplip)
- ((#:configure-flags cf)
- `(delete "--enable-qt5" ,cf))
- ((#:phases ph)
- `(modify-phases
- ,ph
- (replace
- 'fix-hard-coded-file-names
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- ;; FIXME: use merged ppds (I think actually only
- ;; drvs need to be merged).
- (cupsdir (assoc-ref inputs "cups-minimal")))
- (substitute* "base/g.py"
- (("'/usr/share;[^']*'")
- (string-append "'" cupsdir "/share'"))
- (("'/etc/hp/hplip.conf'")
- (string-append "'" out
- "/etc/hp/hplip.conf" "'"))
- (("/var/lib/hp")
- (string-append
- out
- "/var/lib/hp")))
+ (inherit hplip)
+ (name "hplip-plugin")
+ (description "Hewlett-Packard printer drivers with nonfree plugin.")
+ (source (origin
+ (inherit (package-source hplip))
+ (snippet
+ (delete '(for-each
+ delete-file
+ (find-files "." (lambda (file stat)
+ (elf-file? file))))
+ (origin-snippet (package-source hplip))))))
+ (inputs (alist-delete "python-pyqt" (package-inputs hplip)))
+ (native-inputs
+ (append
+ `(("hplip-plugin"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://developers.hp.com/sites/default/files/hplip-"
+ (package-version hplip) "-plugin.run"))
+ ;; TODO: Since this needs to be updated on every update to Guix's
+ ;; hplip in order to build, might be better to decouple this
+ ;; package from hplip. In the meantime, update this hash when
+ ;; hplip is updated in Guix.
+ (sha256
+ (base32
+ "0zq66hm7ni6w1c3cxy1gxrxzvyvfn0lhjnia8p4azvz2r309j9s0")))))
+ (package-native-inputs hplip)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments hplip)
+ ((#:configure-flags cf)
+ #~(delete "--enable-qt5" #$cf))
+ ((#:phases ph)
+ #~(modify-phases #$ph
+ (replace 'fix-hard-coded-file-names
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ ;; FIXME: use merged ppds (I think actually only
+ ;; drvs need to be merged).
+ (cupsdir (assoc-ref inputs "cups-minimal")))
+ (substitute* "base/g.py"
+ (("'/usr/share;[^']*'")
+ (string-append "'" cupsdir "/share'"))
+ (("'/etc/hp/hplip.conf'")
+ (string-append "'" out
+ "/etc/hp/hplip.conf" "'"))
+ (("/var/lib/hp")
+ (string-append
+ out
+ "/var/lib/hp")))
- (substitute* "Makefile.in"
- (("[[:blank:]]check-plugin\\.py[[:blank:]]") " ")
- ;; FIXME Use beginning-of-word in regexp.
- (("[[:blank:]]plugin\\.py[[:blank:]]") " ")
- (("/usr/include/libusb-1.0")
- (string-append (assoc-ref inputs "libusb")
- "/include/libusb-1.0"))
- (("hplip_statedir =.*$")
- ;; Don't bail out while trying to create
- ;; /var/lib/hplip. We can safely change its value
- ;; here because it's hard-coded in the code anyway.
- "hplip_statedir = $(prefix)/var/lib/hp\n")
- (("hplip_confdir = /etc/hp")
- ;; This is only used for installing the default config.
- (string-append "hplip_confdir = " out
- "/etc/hp"))
- (("halpredir = /usr/share/hal/fdi/preprobe/10osvendor")
- ;; We don't use hal.
- (string-append "halpredir = " out
- "/share/hal/fdi/preprobe/10osvendor"))
- (("rulesdir = /etc/udev/rules.d")
- ;; udev rules will be merged by base service.
- (string-append "rulesdir = " out
- "/lib/udev/rules.d"))
- (("rulessystemdir = /usr/lib/systemd/system")
- ;; We don't use systemd.
- (string-append "rulessystemdir = " out
- "/lib/systemd/system"))
- (("/etc/sane.d")
- (string-append out "/etc/sane.d")))
+ (substitute* "Makefile.in"
+ (("[[:blank:]]check-plugin\\.py[[:blank:]]") " ")
+ ;; FIXME Use beginning-of-word in regexp.
+ (("[[:blank:]]plugin\\.py[[:blank:]]") " ")
+ (("/usr/include/libusb-1.0")
+ (string-append (assoc-ref inputs "libusb")
+ "/include/libusb-1.0"))
+ (("hplip_statedir =.*$")
+ ;; Don't bail out while trying to create
+ ;; /var/lib/hplip. We can safely change its value
+ ;; here because it's hard-coded in the code anyway.
+ "hplip_statedir = $(prefix)/var/lib/hp\n")
+ (("hplip_confdir = /etc/hp")
+ ;; This is only used for installing the default config.
+ (string-append "hplip_confdir = " out
+ "/etc/hp"))
+ (("halpredir = /usr/share/hal/fdi/preprobe/10osvendor")
+ ;; We don't use hal.
+ (string-append "halpredir = " out
+ "/share/hal/fdi/preprobe/10osvendor"))
+ (("rulesdir = /etc/udev/rules.d")
+ ;; udev rules will be merged by base service.
+ (string-append "rulesdir = " out
+ "/lib/udev/rules.d"))
+ (("rulessystemdir = /usr/lib/systemd/system")
+ ;; We don't use systemd.
+ (string-append "rulessystemdir = " out
+ "/lib/systemd/system"))
+ (("/etc/sane.d")
+ (string-append out "/etc/sane.d")))
- (substitute* "common/utils.h"
- (("/var/lib/hp")
- (string-append
- out
- "/var/lib/hp")))
- #t)))
- (add-after
- 'install-models-dat 'install-plugins
- (lambda* (#:key outputs system inputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (state-dir (string-append out "/var/lib/hp"))
- (hp-arch (assoc-ref
- '(("i686-linux" . "x86_32")
- ("x86_64-linux" . "x86_64")
- ("armhf-linux" . "arm32")
- ("aarch64-linux" . "aarch64"))
- system)))
- (unless hp-arch
- (error (string-append
- "HPLIP plugin not supported on "
- system)))
- (invoke "sh" (assoc-ref inputs "hplip-plugin")
- "--noexec" "--keep")
- (chdir "plugin_tmp")
- (install-file "plugin.spec"
- (string-append out "/share/hplip/"))
+ (substitute* "common/utils.h"
+ (("/var/lib/hp")
+ (string-append
+ out
+ "/var/lib/hp"))))))
+ (add-after 'install-models-dat 'install-plugins
+ (lambda* (#:key outputs system inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (state-dir (string-append out "/var/lib/hp"))
+ (hp-arch (assoc-ref
+ '(("i686-linux" . "x86_32")
+ ("x86_64-linux" . "x86_64")
+ ("armhf-linux" . "arm32")
+ ("aarch64-linux" . "aarch64"))
+ system)))
+ (unless hp-arch
+ (error (string-append
+ "HPLIP plugin not supported on "
+ system)))
+ (invoke "sh" (assoc-ref inputs "hplip-plugin")
+ "--noexec" "--keep")
+ (chdir "plugin_tmp")
+ (install-file "plugin.spec"
+ (string-append out "/share/hplip/"))
- (for-each
- (lambda (file)
- (install-file
- file
- (string-append out "/share/hplip/data/firmware")))
- (find-files "." "\\.fw.gz$"))
+ (for-each
+ (lambda (file)
+ (install-file
+ file
+ (string-append out "/share/hplip/data/firmware")))
+ (find-files "." "\\.fw.gz$"))
- (install-file "license.txt"
- (string-append out "/share/hplip/data/plugins"))
- (mkdir-p
- (string-append out "/share/hplip/prnt/plugins"))
- (for-each
- (lambda (type plugins)
- (for-each
- (lambda (plugin)
- (let ((file (string-append plugin "-" hp-arch ".so"))
- (dir (string-append out "/share/hplip/"
- type "/plugins")))
- (install-file file dir)
- (chmod (string-append dir "/" file) #o755)
- (symlink (string-append dir "/" file)
- (string-append dir "/" plugin ".so"))))
- plugins))
- '("prnt" "scan")
- '(("lj" "hbpl1")
- ("bb_soap" "bb_marvell" "bb_soapht" "bb_escl")))
- (mkdir-p state-dir)
- (call-with-output-file
- (string-append state-dir "/hplip.state")
- (lambda (port)
- (simple-format port "[plugin]
+ (install-file "license.txt"
+ (string-append out "/share/hplip/data/plugins"))
+ (mkdir-p
+ (string-append out "/share/hplip/prnt/plugins"))
+ (for-each
+ (lambda (type plugins)
+ (for-each
+ (lambda (plugin)
+ (let ((file (string-append plugin "-" hp-arch ".so"))
+ (dir (string-append out "/share/hplip/"
+ type "/plugins")))
+ (install-file file dir)
+ (chmod (string-append dir "/" file) #o755)
+ (symlink (string-append dir "/" file)
+ (string-append dir "/" plugin ".so"))))
+ plugins))
+ '("prnt" "scan")
+ '(("lj" "hbpl1")
+ ("bb_soap" "bb_marvell" "bb_soapht" "bb_escl")))
+ (mkdir-p state-dir)
+ (call-with-output-file
+ (string-append state-dir "/hplip.state")
+ (lambda (port)
+ (simple-format port "[plugin]
installed=1
eula=1
version=~A
-" ,(package-version hplip))))
+" #$(package-version hplip))))
- (substitute* (string-append out "/etc/hp/hplip.conf")
- (("/usr") out))
- #t)))))))))
+ (substitute* (string-append out "/etc/hp/hplip.conf")
+ (("/usr") out)))))))))))
diff --git a/nongnu/packages/productivity.scm b/nongnu/packages/productivity.scm
new file mode 100644
index 0000000..e6158f9
--- /dev/null
+++ b/nongnu/packages/productivity.scm
@@ -0,0 +1,108 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+
+(define-module (nongnu packages productivity)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages pciutils)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages wget)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (nonguix build-system chromium-binary)
+ #:use-module ((nonguix licenses) #:prefix license:))
+
+(define-public anytype
+ (package
+ (name "anytype")
+ (version "0.40.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://anytype-release.fra1.cdn.digitaloceanspaces.com/"
+ name "_" version "_amd64.deb"))
+ (file-name (string-append "anytype-" version ".deb"))
+ (sha256
+ (base32
+ "01q6dzks8hjb2whdkj7c816fji7rn5dpx00ss7rxgvxb5rdz19gr"))))
+ (build-system chromium-binary-build-system)
+ (arguments
+ (list
+ ;; almost 300MB
+ #:substitutable? #f
+ #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
+ #:wrapper-plan
+ #~(map (lambda (file)
+ (string-append "opt/Anytype/" file))
+ '("anytype"
+ "chrome-sandbox"
+ "chrome_crashpad_handler"
+ "libEGL.so"
+ "libffmpeg.so"
+ "libGLESv2.so"
+ "libvk_swiftshader.so"
+ "libvulkan.so.1"
+ "resources/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node"
+ "resources/app.asar.unpacked/node_modules/keytar/build/Release/obj.target/keytar.node"))
+ #:install-plan
+ #~'(("opt/" "/share")
+ ("usr/share/" "/share"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'binary-unpack 'strip-python
+ (lambda _
+ (delete-file
+ (string-append "opt/Anytype/resources/app.asar.unpacked/"
+ "node_modules/keytar/build/node_gyp_bins/python3"))))
+ (add-before 'install 'patch-assets
+ (lambda _
+ (let* ((bin (string-append #$output "/bin"))
+ (usr/share "./usr/share")
+ (old-exe "/opt/Anytype/anytype")
+ (exe (string-append bin "/anytype")))
+ (substitute* (string-append usr/share "/applications/anytype.desktop")
+ (((string-append "^Exec=" old-exe)) (string-append "Exec=" exe))))))
+ (add-before 'install-wrapper 'symlink-entrypoint
+ (lambda _
+ (let* ((bin (string-append #$output "/bin"))
+ (exe (string-append bin "/anytype"))
+ (share (string-append #$output "/share/Anytype"))
+ (target (string-append share "/anytype")))
+ (mkdir-p bin)
+ (symlink target exe)
+ (wrap-program exe
+ `("LD_LIBRARY_PATH" = (,share)))))))))
+ (inputs
+ (list bzip2
+ flac
+ gdk-pixbuf
+ harfbuzz
+ libexif
+ libglvnd
+ libpng
+ libva
+ libxscrnsaver
+ opus
+ pciutils
+ snappy
+ util-linux
+ xdg-utils
+ wget))
+ (synopsis "Productivity and note-taking app")
+ (supported-systems '("x86_64-linux"))
+ (description "Anytype is an E2E encrypted, cross-platform, productivity and
+note taking app. It stores all the data locally and allows for peer-to-peer
+synchronization.")
+ (home-page "https://anytype.io")
+ (license (license:nonfree
+ "https://github.com/anyproto/anytype-ts/blob/main/LICENSE.md"))))
diff --git a/nongnu/packages/radio.scm b/nongnu/packages/radio.scm
index d697bdc..a7ed2c3 100644
--- a/nongnu/packages/radio.scm
+++ b/nongnu/packages/radio.scm
@@ -1,17 +1,5 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
(define-module (nongnu packages radio)
#:use-module (gnu packages gcc)
@@ -97,25 +85,27 @@ package. E.g.: @code{(udev-rules-service 'sdrplay sdrplay)}")
"/license.txt")))))
(define-public soapysdrplay3
- (package
- (name "soapysdrplay3")
- (version "0.4.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/pothosware/SoapySDRPlay3")
- (commit (string-append "soapy-sdrplay3-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0kp5gz03c29kxclaqijpyqknaijlbldrhy04mn98vnli9g1h1isq"))))
- (build-system cmake-build-system)
- (inputs
- (list sdrplay soapysdr))
- (arguments
- `(#:tests? #f)) ; No test suite
- (home-page "https://github.com/pothosware/SoapySDRPlay3/wiki")
- (synopsis "SoapySDR SDRplay module")
- (description "This package provides SDRplay devices support to the
+ (let ((commit "9e5c80c45454db56b8b10bb997369f37e750631b")
+ (revision "1"))
+ (package
+ (name "soapysdrplay3")
+ (version (git-version "0.4.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pothosware/SoapySDRPlay3")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1sl3i1id0fily7qfm0yihxsaqy4f4gr85vl5ip05azhhbrnmnayx"))))
+ (build-system cmake-build-system)
+ (inputs
+ (list sdrplay soapysdr))
+ (arguments
+ `(#:tests? #f)) ; No test suite
+ (home-page "https://github.com/pothosware/SoapySDRPlay3/wiki")
+ (synopsis "SoapySDR SDRplay module")
+ (description "This package provides SDRplay devices support to the
SoapySDR library.")
- (license expat)))
+ (license expat))))
diff --git a/nongnu/packages/scanner.scm b/nongnu/packages/scanner.scm
index 9a8b3cf..ab4772f 100644
--- a/nongnu/packages/scanner.scm
+++ b/nongnu/packages/scanner.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages scanner)
#:use-module (ice-9 match)
diff --git a/nongnu/packages/steam-client.scm b/nongnu/packages/steam-client.scm
deleted file mode 100644
index 9a9ae5e..0000000
--- a/nongnu/packages/steam-client.scm
+++ /dev/null
@@ -1,767 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020 pkill-9
-;;; Copyright © 2020, 2021 ison <ison@airmail.cc>
-;;; Copyright © 2021 pineapples
-;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
-;;; Copyright © 2021 Kozo <kozodev@runbox.com>
-;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
-
-;;; The steam script provided by this package may optionally be started as
-;;; a shell instead of automatically launching Steam by setting the
-;;; environment variable DEBUG=1. If the sandbox is started this way then
-;;; Steam should subsequently be launched via fhs-internal.
-
-;;; The sandbox shell aids in debugging missing container elements. For
-;;; example a missing symlink may be created manually before launching Steam
-;;; to verify that the fix works before filing a bug report.
-
-;;; A container wrapper creates the following store items:
-;;; * Main container package [nonguix-container->package] (basically a dummy
-;;; package with symlink to wrapper script)
-;;; - Wrapper script [make-container-wrapper] (runs "guix shell")
-;;; References:
-;;; -> manifest.scm [make-container-manifest] (used by wrapper to guarantee
-;;; exact store items)
-;;; -> container-internal [make-container-internal] {inside container}
-;;; (dummy package added to container with symlink to internal-script)
-;;; - internal-script [make-internal-script] {inside container}
-;;; (script run in-container which performs additional setup before
-;;; launching the desired application)
-;;; References:
-;;; -> Wrapped package {inside container} (in this case Steam).
-
-;;; Note: The extra container-internal package is necessary because there is no
-;;; way to add the container package's own store path to its own manifest unless
-;;; the manifest is printed inside the build phases. However, the (guix gexp)
-;;; module is apparently disallowed inside build phases.
-
-(define-module (nongnu packages steam-client)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module ((nonguix licenses) #:prefix license:)
- #:use-module (guix gexp)
- #:use-module (guix git-download)
- #:use-module (guix utils)
- #:use-module (guix packages)
- #:use-module (guix records)
- #:use-module (guix download)
- #:use-module (guix build-system gnu)
- #:use-module (guix build-system python)
- #:use-module (guix build-system trivial)
- #:use-module (guix transformations)
- #:use-module (gnu packages)
- #:use-module (gnu packages audio)
- #:use-module (gnu packages base)
- #:use-module (gnu packages bash)
- #:use-module (gnu packages certs)
- #:use-module (gnu packages compression)
- #:use-module (gnu packages elf)
- #:use-module (gnu packages file)
- #:use-module (gnu packages fonts)
- #:use-module (gnu packages fontutils)
- #:use-module (gnu packages freedesktop)
- #:use-module (gnu packages gawk)
- #:use-module (gnu packages gcc)
- #:use-module (gnu packages gl)
- #:use-module (gnu packages glib)
- #:use-module (gnu packages gnome)
- #:use-module (gnu packages graphics)
- #:use-module (gnu packages libbsd)
- #:use-module (gnu packages libusb)
- #:use-module (gnu packages linux)
- #:use-module (gnu packages llvm)
- #:use-module (gnu packages logging)
- #:use-module (nongnu packages nvidia)
- #:use-module (gnu packages pciutils)
- #:use-module (gnu packages pulseaudio)
- #:use-module (gnu packages python)
- #:use-module (gnu packages python-web)
- #:use-module (gnu packages python-xyz)
- #:use-module (gnu packages toolkits)
- #:use-module (gnu packages video)
- #:use-module (nonguix utils))
-
-(define-record-type* <nonguix-container>
- nonguix-container make-nonguix-container
- nonguix-container? this-nonguix-container
- (name ngc-name)
- (version ngc-version (default #f))
- (wrap-package ngc-wrap-package)
- (run ngc-run)
- (wrapper-name ngc-wrapper-name (default "nonguix-container-wrapper"))
- (manifest-name ngc-manifest-name (default "nonguix-container-manifest.scm"))
- (internal-name ngc-internal-name (default "fhs-internal"))
- (sandbox-home ngc-sandbox-home (default ".local/share/guix-sandbox-home"))
- (union64 ngc-union64 (default '()))
- (union32 ngc-union32 (default '()))
- (preserved-env ngc-preserved-env (default '()))
- (exposed ngc-exposed (default '()))
- (shared ngc-shared (default '()))
- (modules ngc-modules (default '()))
- (packages ngc-packages (default '()))
- (link-files ngc-link-files (default '()))
- (home-page ngc-home-page (default #f))
- (synopsis ngc-synopsis (default #f))
- (description ngc-description (default #f))
- (license ngc-license (default #f)))
-
-(define steam-client
- (package
- (name "steam-client")
- (version "1.0.0.75")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "http://repo.steampowered.com/steam/archive/precise/steam_"
- version ".tar.gz"))
- (sha256
- (base32
- "19rn29slsxv7b5fisr1jzn79bskzifbj5hmxqn2436ivwfjna9g5"))
- (file-name (string-append name "-" version ".tar.gz"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f ; There are no tests.
- #:validate-runpath? #f ; Looks for bin/steam which doesn't exist.
- #:make-flags
- (list "PREFIX=" (string-append "DESTDIR=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- ;; Patch Makefile so it creates links to the store rather than /lib.
- (add-after 'unpack 'patch-makefile
- (lambda _
- (substitute* "Makefile"
- (("-fns ")
- "-fns $(DESTDIR)"))))
- (delete 'patch-dot-desktop-files)
- (add-after 'unpack 'patch-startscript
- (lambda _
- (substitute* "bin_steam.sh"
- (("/usr") (assoc-ref %outputs "out")))))
- (add-after 'patch-dot-desktop-files 'patch-desktop-file
- (lambda _
- (let ((path (string-append (assoc-ref %outputs "out")
- "/share/applications/")))
- (substitute* (string-append path "steam.desktop")
- (("Exec=.*/steam") "Exec=steam"))
- (copy-file (string-append path "steam.desktop")
- (string-append path "steam-asound32.desktop"))
- (substitute* (string-append path "steam-asound32.desktop")
- (("Exec=steam %U") "Exec=steam %U -- --asound32")
- (("Name=Steam") "Name=Steam (32-bit ALSA)")))))
- ;; Steamdeps installs missing packages, which doesn't work with Guix.
- (add-after 'install-binaries 'post-install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref %outputs "out")))
- (delete-file (string-append out "/lib/steam/bin_steamdeps.py"))
- (delete-file (string-append out "/bin/steamdeps"))))))))
- (home-page "https://store.steampowered.com")
- (synopsis "Digital distribution platform for managing and playing games")
- (description "Steam is a digital software distribution platform created by Valve.")
- (license (license:nonfree "file:///share/doc/steam/steam_subscriber_agreement.txt"))))
-
-(define glibc-for-fhs
- (package
- (inherit glibc)
- (name "glibc-for-fhs")
- (source (origin (inherit (package-source glibc))
- ;; Remove Guix's patch to read ld.so.cache from /gnu/store
- ;; directories, re-enabling the default /etc/ld.so.cache
- ;; behavior.
- (patches (delete (car (search-patches "glibc-dl-cache.patch"))
- (origin-patches (package-source glibc))))))))
-
-;; After guix commit to add a replacement for expat (security fixes),
-;; https://git.savannah.gnu.org/cgit/guix.git/commit/?id=2045852b096131a714409aa0cc4fe17938f60b15
-;; a profile collision happens with the propagated expat (now grafted) from
-;; fontconfig. See upstream report https://issues.guix.gnu.org/53406
-;; So we define a fontconfig variation that explicitly does the expat replacement
-;; which works around this bug for now, at the cost of building fontconfig.
-;; TODO: remove once upstream bug is fixed
-(define fontconfig-fixed
- (package
- (inherit fontconfig)
- (propagated-inputs
- (modify-inputs (package-propagated-inputs fontconfig)
- (replace "expat" (@@ (gnu packages xml) expat/fixed))))))
-
-(define fhs-min-libs
- `(("glibc" ,glibc-for-fhs)
- ("glibc-locales" ,glibc-locales)))
-
-(define steam-client-libs
- `(("bash" ,bash) ; Required for steam startup.
- ("coreutils" ,coreutils)
- ("diffutils" ,diffutils)
- ("dbus-glib" ,dbus-glib) ; Required for steam browser.
- ("elfutils" ,elfutils) ; Required for capturing library dependencies in pv.
- ("eudev" ,eudev) ; Required for steamwebhelper/heavy runtime.
- ;; TODO: set back to ,fontconfig once https://issues.guix.gnu.org/53406 is fixed
- ("fontconfig" ,fontconfig-fixed) ; Required for steam client.
- ("file" ,file) ; Used for steam installation.
- ("find" ,findutils) ; Required at least for some logging.
- ("freetype" ,freetype) ; Required for steam login.
- ("gawk" ,gawk)
- ("gcc:lib" ,gcc "lib") ; Required for steam startup.
- ("grep" ,grep)
- ("libbsd" ,libbsd)
- ("libcap" ,libcap) ; Required for SteamVR, but needs pkexec too.
- ("libusb" ,libusb) ; Required for SteamVR.
- ("libva" ,libva) ; Required for hardware video encoding/decoding.
- ("libvdpau" ,libvdpau) ; Required for hardware video encoding/decoding.
- ("libvdpau-va-gl" ,libvdpau-va-gl) ; Additional VDPAU support.
- ("llvm" ,llvm-11) ; Required for mesa.
- ("mesa" ,mesa) ; Required for steam startup.
- ("nss-certs" ,nss-certs) ; Required for steam login.
- ("pciutils" ,pciutils) ; Tries to run lspci at steam startup.
- ("procps" ,procps)
- ("sed" ,sed)
- ("tar" ,tar)
- ("usbutils" ,usbutils) ; Required for SteamVR.
- ("util-linux" ,util-linux) ; Required for steam login.
- ("wayland" ,wayland) ; Required for mesa vulkan (e.g. libvulkan_radeon).
- ("xdg-utils" ,xdg-utils)
- ("xz" ,xz)
- ("zenity" ,zenity))) ; Required for progress dialogs.
-
-(define steam-gameruntime-libs
- `(("alsa-lib" ,alsa-lib) ; Required for audio in most games.
- ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio") ; Required for audio in most games.
- ("font-dejavu" ,font-dejavu)
- ("font-liberation" ,font-liberation)
- ("imgui" ,imgui-1.86) ; Required for MangoHud.
- ("mangohud" ,mangohud)
- ("openal" ,openal) ; Prevents corrupt audio in Crypt of the Necrodancer.
- ("pulseaudio" ,pulseaudio) ; Prevents corrupt audio in Sven Coop.
- ("python" ,python) ; Required for KillingFloor2 and Wreckfest.
- ("spdlog" ,spdlog))) ; Required for MangoHud.
-
-(define* (fhs-union inputs #:key (name "fhs-union") (version "0.0") (system "x86_64-linux"))
- "Create a package housing the union of inputs."
- (package
- (name name)
- (version version)
- (source #f)
- (inputs inputs)
- (build-system trivial-build-system)
- (arguments
- `(#:system ,system
- #:modules ((guix build union))
- #:builder
- (begin
- (use-modules (ice-9 match)
- (guix build union))
- (match %build-inputs
- (((_ . directories) ...)
- (union-build (assoc-ref %outputs "out")
- directories)
- #t)))))
- (home-page #f)
- (synopsis "Libraries used for FHS")
- (description "Libraries needed to build a guix container FHS.")
- (license #f)))
-
-(define (ld.so.conf->ld.so.cache ld-conf)
- "Create a ld.so.cache file-like object from an ld.so.conf file."
- (computed-file
- "ld.so.cache"
- (with-imported-modules
- `((guix build utils))
- #~(begin
- (use-modules (guix build utils))
- (let ((ldconfig (string-append #$glibc "/sbin/ldconfig")))
- (invoke ldconfig
- "-X" ; Don't update symbolic links.
- "-f" #$ld-conf ; Use #$ld-conf as configuration file.
- "-C" #$output)))))) ; Use #$output as cache file.
-
-(define (packages->ld.so.conf packages)
- "Takes a list of package objects and returns a file-like object for ld.so.conf
-in the Guix store"
- (computed-file
- "ld.so.conf"
- (with-imported-modules
- `((guix build union)
- (guix build utils))
- #~(begin
- (use-modules (guix build union)
- (guix build utils))
- ;; Need to quote "#$packages" as #$packages tries to "apply" the first item to the rest, like a procedure.
- (let* ((packages '#$packages)
- ;; Add "/lib" to each package.
- ;; TODO Make this more general for other needed directories.
- (dirs-lib
- (lambda (packages)
- (map (lambda (package)
- (string-append package "/lib"))
- packages)))
- (fhs-lib-dirs
- (dirs-lib packages)))
- (call-with-output-file #$output
- (lambda (port)
- (for-each (lambda (directory)
- (display directory port)
- (newline port))
- fhs-lib-dirs)))
- #$output)))))
-
-(define steam-ld.so.conf
- (packages->ld.so.conf
- (list (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-64")
- (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-32"
- #:system "i686-linux"))))
-
-(define steam-ld.so.cache
- (ld.so.conf->ld.so.cache steam-ld.so.conf))
-
-(define (nonguix-container->package container)
- "Return a package with wrapper script to launch the supplied container object
-in a sandboxed FHS environment."
- (let* ((fhs-internal (make-container-internal container))
- (fhs-manifest (make-container-manifest container fhs-internal))
- (fhs-wrapper (make-container-wrapper container fhs-manifest fhs-internal))
- (pkg (ngc-wrap-package container)))
- (package
- (name (ngc-name container))
- (version (or (ngc-version container)
- (package-version pkg)))
- (source #f)
- (inputs `(("wrap-package" ,(ngc-wrap-package container))
- ,@(if (null? (ngc-union64 container))
- '()
- `(("fhs-union-64" ,(ngc-union64 container))))
- ,@(if (null? (ngc-union32 container))
- '()
- `(("fhs-union-32" ,(ngc-union32 container))))
- ("fhs-internal" ,fhs-internal)
- ("fhs-wrapper" ,fhs-wrapper)
- ("fhs-manifest" ,fhs-manifest)))
- (build-system trivial-build-system)
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((out (assoc-ref %outputs "out"))
- (internal-target (string-append (assoc-ref %build-inputs "fhs-internal")
- "/bin/" ,(ngc-internal-name container)))
- (internal-dest (string-append out "/sbin/" ,(ngc-internal-name container)))
- (manifest-target (assoc-ref %build-inputs "fhs-manifest"))
- (manifest-dest (string-append out "/etc/" ,(ngc-manifest-name container)))
- (wrapper-target (assoc-ref %build-inputs "fhs-wrapper"))
- (wrapper-dest (string-append out "/bin/" ,(ngc-name container)))
- (link-files ',(ngc-link-files container)))
- (mkdir-p (string-append out "/sbin"))
- (mkdir-p (string-append out "/etc"))
- (mkdir-p (string-append out "/bin"))
- (symlink internal-target internal-dest)
- (symlink wrapper-target wrapper-dest)
- (symlink manifest-target manifest-dest)
- (for-each
- (lambda (link)
- (mkdir-p (dirname (string-append out "/" link)))
- (symlink (string-append (assoc-ref %build-inputs "wrap-package")
- "/" link)
- (string-append out "/" link)))
- link-files)))))
- (home-page (or (ngc-home-page container)
- (package-home-page pkg)))
- (synopsis (or (ngc-synopsis container)
- (package-synopsis pkg)))
- (description (or (ngc-description container)
- (package-description pkg)))
- (license (or (ngc-license container)
- (package-license pkg))))))
-
-(define (make-container-wrapper container fhs-manifest fhs-internal)
- "Return a script file-like object that launches the supplied container object
-in a sandboxed FHS environment."
- (program-file
- (ngc-wrapper-name container)
- (with-imported-modules
- `((guix build utils))
- #~(begin
- (use-modules (guix build utils))
- (define (preserve-var var)
- (string-append "--preserve=" var))
- (define* (add-path path #:key writable?)
- (let ((opt (if writable?
- "--share="
- "--expose=")))
- (if (pair? path)
- (string-append opt (car path) "=" (cdr path))
- (string-append opt path))))
- (define (exists-> file)
- (if (and file (file-exists? file))
- `(,file) '()))
- (let* ((run #$(file-append fhs-internal "/bin/" (ngc-internal-name container)))
- (manifest-file #$(file-append fhs-manifest))
- (xdg-runtime (getenv "XDG_RUNTIME_DIR"))
- (home (getenv "HOME"))
- (sandbox-home (or (getenv "GUIX_SANDBOX_HOME")
- (string-append home "/" #$(ngc-sandbox-home container))))
- (preserved-env '("^DBUS_"
- "^DISPLAY$"
- "^DRI_PRIME$"
- "^PRESSURE_VESSEL_" ; For pressure vessel options.
- "_PROXY$"
- "_proxy$"
- "^SDL_"
- "^STEAM_"
- "^VDPAU_DRIVER_PATH$" ; For VDPAU drivers.
- "^XAUTHORITY$"
- ;; Matching all ^XDG_ vars causes issues
- ;; discussed in 80decf05.
- "^XDG_DATA_HOME$"
- "^XDG_RUNTIME_DIR$"
- ;; The following are useful for debugging.
- "^CAPSULE_DEBUG$"
- "^G_MESSAGES_DEBUG$"
- "^LD_DEBUG$"
- "^LIBGL_DEBUG$"))
- (expose `("/dev/bus/usb" ; Needed for libusb.
- "/dev/dri"
- "/dev/input" ; Needed for controller input.
- "/dev/uinput" ; Needed for Steam Input.
- ,@(exists-> "/dev/nvidia0") ; needed for nvidia proprietary driver
- ,@(exists-> "/dev/nvidiactl")
- ,@(exists-> "/dev/nvidia-modeset")
- ,@(exists-> "/etc/machine-id")
- "/etc/localtime" ; Needed for correct time zone.
- "/sys/class/drm" ; Needed for hw monitoring like MangoHud.
- "/sys/class/hwmon" ; Needed for hw monitoring like MangoHud.
- "/sys/class/hidraw" ; Needed for devices like the Valve Index.
- "/sys/class/input" ; Needed for controller input.
- ,@(exists-> "/sys/class/power_supply") ; Needed for power monitoring like MangoHud.
- ,@(exists-> "/sys/class/powercap") ; Needed for power monitoring like MangoHud.
- "/sys/dev"
- "/sys/devices"
- ,@(exists-> "/var/run/dbus")))
- ;; /dev/hidraw is needed for SteamVR to access the HMD, although here we
- ;; share all hidraw devices. Instead we could filter to only share specific
- ;; device. See, for example, this script:
- ;; https://arvchristos.github.io/post/matching-dev-hidraw-devices-with-physical-devices/
- (share `(,@(find-files "/dev" "hidraw")
- "/dev/shm"
- ;; "/tmp/.X11-unix" is needed for bwrap, and "/tmp" more generally
- ;; for writing things like crash dumps and "steam_chrome_shm".
- "/tmp"
- ,(string-append sandbox-home "=" home)
- ,@(exists-> (string-append home "/.config/pulse"))
- ,@(exists-> (string-append xdg-runtime "/pulse"))
- ,@(exists-> (string-append xdg-runtime "/bus"))
- ,@(exists-> (getenv "XAUTHORITY"))))
- (DEBUG (equal? (getenv "DEBUG") "1"))
- (args (cdr (command-line)))
- (command (if DEBUG '()
- `("--" ,run ,@args))))
- ;; TODO: Remove once upstream change is merged and in stable pressure-vessel
- ;; (although may want to hold off for anyone using older pressure-vessel versions
- ;; for whatever reason), see:
- ;; https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/406
- (setenv "PRESSURE_VESSEL_FILESYSTEMS_RO" "/gnu/store")
- ;; By default VDPAU drivers are searched for in libvdpau's store
- ;; path, so set this path to where the drivers will actually be
- ;; located in the container.
- (setenv "VDPAU_DRIVER_PATH" "/lib64/vdpau")
- (format #t "\n* Launching ~a in sandbox: ~a.\n\n"
- #$(package-name (ngc-wrap-package container)) sandbox-home)
- (when DEBUG
- (format #t "* DEBUG set to 1: Starting shell. Launch application manually with: ~a.\n\n"
- #$(ngc-internal-name container)))
- (mkdir-p sandbox-home)
- (invoke #$(file-append pulseaudio "/bin/pulseaudio")
- "--start"
- "--exit-idle-time=60")
- (apply invoke
- `("guix" "shell"
- "--container" "--no-cwd" "--network"
- ,@(map preserve-var preserved-env)
- ,@(map add-path expose)
- ,@(map (lambda (item)
- (add-path item #:writable? #t))
- share)
- "-m" ,manifest-file
- ,@command)))))))
-
-(define (make-container-manifest container fhs-internal)
- "Return a scheme file-like object to be used as package manifest for FHS
-containers. This manifest will use the 'modules' and 'packages' fields
-specified in the container object, and will also include the exact store paths
-of the containers 'wrap-package', 'union32', and 'union64' fields, as well as
-the exact path for the fhs-internal package."
- (scheme-file
- (ngc-manifest-name container)
- #~(begin
- (use-package-modules
- #$@(ngc-modules container))
- (use-modules (guix gexp)
- (guix utils)
- (guix profiles)
- (guix store)
- (guix scripts package)
- (srfi srfi-11))
-
- ;; Copied from guix/scripts/package.scm.
- (define (store-item->manifest-entry item)
- "Return a manifest entry for ITEM, a \"/gnu/store/...\" file name."
- (let-values (((name version)
- (package-name->name+version (store-path-package-name item)
- #\-)))
- (manifest-entry
- (name name)
- (version version)
- (output "out") ;XXX: wild guess
- (item item))))
-
- (manifest-add
- (packages->manifest (list #$@(ngc-packages container)))
- (map store-item->manifest-entry
- '(#$(file-append (ngc-wrap-package container))
- #$(file-append (ngc-union64 container))
- #$(file-append (ngc-union32 container))
- #$(file-append fhs-internal)))))))
-
-(define (make-container-internal container)
- "Return a dummy package housing the fhs-internal script."
- (package
- (name (ngc-internal-name container))
- (version (or (ngc-version container)
- (package-version (ngc-wrap-package container))))
- (source #f)
- (inputs `(("fhs-internal-script" ,(make-internal-script container))))
- (build-system trivial-build-system)
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
- (internal-target (assoc-ref %build-inputs "fhs-internal-script"))
- (internal-dest (string-append bin "/" ,(ngc-internal-name container))))
- (mkdir-p bin)
- (symlink internal-target internal-dest)))))
- (home-page #f)
- (synopsis "Script used to set up sandbox")
- (description "Script used inside the FHS Guix container to set up the
-environment.")
- (license #f)))
-
-(define (make-internal-script container)
- "Return an fhs-internal script which is used to perform additional steps to
-set up the environment inside an FHS container before launching the desired
-application."
- ;; The ld cache is not created inside the container, meaning the paths it
- ;; contains are directly to /gnu/store/. Instead, it could be generated with
- ;; a generic ld.so.conf and result in paths more typical in an FHS distro,
- ;; like /lib within the container. This may be useful for future compatibility.
- (let* ((ld.so.conf steam-ld.so.conf)
- (ld.so.cache steam-ld.so.cache)
- (pkg (ngc-wrap-package container))
- (run (ngc-run container)))
- (program-file
- (ngc-internal-name container)
- (with-imported-modules
- `((guix build utils))
- #~(begin
- (use-modules (guix build utils)
- (ice-9 getopt-long))
- (define (path->str path)
- (if (list? path)
- (string-join path "/")
- path))
- (define (new-symlink pair)
- (let ((target (path->str (car pair)))
- (dest (path->str (cdr pair))))
- (unless (file-exists? dest)
- (symlink target dest))))
- (define (icd-symlink file)
- (new-symlink
- `(,file . ("/usr/share/vulkan/icd.d" ,(basename file)))))
- (define fhs-option-spec
- '((asound32 (value #f))))
- (let* ((guix-env (getenv "GUIX_ENVIRONMENT"))
- (union64 #$(file-append (ngc-union64 container)))
- (union32 #$(file-append (ngc-union32 container)))
- (ld.so.conf #$(file-append ld.so.conf))
- (ld.so.cache #$(file-append ld.so.cache))
- (all-args (cdr (command-line)))
- (fhs-args (member "--" all-args))
- (steam-args (if fhs-args
- (reverse (cdr (member "--" (reverse all-args))))
- all-args)))
- (delete-file "/bin/sh")
- (rmdir "/bin")
- (for-each
- mkdir-p
- '("/run/current-system/profile/etc"
- "/run/current-system/profile/share"
- "/sbin"
- "/usr/share/vulkan/icd.d"
- "/usr/share/vulkan/implicit_layer.d")) ; Implicit layers like MangoHud
- (for-each
- new-symlink
- `((,ld.so.cache . "/etc/ld.so.cache")
- (,ld.so.conf . "/etc/ld.so.conf") ;; needed?
- ((,guix-env "etc/ssl") . "/etc/ssl")
- ((,guix-env "etc/ssl") . "/run/current-system/profile/etc/ssl")
- ((,union32 "lib") . "/lib")
- ((,union32 "lib") . "/run/current-system/profile/lib")
- ((,union64 "bin") . "/bin")
- ((,union64 "bin") . "/usr/bin") ; Steam hardcodes some paths like xdg-open.
- ((,union64 "lib") . "/lib64")
- ((,union64 "lib") . "/run/current-system/profile/lib64")
- ((,union64 "lib/locale") . "/run/current-system/locale")
- ((,union64 "sbin/ldconfig") . "/sbin/ldconfig")
- ((,union64 "share/drirc.d") . "/usr/share/drirc.d")
- ((,union64 "share/fonts") . "/run/current-system/profile/share/fonts")
- ((,union64 "etc/fonts") . "/etc/fonts")
- ((,union64 "share/vulkan/explicit_layer.d") .
- "/usr/share/vulkan/explicit_layer.d")
- ;; The MangoHud layer has the same file name for 64- and 32-bit,
- ;; so create links with different names.
- ((,union64 "share/vulkan/implicit_layer.d/MangoHud.json") .
- "/usr/share/vulkan/implicit_layer.d/MangoHud.json")
- ((,union32 "share/vulkan/implicit_layer.d/MangoHud.json") .
- "/usr/share/vulkan/implicit_layer.d/MangoHud.x86.json")))
- (for-each
- icd-symlink
- ;; Use stat to follow links from packages like MangoHud.
- `(,@(find-files (string-append union32 "/share/vulkan/icd.d")
- #:directories? #t #:stat stat)
- ,@(find-files (string-append union64 "/share/vulkan/icd.d")
- #:directories? #t #:stat stat)))
- ;; TODO: Is this the right place for this?
- ;; Newer versions of Steam won't startup if they can't copy to here
- ;; (previous would output this error but continue).
- (if (file-exists? ".steam/root/bootstrap.tar.xz")
- (chmod ".steam/root/bootstrap.tar.xz" #o644))
-
- ;; Process FHS-specific command line options.
- (let* ((options (getopt-long (or fhs-args '("")) fhs-option-spec))
- (asound32-opt (option-ref options 'asound32 #f))
- (asound-lib (if asound32-opt "lib" "lib64")))
- (if asound32-opt
- (display "\n\n/etc/asound.conf configured for 32-bit.\n\n\n")
- (display "\n\n/etc/asound.conf configured for 64-bit.\nLaunch steam with \"steam -- --asound32\" to use 32-bit instead.\n\n\n"))
- (with-output-to-file "/etc/asound.conf"
- (lambda _ (format (current-output-port) "# Generated by steam-client
-
-# Use PulseAudio by default
-pcm_type.pulse {
- lib \"/~a/alsa-lib/libasound_module_pcm_pulse.so\"
-}
-
-ctl_type.pulse {
- lib \"/~a/alsa-lib/libasound_module_ctl_pulse.so\"
-}
-
-pcm.!default {
- type pulse
- fallback \"sysdefault\"
- hint {
- show on
- description \"Default ALSA Output (currently PulseAudio Sound Server)\"
- }
-}
-
-ctl.!default {
- type pulse
- fallback \"sysdefault\"
-}\n\n" asound-lib asound-lib))))
-
- (apply system* `(#$(file-append pkg run) ,@steam-args))))))))
-
-(define-public steam
- (nonguix-container->package
- (nonguix-container
- (name "steam")
- (wrap-package steam-client)
- (run "/bin/steam")
- (union64
- (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-64"))
- (union32
- (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-32"
- #:system "i686-linux"))
- (link-files '("share/applications/steam.desktop"
- "share/applications/steam-asound32.desktop"))
- (description "Steam is a digital software distribution platform created by
-Valve. This package provides a script for launching Steam in a Guix container
-which will use the directory @file{$HOME/.local/share/guix-sandbox-home} where
-all games will be installed."))))
-
-(define-public steam-nvidia
- (nonguix-container->package
- (nonguix-container
- (name "steam-nvidia")
- (wrap-package steam-client)
- (run "/bin/steam")
- (union64
- (replace-mesa
- (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-64")))
- (union32
- (replace-mesa
- (fhs-union `(,@steam-client-libs
- ,@steam-gameruntime-libs
- ,@fhs-min-libs)
- #:name "fhs-union-32"
- #:system "i686-linux")))
- (link-files '("share/applications/steam.desktop"
- "share/applications/steam-asound32.desktop"))
- (description "Steam is a digital software distribution platform created by
-Valve. This package provides a script for launching Steam in a Guix container
-which will use the directory @file{$HOME/.local/share/guix-sandbox-home} where
-all games will be installed."))))
-
-(define-public protonup-ng
- (package
- (name "protonup-ng")
- (version "0.2.1")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/cloudishBenne/protonup-ng")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0yd2mhhqxzarqxk85zf42s931jzc94f1cssn1hblsqghr79laa45"))))
- (build-system python-build-system)
- (arguments
- (list #:tests? #f)) ; there are no tests
- (inputs
- (list python-configparser python-requests))
- (home-page "https://github.com/cloudishBenne/protonup-ng")
- (synopsis "Manage Proton-GE Installations")
- (description "ProtonUp-ng is a CLI program and API to automate the installation
-and update of GloriousEggroll's Proton-GE.")
- (license license:gpl3)))
diff --git a/nongnu/packages/version-control.scm b/nongnu/packages/version-control.scm
index ba26e2e..675bf88 100644
--- a/nongnu/packages/version-control.scm
+++ b/nongnu/packages/version-control.scm
@@ -1,18 +1,6 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 dan <i@dan.games>
;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;;
-;;; 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 <https://www.gnu.org/licenses/>.
(define-module (nongnu packages version-control)
#:use-module (gnu packages base)
@@ -25,7 +13,7 @@
(define-public helix-core
(package
(name "helix-core")
- (version "r22.1")
+ (version "r23.1")
(source (origin
(method url-fetch)
(uri (string-append "https://ftp.perforce.com/perforce/" version
@@ -40,7 +28,7 @@
("i686-linux"
"0f5qs55rspw86axnmml3nxx551lwbxwz1cgi9kmy2f9g5rrplnkn")
(_
- "077rfbjgyhdgv76i2727s3yk3p52y75nml8n9wv8g7mvhfs9ypa9"))))))
+ "1vqfkhgbx6ch7710w8mmm7hydl6jmd9qgzs0gfjg8gvd5gnh1csr"))))))
(build-system binary-build-system)
(arguments
`(#:strip-binaries? #f
diff --git a/nongnu/packages/video.scm b/nongnu/packages/video.scm
index b7f9b5b..e5af3a1 100644
--- a/nongnu/packages/video.scm
+++ b/nongnu/packages/video.scm
@@ -1,34 +1,23 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Jelle Licht <jlicht@fsfe.org>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
(define-module (nongnu packages video)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages video)
#:use-module (guix build utils)
#:use-module (guix build-system cmake)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
- #:use-module ((guix licenses) #:prefix license:))
+ #:use-module (guix utils)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (nongnu packages chromium))
(define-public gmmlib
(package
(name "gmmlib")
- (version "22.1.3")
+ (version "22.3.19")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -37,7 +26,7 @@
(file-name (git-file-name name version))
(sha256
(base32
- "10gk8bi8xa2bgiqmjbphb9acvbmvgwv9kg0z75cfxazlsx5k7jb1"))))
+ "0p3wp6xcvpb4jzw4fsf6554qy91iblmq9y50ph3iy29m19q6nznb"))))
(build-system cmake-build-system)
(arguments
;; Tests are run as part of the normal build step
@@ -53,7 +42,7 @@ for VAAPI.")
(define-public intel-media-driver
(package
(name "intel-media-driver")
- (version "22.2.2")
+ (version "24.1.5")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -62,16 +51,16 @@ for VAAPI.")
(file-name (git-file-name name version))
(sha256
(base32
- "1wvx3kvsdq7n5khl0pf7hf1ks4lwqnyjdq8sbjhd7irs3v3prj4j"))))
+ "1jm4imld48scj0j499wq5zbdjv4gg7hg2sawljqnjvy09dmp09bs"))))
(build-system cmake-build-system)
(inputs (list libva gmmlib))
(native-inputs (list pkg-config))
(arguments
- '(#:tests? #f ;Tests are run as part of the normal build step
- #:configure-flags
- (list "-DENABLE_NONFREE_KERNELS=OFF"
- (string-append "-DLIBVA_DRIVERS_PATH="
- (assoc-ref %outputs "out") "/lib/dri"))))
+ (list #:tests? #f ;Tests are run as part of the normal build step
+ #:configure-flags
+ #~(list "-DENABLE_NONFREE_KERNELS=OFF"
+ (string-append "-DLIBVA_DRIVERS_PATH="
+ #$output "/lib/dri"))))
;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
;; this to all VA-API back ends instead of once to libva.
(native-search-paths
@@ -86,3 +75,84 @@ for VAAPI.")
accelerated decoding, encoding, and video post processing for the GEN based
graphics hardware.")
(license (list license:expat license:bsd-3))))
+
+(define-public intel-media-driver/nonfree
+ (package
+ (inherit intel-media-driver)
+ (name "intel-media-driver-nonfree")
+ (arguments
+ (substitute-keyword-arguments (package-arguments intel-media-driver)
+ ((#:configure-flags flags #~'())
+ #~(cons "-DENABLE_NONFREE_KERNELS=ON"
+ (delete "-DENABLE_NONFREE_KERNELS=OFF" #$flags)))))
+ (synopsis
+ (string-append
+ (package-synopsis intel-media-driver)
+ " with nonfree kernels"))
+ (description
+ (string-append
+ (package-description intel-media-driver)
+ " This build of intel-media-driver includes nonfree blobs to fully enable the
+video decode capabilities of supported Intel GPUs."))))
+
+(define-public obs-with-cef
+ (package
+ (inherit obs)
+ (name "obs-with-cef")
+ (inputs
+ (append (package-inputs obs)
+ `(("chromium-embedded-framework" ,chromium-embedded-framework))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments obs)
+ ((#:configure-flags flags)
+ #~(append #$flags
+ '("-DBUILD_BROWSER=ON"
+ "-DCEF_ROOT_DIR=../source/cef")))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-before 'configure 'add-cef
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((chromium-embedded-framework
+ #$(this-package-input "chromium-embedded-framework")))
+ (mkdir-p "cef/Release")
+ (mkdir-p "cef/Resources")
+ (for-each (lambda (file)
+ (symlink file (string-append "cef/Release/"
+ (basename file)))
+ (symlink file (string-append "cef/Resources/"
+ (basename file))))
+ (filter
+ (lambda (file)
+ (not (string= (basename (dirname file))
+ "locales")))
+ (find-files
+ (string-append chromium-embedded-framework
+ "/share/cef"))))
+ (symlink (string-append chromium-embedded-framework
+ "/lib/libcef.so")
+ "cef/Release/libcef.so")
+ (mkdir-p "cef/libcef_dll_wrapper")
+ (symlink (string-append chromium-embedded-framework
+ "/lib/libcef_dll_wrapper.a")
+ "cef/libcef_dll_wrapper/libcef_dll_wrapper.a")
+ (symlink (string-append chromium-embedded-framework
+ "/include")
+ "cef/include"))))
+ (add-after 'install 'symlink-obs-browser
+ ;; Required for lib/obs-plugins/obs-browser.so file.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (symlink
+ (string-append #$output
+ "/lib/libobs-frontend-api.so.0")
+ (string-append #$output
+ "/lib/obs-plugins/libobs-frontend-api.so.0"))
+ (symlink
+ (string-append #$output
+ "/lib/libobs.so.0")
+ (string-append #$output
+ "/lib/obs-plugins/libobs.so.0"))))))))
+ (description
+ (string-append
+ (package-description obs)
+ " This build of OBS includes embeded Chromium-based browser to enable
+Browser source."))))
diff --git a/nongnu/packages/vpn.scm b/nongnu/packages/vpn.scm
index 856a45b..ad3bb8a 100644
--- a/nongnu/packages/vpn.scm
+++ b/nongnu/packages/vpn.scm
@@ -1,21 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2020 Alexey Abramov <levenson@mmer.org>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
-
(define-module (nongnu packages vpn)
#:use-module (guix build utils)
@@ -28,7 +12,7 @@
(define-public zerotier
(package
(name "zerotier")
- (version "1.8.4")
+ (version "1.12.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -37,16 +21,17 @@
(file-name (git-file-name name version))
(sha256
(base32
- "101b1k9f3cpbgj0l87ya1cbqs9dv0qiayjap4m29fxyjra8hbkb8"))))
+ "0p5rpvh137gf5y9ylip7kxfl4argv34sr4wiiygvfk670rifnk57"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:make-flags (list "ZT_SSO_SUPPORTED=0") ; We don't need SSO/OIDC
+ #:phases
(modify-phases %standard-phases
;; There is no ./configure
(delete 'configure)
(replace 'check
- (lambda _
- (invoke "make" "selftest")
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "selftest" make-flags)
(invoke "./zerotier-selftest")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
diff --git a/nongnu/packages/wasm.scm b/nongnu/packages/wasm.scm
index 6aa8211..fa236d1 100644
--- a/nongnu/packages/wasm.scm
+++ b/nongnu/packages/wasm.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; Copyright © 2022-2023 Pierre Langlois <pierre.langlois@gmx.com>
(define-module (nongnu packages wasm)
#:use-module (guix base32)
@@ -31,60 +16,62 @@
#:use-module (gnu packages python))
(define-public wasi-libc
- (let ((commit "ad5133410f66b93a2381db5b542aad5e0964db96")
- (revision "1"))
- (package
- (name "wasi-libc")
- (version (git-version "0.1-alpha" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/WebAssembly/wasi-libc")
- (commit commit)
- (recursive? #t)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "146jamq2q24vxjfpcwlqj84wzc80cbpbg0ns2wimyvzbanah48j6"))))
- (build-system gnu-build-system)
- (native-inputs (list clang-13))
- (arguments
- (list #:tests? #f ;No test suite
- #:phases
- #~(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'set-sysroot-include
- (lambda _
- (setenv "C_INCLUDE_PATH"
- (string-append (getcwd) "/sysroot/include"))))
- (add-before 'install 'set-install-dir
- (lambda _
- (setenv "INSTALL_DIR"
- (string-append #$output "/wasm32-wasi")))))))
- (home-page "https://wasi.dev")
- (synopsis "WASI libc implementation for WebAssembly")
- (description
- "WASI Libc is a libc for WebAssembly programs built on top of WASI
+ (package
+ (name "wasi-libc")
+ (version "sdk-19")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/WebAssembly/wasi-libc")
+ (commit (string-append "wasi-" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0bnpz8wk9wiic938296gxp4vz820bvpi1w41jksjzz5552hql169"))))
+ (build-system gnu-build-system)
+ (native-inputs (list clang-15))
+ (arguments
+ (list #:tests? #f ;No test suite
+ ;; Firefox uses wasm2c to compile WebAssembly to C code, and it
+ ;; does not support the memory.copy opcode.
+ ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1773200#c4
+ #:make-flags ''("BULK_MEMORY_SOURCES=")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'set-sysroot-include
+ (lambda _
+ (setenv "C_INCLUDE_PATH"
+ (string-append (getcwd) "/sysroot/include"))))
+ (add-before 'install 'set-install-dir
+ (lambda _
+ (setenv "INSTALL_DIR"
+ (string-append #$output "/wasm32-wasi")))))))
+ (home-page "https://wasi.dev")
+ (synopsis "WASI libc implementation for WebAssembly")
+ (description
+ "WASI Libc is a libc for WebAssembly programs built on top of WASI
system calls. It provides a wide array of POSIX-compatible C APIs, including
support for standard I/O, file I/O, filesystem manipulation, memory
management, time, string, environment variables, program startup, and many
other APIs.")
- (license (list
- ;; For wasi-libc, with LLVM exceptions
- license:asl2.0
- ;; For malloc.c.
- license:cc0
- ;; For cloudlibc.
- license:bsd-2
- ;; For wasi-libc and musl-libc.
- license:expat)))))
+ (license (list
+ ;; For wasi-libc, with LLVM exceptions
+ license:asl2.0
+ ;; For malloc.c.
+ license:cc0
+ ;; For cloudlibc.
+ license:bsd-2
+ ;; For wasi-libc and musl-libc.
+ license:expat))))
(define-public wasm32-wasi-clang-runtime
- (package (inherit clang-runtime-13)
+ (package (inherit clang-runtime-15)
(native-inputs
- (list clang-13
+ (list clang-15
wasi-libc))
- (inputs (list llvm-13))
+ (inputs (list llvm-15))
(arguments
(list
#:build-type "Release"
@@ -107,9 +94,7 @@ other APIs.")
;; WASM only needs libclang_rt.builtins-wasm32.a from
;; compiler-rt.
- (string-append "../compiler-rt-"
- #$(package-version clang-runtime-13)
- ".src/lib/builtins"))))))
+ "../source/compiler-rt/lib/builtins")))))
;; FIXME: Ideally we wouldn't need to build a separate compiler because clang
;; can support multiple targets at runtime. However Guix patches the default
@@ -117,12 +102,10 @@ other APIs.")
;; upstream Guix's support for cross-compiling with clang.
(define clang-from-llvm (@@ (gnu packages llvm) clang-from-llvm))
+(define llvm-monorepo (@@ (gnu packages llvm) llvm-monorepo))
(define-public wasm32-wasi-clang
- (let ((base (clang-from-llvm llvm-13 wasm32-wasi-clang-runtime
- (bytevector->nix-base32-string
- (content-hash-value
- (origin-hash (package-source clang-13)))))))
+ (let ((base (clang-from-llvm llvm-15 wasm32-wasi-clang-runtime)))
(package (inherit base)
(name "wasm32-wasi-clang")
(inputs
@@ -143,17 +126,8 @@ other APIs.")
(define-public wasm32-wasi-libcxx
(package
(name "wasm32-wasi-libcxx")
- (version "13.0.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/llvm/llvm-project")
- (commit (string-append "llvmorg-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0cjl0vssi4y2g4nfr710fb6cdhxmn5r0vis15sf088zsc5zydfhw"))))
+ (version (package-version llvm-15))
+ (source (llvm-monorepo version))
(build-system cmake-build-system)
(arguments
(list
diff --git a/nongnu/packages/wine.scm b/nongnu/packages/wine.scm
index 5378d2a..62e6106 100644
--- a/nongnu/packages/wine.scm
+++ b/nongnu/packages/wine.scm
@@ -1,20 +1,5 @@
-;;; GNU Guix --- Functional package management for GNU
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
-;;;
-;;; 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 <http://www.gnu.org/licenses/>.
(define-module (nongnu packages wine)
#:use-module (ice-9 match)
@@ -36,7 +21,7 @@
(define-public winetricks
(package
(name "winetricks")
- (version "20220411")
+ (version "20230212")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -45,7 +30,7 @@
(file-name (git-file-name name version))
(sha256
(base32
- "09bv6wsm3y9p6jhlcmnjlnczdyr996b2mvxg4fbvlqa3fv9gac8n"))))
+ "15glm6ws0zihcks93l39mli8wf5b5vkijb0vaid9cqra6x0zppd5"))))
(build-system gnu-build-system)
(inputs
`(("cabextract" ,cabextract)