Merge remote-tracking branch 'upstream/master' into tarsnap

This commit is contained in:
Joshua Hunt 2024-04-30 20:50:04 +02:00
commit f6605f0784
20 changed files with 1337 additions and 791 deletions

View File

@ -220,6 +220,75 @@ firmware, and blacklisting of conflicting modules:
...))
...)
#+END_SRC
** NVIDIA graphics card
NVIDIA graphics card support in Nonguix consists of a system service =nvidia-service-type= and a package =nvda= for application setup.
The following code serves as an example for system setup:
#+BEGIN_SRC scheme
(use-modules (gnu services gnome)
(gnu services xorg)
(nongnu packages nvidia)
(nongnu services nvidia))
(operating-system
(kernel-arguments '("modprobe.blacklist=nouveau"
;; Set this if the card is not used for displaying or
;; you're using Wayland:
"nvidia_drm.modeset=1"))
(services
(cons* (service nvidia-service-type)
;; Configure desktop environment, GNOME for example.
(service gnome-desktop-service-type
;; Enable NVIDIA support, only do this when the card is
;; used for displaying.
(gnome-desktop-configuration
(gnome (replace-mesa gnome))))
;; Configure Xorg server, only do this when the card is used for
;; displaying.
(set-xorg-configuration
(xorg-configuration
(modules (cons nvda %default-xorg-modules))
(drivers '("nvidia"))))
...))
...)
#+END_SRC
For application setup, =mesa= has to be replaced with =nvda= for every individual package that requires the NVIDIA driver, this can be done with grafting (which doesn't rebuild packages) or rewriting inputs (which rebuilds packages) (see [[https://guix.gnu.org/manual/devel/en/guix.html#Package-Transformation-Options][Package Transformation Options]] in GNU Guix Reference Manual). For example:
#+BEGIN_SRC shell
guix build mesa-utils --with-graft=mesa=nvda
guix build mesa-utils --with-input=mesa=nvda
#+END_SRC
The above transformation can be used within an one-off software environment spawned by =guix shell= as well, for correct environment variables, the =nvda= package may be added into the environment:
#+BEGIN_SRC shell
guix shell mesa-utils nvda --with-graft=mesa=nvda \
-- glxinfo
#+END_SRC
To graft mesa with nvda programmatically, use =replace-mesa= defined in =(nongnu packages nvidia)=:
#+BEGIN_SRC scheme
(use-modules (nongnu packages nvidia))
;; Replace mesa with nvda for a single package.
(replace-mesa <some-package>)
;; Replace mesa with nvda for a package list.
(map replace-mesa (list <some-package> ...))
;; A package with mesa replaced is still a package, it can be part of a
;; package list.
(list (replace-mesa <some-package>)
...)
#+END_SRC
When the card is not used for displaying, environment variables =__GLX_VENDOR_LIBRARY_NAME=nvidia= and =__NV_PRIME_RENDER_OFFLOAD=1= may be set.
** Substitutes for nonguix
A Nonguix substitute server is available at [[https://substitutes.nonguix.org]].

View File

@ -9,6 +9,16 @@
(channel-news
(version 0)
(entry (commit "be61a1829a19724299e46d6e3c1038229039c3ee")
(title
(en "Nvidia driver package/service updates and changes"))
(body
(en "In addition to the Nvidia driver package being updated to 550.67,
the service, procedures, and configuration has changed. Please see the new
directions in the Nonguix README.org for how to use the Nvidia driver in your
system configuration, and of course report any issues with these changes or
improvements for the documentation.")))
(entry (commit "8078757b887a7691644b119913c3f7b41661775d")
(title
(en "New @code{GUIX_SANDBOX_EXTRA_SHARES} variable for nonguix containers (Steam)"))

View File

@ -146,7 +146,7 @@
openlibm
pulseaudio
qtbase-5
qtserialport
qtserialport-5
qtmultimedia-5
zlib))
(synopsis "Layout, editing, and control software for your laser cutter")

View File

@ -143,10 +143,10 @@
(license (nonfree "https://www.google.com/intl/en/chrome/terms/")))))
(define-public google-chrome-stable
(make-google-chrome "stable" "121.0.6167.139" "1b08wqflp1j5yqpw2g9z2s239gs8bzqbxigcxk93aqwf5c21ijkh"))
(make-google-chrome "stable" "123.0.6312.86" "1fjpwz5pdzjak7932kxvmp3ba2s5qyvj5b908sndg9l4qv1hkh96"))
(define-public google-chrome-beta
(make-google-chrome "beta" "122.0.6261.6" "1b12bjcg99f6bjfhm311hdx9s1a4i13mcgxbvf1gpzq8989c1g96"))
(make-google-chrome "beta" "124.0.6367.18" "18gv6s4v6g8nw80rfiamz0xx6bwzn567xvmmn95xx70lhcvz9s34"))
(define-public google-chrome-unstable
(make-google-chrome "unstable" "123.0.6262.5" "04mf9nysdn77371fxa3z0wbvy2k09vw49s3lrcynlwgiwrz89a3m"))
(make-google-chrome "unstable" "125.0.6368.2" "0cfsq2qh9apbafapxqdz8sb65mm6yqxpcl7kwx9g9yi0sngqcxsz"))

View File

@ -87,7 +87,7 @@ lets you focus on your code.")
(define-public clj-kondo
(package
(name "clj-kondo")
(version "2023.10.20")
(version "2024.03.13")
(source (origin
(method url-fetch/zipbomb)
(uri (string-append
@ -95,11 +95,11 @@ lets you focus on your code.")
version "/clj-kondo-" version "-linux-amd64.zip"))
(sha256
(base32
"1zb4bkmhv5mh18z8h82qa1a0m95pd5dwdxg31pqgs6lnlca3vsph"))))
"0qdimdf854wsy19i39j18f01b3dhj4zccslymbkn8j9rm90k91m3"))))
(build-system binary-build-system)
(arguments
(list #:patchelf-plan `'(("clj-kondo" ("gcc" "zlib")))
#:install-plan `'(("clj-kondo" "/bin/"))
#:install-plan `'(("./clj-kondo" "/bin/"))
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'chmod
(lambda _
@ -115,3 +115,67 @@ lets you focus on your 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)))

View File

@ -15,7 +15,7 @@
(define-public compcert
(package
(name "compcert")
(version "3.12")
(version "3.13.1")
(source (origin
(method git-fetch)
(uri (git-reference
@ -24,7 +24,7 @@
(file-name (git-file-name name version))
(sha256
(base32
"0pcrkz1as37iz2wcp8j226fjn672lrj0cip2s0wpkiy097qi0yc5"))))
"0yvj9g144p26k7674vcai12sh3jahs64ny9pana9zla16nxxpmcm"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@ -32,7 +32,7 @@
(add-before 'configure 'allow-newer-coq-version
(lambda _
(substitute* "configure"
(("8.15.2") "8.16.1"))))
(("8.15.2") "8.17.1"))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((system ,(match (or (%current-target-system) (%current-system))

View File

@ -218,6 +218,15 @@ implementation with gogdl and Amazon Games using Nile.")
("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).
@ -225,19 +234,26 @@ implementation with gogdl and Amazon Games using Nile.")
(define steam-ld.so.conf
(packages->ld.so.conf
(list (fhs-union `(,@steam-client-libs
,@steam-gameruntime-libs
,@fhs-min-libs)
(list (fhs-union steam-container-libs
#:name "fhs-union-64")
(fhs-union `(,@steam-client-libs
,@steam-gameruntime-libs
,@fhs-min-libs)
(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")
@ -246,14 +262,10 @@ implementation with gogdl and Amazon Games using Nile.")
(ld.so.conf steam-ld.so.conf)
(ld.so.cache steam-ld.so.cache)
(union64
(fhs-union `(,@steam-client-libs
,@steam-gameruntime-libs
,@fhs-min-libs)
(fhs-union steam-container-libs
#:name "fhs-union-64"))
(union32
(fhs-union `(,@steam-client-libs
,@steam-gameruntime-libs
,@fhs-min-libs)
(fhs-union steam-container-libs
#:name "fhs-union-32"
#:system "i686-linux"))
(link-files '("share"))
@ -268,8 +280,16 @@ all games will be installed.")))
(name "steam-nvidia")
;; Steam's .desktop files expect a "steam" executable, so provide that.
(binary-name "steam")
(union64 (replace-mesa (ngc-union64 steam-container)))
(union32 (replace-mesa (ngc-union32 steam-container)))))
(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))
@ -289,15 +309,11 @@ all games will be installed.")))
;; this is easier and works.
(union64
(fhs-union `(,@heroic-extra-client-libs
,@steam-client-libs
,@steam-gameruntime-libs
,@fhs-min-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-client-libs
,@steam-gameruntime-libs
,@fhs-min-libs)
(fhs-union steam-container-libs
#:name "fhs-union-32"
#:system "i686-linux"))
(link-files '("share"))
@ -312,8 +328,17 @@ installed.")))
(nonguix-container
(inherit heroic-container)
(name "heroic-nvidia")
(union64 (replace-mesa (ngc-union64 heroic-container)))
(union32 (replace-mesa (ngc-union32 heroic-container)))))
(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))

View File

@ -1,16 +1,20 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
;;; 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)
@ -159,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))
(version "20240316-10564-0bc78c53d")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://voidpoint.io/terminx/eduke32.git")
(commit commit)))
(file-name (git-file-name name version))
(method url-fetch)
(uri (string-append "https://dukeworld.com/eduke32/synthesis/"
version "/eduke32_src_" version ".tar.xz"))
(sha256
(base32 "0wy4bppiw4q2hn0v38msrjyvj2hzfvigakc23c2wqfnbl7rm0hrz"))
;; Unbundle libxmp.
(base32 "1a9fw1kfriyrybjxl72b2434w3yiz2nxg6541lnyhzbdka2cp2lf"))
(modules '((guix build utils)))
(snippet
'(begin (delete-file-recursively "source/libxmp-lite") #t))))
;; Remove bundled libxmp and platform-specific stuff.
#~(for-each delete-file-recursively '("platform" "source/libxmp-lite")))))
(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"))
(list #:license-file-regexp "buildlic.txt"
#:tests? #f
#:phases
(modify-phases %standard-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* "GNUmakefile"
(("-I\\$\\(libxmplite_inc\\)")
(string-append "-I" (assoc-ref %build-inputs "libxmp") "/include"))
(("^ *audiolib_deps \\+= libxmplite.*$") "")
(("-logg") "-logg -lxmp"))
(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")))
#t))
'("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* (#: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)))))))
(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
`(("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)))
(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 3DDuke3D 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.
(description "EDuke32 is a free homebrew game engine and source port of
the classic PC first person shooter Duke Nukem 3DDuke3D 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
((#: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 _
(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))))))
(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
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}.")))

View File

@ -29,6 +29,7 @@
(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)
@ -132,8 +133,8 @@ some freedo package or an output of package-version procedure."
"The unmodified Linux kernel, including nonfree blobs, for running Guix System
on hardware which requires nonfree software to function."))))
(define-public linux-6.7
(corrupt-linux linux-libre-6.7))
(define-public linux-6.8
(corrupt-linux linux-libre-6.8))
(define-public linux-6.6
(corrupt-linux linux-libre-6.6))
@ -153,9 +154,9 @@ on hardware which requires nonfree software to function."))))
(define-public linux-4.19
(corrupt-linux linux-libre-4.19))
(define-public linux linux-6.7)
(define-public linux linux-6.8)
;; linux-lts points to the *newest* released long-term support version.
(define-public linux-lts linux-6.1)
(define-public linux-lts linux-6.6)
(define-public linux-arm64-generic-5.10
(corrupt-linux linux-libre-arm64-generic-5.10 #:name "linux-arm64-generic"))
@ -254,9 +255,7 @@ on hardware which requires nonfree software to function."))))
(append %default-extra-linux-options
;; NOTE: These are configs expected by Guix
;; but missing from XanMod defconfig.
'(("CONFIG_BLK_DEV_NVME" . #t)
("CONFIG_CRYPTO_XTS" . m)
("CONFIG_VIRTIO_CONSOLE" . m))))))
'(("CONFIG_BLK_DEV_NVME" . #t))))))
(display extra-configuration port)
(close-port port))
(invoke "make" "oldconfig")
@ -277,17 +276,17 @@ distribution with custom settings and new features. It's built to provide a
stable, responsive and smooth desktop experience.")))
;; Linux-XanMod sources
(define-public linux-xanmod-version "6.7.6")
(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 "0s8hbcsg7fdvspqam8kzcxygjsznr4zfi60nqgc81l3n4m518cgg")
#:xanmod-hash (base32 "0hv76dj9z17w6zcy25v1ndlmdw593wlbmnw5x903vidb3c6a1dfi")))
#:kernel-hash (base32 "1wv5x7qhcd05m8m0myyqm2il6mha1sx11h7ppf8yjsxvx2jdwsf9")
#:xanmod-hash (base32 "1ry4qmsis7s2bb6hpkvq30ffgvhzj1w33js67ybnvagzda5vbmci")))
(define-public linux-xanmod-lts-version "6.6.18")
(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
@ -295,7 +294,7 @@ stable, responsive and smooth desktop experience.")))
linux-xanmod-lts-revision
#:xanmod-branch "lts"
#:kernel-hash (base32 "1l2nisx9lf2vdgkq910n5ldbi8z25ky1zvl67zgwg2nxcdna09nr")
#:xanmod-hash (base32 "1q33bd4a65l46333l2m7vjn46b0xhdbz508bq7q0bphbmy0bf35m")))
#:xanmod-hash (base32 "0inlpdscdpqahwlsf8kc2zjp2p83yr2cfqyaxld6m4bjkbg23lvz")))
;; Linux-XanMod packages
(define-public linux-xanmod
@ -316,24 +315,22 @@ stable, responsive and smooth desktop experience.")))
(define-public linux-firmware
(package
(name "linux-firmware")
(version "20240115")
(version "20240312")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/kernel/firmware/"
"linux-firmware-" version ".tar.xz"))
(sha256
(base32
"13b75kd075famc58pvx4r9268pxn69nyihx7p3i6i7mvkgqayz5b"))))
"152bpl3lzd7jb2z1cl1sfax6jm71bspn7bwc00lci5qqmma7lcmj"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
(replace 'install
(lambda* (#:key (make-flags '()) #:allow-other-keys)
(apply invoke "make" "install-nodedup" make-flags)))
(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")
@ -347,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 _
#~(lambda _
(use-modules (ice-9 regex))
(substitute* "WHENCE"
(("^(File|Link): *([^ ]*)(.*)" _ type file rest)
(string-append (if (string-match ,keep file) type "Skip") ": " file rest)))))
(("^(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
(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/")))))))
#$(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
@ -381,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
(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/")))))))
#$(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
@ -438,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
(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)")))))))
#$(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:
@ -614,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
(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-")))))))
#$(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
@ -635,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
(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-")))))))
#$(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
@ -656,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
(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/")))))))
#$(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
@ -676,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
(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)/")))))))
#$(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
@ -772,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 "a928f08c1dd4f9a1e84d85811a543e974551bc4f")
(revision "6"))
(let ((commit "3af9a868a0ca622d830966ac83aea2bf17cd0d65")
(revision "7"))
(package
(name "rtl8192eu-linux-module")
(version (git-version "0.0.0" revision commit))
@ -786,7 +782,7 @@ package contains nonfree firmware for the following chips:
(file-name (git-file-name name version))
(sha256
(base32
"1q26kyic4glmgy0hbaq46r067m6cqf7d41chgivyxn8y32rf1fgc"))))
"0d2qzf7xbipjdp1zm2ffqhnda8wasqriqnv6dkl0mhqn2f8za3i8"))))
(build-system linux-module-build-system)
(arguments
`(#:make-flags
@ -852,8 +848,8 @@ network adapters.")
(license gpl2))))
(define-public rtl8821cu-linux-module
(let ((commit "a41ef7cabd1aa36fa2b4eb63a71cf719bff11b72")
(revision "1"))
(let ((commit "4f6004af4c4171882f37e2e5d8fb3609fe260617")
(revision "2"))
(package
(name "rtl8821cu-linux-module")
(version (git-version "0.0.0" revision commit))
@ -865,7 +861,7 @@ network adapters.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32 "0fnv4gm4adnf8gbjzc2lljh2a3i111159qira3w0qm1zhyqadaq0"))))
(base32 "09ig0rrkkn00i3d1n6p62n1610kcjgb2h9kbcqdsrmpnlnw5kfl2"))))
(build-system linux-module-build-system)
(arguments
(list
@ -906,8 +902,8 @@ to disable the conflicting rtw88 driver:
"https://github.com/morrownr/8821cu-20210916/blob/main/LICENSE")))))
(define-public rtl8812au-aircrack-ng-linux-module
(let ((commit "a3e0c0b6d54546418f046db0dbf1d20e454c9ec2")
(revision "12"))
(let ((commit "63cf0b4584aa8878b0fe8ab38017f31c319bde3d")
(revision "13"))
(package
(inherit rtl8821ce-linux-module)
(name "rtl8812au-aircrack-ng-linux-module")
@ -920,7 +916,7 @@ to disable the conflicting rtw88 driver:
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32 "1hwzsy62h7ik5s54paikcj5ips7mrnfacprciiq412mz5ag28cdn"))
(base32 "103pn6qlj116dm244ygf1wic9dq2qn80lafiyxynyhpckkyhhfxl"))
(modules '((guix build utils)))
(snippet
#~(begin
@ -1154,7 +1150,7 @@ chipsets from Broadcom:
(define-public facetimehd
(package
(name "facetimehd")
(version "0.6.8")
(version "0.6.8.1")
(source
(origin
(method git-fetch)
@ -1164,7 +1160,7 @@ chipsets from Broadcom:
(file-name (git-file-name "facetimehd" version))
(sha256
(base32
"1g0ky9w5klkjndf30mjymq78r6yls9gri9x702nn8qkmgkjbqdsg"))))
"18x12g55bw99ap9cw54v50s5m39dli4nx41jfhb35551mn0jp4c7"))))
(build-system linux-module-build-system)
(arguments
'(#:tests? #f))
@ -1188,7 +1184,7 @@ driver:
(define-public intel-microcode
(package
(name "intel-microcode")
(version "20231114")
(version "20240312")
(source
(origin
(method git-fetch)
@ -1199,7 +1195,7 @@ driver:
(commit (string-append "microcode-" version))))
(file-name (git-file-name name version))
(sha256
(base32 "07c7hkwpvb9056s73s55sg04cxr1d9n1sd9r1g7sm3gh70yc17ki"))))
(base32 "1j1krkmp9kxmpq8bbbld8bm3y9rqhmlj5qfm43czikawnpw81571"))))
(build-system copy-build-system)
(arguments
(list #:install-plan
@ -1223,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
(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/")))))))
#$(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

View File

@ -36,7 +36,7 @@
(define-public element-desktop
(package
(name "element-desktop")
(version "1.11.57")
(version "1.11.64")
(source
(origin
(method url-fetch)
@ -45,7 +45,7 @@
"https://packages.riot.im/debian/pool/main/e/" name "/" name "_" version
"_amd64.deb"))
(sha256
(base32 "05318i6z5kkzi01ygr77g5ij0hs4xmy0j23hznkqc4zia02q1vgx"))))
(base32 "043017i51kdpb6aqz7542dyrdw8d6jhqd9zw6v1c63phh1633y56"))))
(supported-systems '("x86_64-linux"))
(build-system chromium-binary-build-system)
(arguments
@ -90,7 +90,7 @@ its core.")
(define-public signal-desktop
(package
(name "signal-desktop")
(version "6.46.0")
(version "7.4.0")
(source
(origin
(method url-fetch)
@ -99,7 +99,7 @@ its core.")
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
"_amd64.deb"))
(sha256
(base32 "1pjv8v1hhycwbvqvih83axv41jkyksq6d9152fqic9d61lbb1kpa"))))
(base32 "069k7kcg8h16q0mm1bqdf7x66qji653apgwhnb52kdqsfzr1ibzm"))))
(supported-systems '("x86_64-linux"))
(build-system chromium-binary-build-system)
(arguments

View File

@ -97,19 +97,19 @@
;; 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 "20240219101823")
(define %firefox-esr-build-id "20240415130026")
(define-public firefox-esr
(package
(name "firefox-esr")
(version "115.8.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 "1slmp2v1q3my81z8kiym9rpxw5d9n4sn07v7hv99517w7vr8d05g"))))
(base32 "1wpf4vcrvnvhnfzqavbkzqbn51bds1l9f6ld4mzh9xwm7mrkrz8a"))))
(build-system gnu-build-system)
(arguments
(list
@ -532,27 +532,34 @@ MOZ_ENABLE_WAYLAND=1 exec ~a $@\n"
;; 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 "20240304165820")
(define %firefox-build-id "20240429124342")
(define-public firefox
(package
(inherit firefox-esr)
(name "firefox")
(version "123.0.1")
(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 "073lbl2gs7c08kr9h6r2jvl3cvj84h3pdh6aj151c3synravkp6m"))))
(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)
@ -562,7 +569,7 @@ MOZ_ENABLE_WAYLAND=1 exec ~a $@\n"
"Full-featured browser client built from Firefox source tree, without
the official icon and the name \"firefox\".")))
;; As of Firefox 121.0, Firefox uses Wayland by default. This means we no longer need a seperate package
;; for Firefox on Wayland.
;; 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))

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
(define-public anytype
(package
(name "anytype")
(version "0.39.0")
(version "0.40.0")
(source
(origin
(method url-fetch)
@ -34,7 +34,7 @@
(file-name (string-append "anytype-" version ".deb"))
(sha256
(base32
"10y037qwm6k28min2sgpshrlpirc1p0zn3b4syxrrz494x5g2ivi"))))
"01q6dzks8hjb2whdkj7c816fji7rn5dpx00ss7rxgvxb5rdz19gr"))))
(build-system chromium-binary-build-system)
(arguments
(list
@ -52,8 +52,8 @@
"libGLESv2.so"
"libvk_swiftshader.so"
"libvulkan.so.1"
"resources/app.asar.unpacked/dist/nativeMessagingHost"
"resources/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node"))
"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"))

View File

@ -15,7 +15,7 @@
(define-public gmmlib
(package
(name "gmmlib")
(version "22.3.9")
(version "22.3.15")
(source (origin
(method git-fetch)
(uri (git-reference
@ -24,7 +24,7 @@
(file-name (git-file-name name version))
(sha256
(base32
"0m88lxlqqs5wdk4icf2ahbigr0q87j1c0damq7q0r55h72pf6zyv"))))
"0qmdprqarqdz8z6s1av2vmd7ma5yaswxkxzdjci57fgyylqkjlri"))))
(build-system cmake-build-system)
(arguments
;; Tests are run as part of the normal build step
@ -40,7 +40,7 @@ for VAAPI.")
(define-public intel-media-driver
(package
(name "intel-media-driver")
(version "23.3.0")
(version "23.4.3")
(source (origin
(method git-fetch)
(uri (git-reference
@ -49,7 +49,7 @@ for VAAPI.")
(file-name (git-file-name name version))
(sha256
(base32
"1zh6zgfyp14zlnd6jvhqz9q5rlyk7cb3nam791slh0h7r5f0iimm"))))
"0rgjakygfzy6d3jz38nnjvcvqyjnwz2b4vfh1ifqfcm3bw56fmr9"))))
(build-system cmake-build-system)
(inputs (list libva gmmlib))
(native-inputs (list pkg-config))

View File

@ -12,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
@ -21,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)

View File

@ -1,15 +1,15 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2022, 2024 Hilton Chain <hako@ultrarare.space>
(define-module (nongnu services nvidia)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu packages)
#:use-module (gnu packages linux)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu services linux)
#:use-module (gnu services shepherd)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (nongnu packages nvidia)
#:export (nvidia-configuration
nvidia-configuration?
@ -19,24 +19,32 @@
(define-record-type* <nvidia-configuration>
nvidia-configuration make-nvidia-configuration
nvidia-configuration?
(nvidia-driver nvidia-configuration-nvidia-driver
(default (list nvidia-driver))) ; list of file-like
(nvidia-firmware nvidia-configuration-nvidia-firmware
(default (list nvidia-firmware))) ; list of file-like
(nvidia-module nvidia-configuration-nvidia-module
(default (list nvidia-module))) ; list of file-like
(modules nvidia-configuration-modules
(default (list "nvidia-uvm")))) ; list of string
(driver nvidia-configuration-driver
(default nvda)) ; file-like
(firmware nvidia-configuration-firmware
(default nvidia-firmware)) ; file-like
(module nvidia-configuration-module
(default nvidia-module))) ; file-like
(define (nvidia-shepherd-service config)
(let ((nvidia-driver (nvidia-configuration-driver config))
(nvidia-smi (file-append nvidia-driver "/bin/nvidia-smi")))
(list (shepherd-service
(documentation "Unload nvidia-uvm module on powering off.")
(documentation "Prepare system environment for NVIDIA driver.")
(provision '(nvidia))
(requirement '(user-processes))
(start #~(const #t))
(stop #~(lambda _
(let ((rmmod #$(file-append kmod "/bin/rmmod")))
(zero? (system* rmmod "nvidia-uvm"))))))))
(requirement '(udev))
(one-shot? #t)
(modules '(((guix build utils) #:select (invoke/quiet))
((rnrs io ports) #:select (get-line))))
(start
#~(lambda _
(when (file-exists? "/proc/driver/nvidia")
(let ((modprobe (call-with-input-file
"/proc/sys/kernel/modprobe" get-line)))
(false-if-exception
(begin
(invoke/quiet modprobe "--" "nvidia_uvm")
(invoke/quiet #$nvidia-smi)))))))))))
(define nvidia-service-type
(service-type
@ -44,13 +52,13 @@
(extensions
(list (service-extension shepherd-root-service-type
nvidia-shepherd-service)
(service-extension profile-service-type
(compose list nvidia-configuration-driver))
(service-extension udev-service-type
nvidia-configuration-nvidia-driver)
(compose list nvidia-configuration-driver))
(service-extension firmware-service-type
nvidia-configuration-nvidia-firmware)
(compose list nvidia-configuration-firmware))
(service-extension linux-loadable-module-service-type
nvidia-configuration-nvidia-module)
(service-extension kernel-module-loader-service-type
nvidia-configuration-modules)))
(compose list nvidia-configuration-module))))
(default-value (nvidia-configuration))
(description "Load NVIDIA modules.")))
(description "Prepare system environment for NVIDIA driver.")))

View File

@ -2,20 +2,46 @@
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2024 Hilton Chain <hako@ultrarare.space>
;; Generate a bootable image (e.g. for USB sticks, etc.) with:
;; $ guix system disk-image nongnu/system/install.scm
;; $ guix system image --image-type=iso9660 nongnu/system/install.scm
(define-module (nongnu system install)
#:use-module (guix channels)
#:use-module (guix gexp)
#:use-module (gnu packages curl)
#:use-module (gnu packages package-management)
#:use-module (gnu packages version-control)
#:use-module (gnu packages vim)
#:use-module (gnu packages zile)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (nongnu packages linux)
#:export (installation-os-nonfree))
;; https://substitutes.nonguix.org/signing-key.pub
(define %signing-key
(plain-file "nonguix.pub" "\
(public-key
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
(define %channels
(cons* (channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
%default-channels))
(define installation-os-nonfree
(operating-system
(inherit installation-os)
@ -27,6 +53,19 @@
git
neovim
zile)
(operating-system-packages installation-os)))))
(operating-system-packages installation-os)))
(services
(modify-services (operating-system-user-services installation-os)
(guix-service-type
config => (guix-configuration
(inherit config)
(guix (guix-for-channels %channels))
(authorized-keys
(cons* %signing-key
%default-authorized-guix-keys))
(substitute-urls
`(,@%default-substitute-urls
"https://substitutes.nonguix.org"))
(channels %channels)))))))
installation-os-nonfree

View File

@ -4,7 +4,6 @@
(define-module (nonguix build chromium-binary-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
#:use-module ((nonguix build binary-build-system) #:prefix binary:)
#:use-module (nonguix build utils)
#:use-module (guix build utils)
#:use-module (ice-9 ftw)
#:use-module (ice-9 match)
@ -24,9 +23,9 @@
(nss (assoc-ref inputs "nss"))
(wrap-inputs (map cdr inputs))
(lib-directories
(build-paths-from-inputs '("lib") wrap-inputs))
(search-path-as-list '("lib") wrap-inputs))
(bin-directories
(build-paths-from-inputs
(search-path-as-list
'("bin" "sbin" "libexec")
wrap-inputs)))
(for-each

View File

@ -97,23 +97,3 @@ contents:
(call-with-output-file result
(lambda (port)
(for-each (cut dump <> port) files))))
(define build-paths-for-input
(lambda (dirs input)
(filter-map
(lambda (sub-directory)
(let ((directory
(string-append
input "/" sub-directory)))
(and
(directory-exists? directory)
directory)))
dirs)))
(define build-paths-from-inputs
(lambda (dirs inputs)
(reduce append '()
(map
(lambda (input)
(build-paths-for-input dirs input))
inputs))))

View File

@ -260,8 +260,9 @@ in a sandboxed FHS environment."
(home (getenv "HOME"))
(sandbox-home (or (getenv "GUIX_SANDBOX_HOME")
(string-append home "/" #$(ngc-sandbox-home container))))
(wayland-display (or (getenv "WAYLAND_DISPLAY")
"wayland-0"))
(preserved-env '("^DBUS_"
"^DISPLAY$"
"^DRI_PRIME$"
"^GDK_SCALE$" ; For UI scaling.
"^GUIX_LOCPATH$" ; For pressure-vessel locales.
@ -276,6 +277,7 @@ in a sandboxed FHS environment."
;; need to be shared with the container as
;; well; this is not needed currently.
"^LD_LIBRARY_PATH$"
"^LIBVA_DRIVERS_PATH$" ; For VA-API drivers.
"^MANGOHUD" ; For MangoHud configuration.
"^PRESSURE_VESSEL_" ; For pressure vessel options.
"_PROXY$"
@ -289,12 +291,15 @@ in a sandboxed FHS environment."
"^SDL_"
"^STEAM_"
"^SSL_" ; SSL certificate environment, needed by curl for Heroic.
"^VDPAU_DRIVER_PATH$" ; For VDPAU drivers.
"^TZ" ; For setting time zone.
"^XAUTHORITY$"
;; Matching all ^XDG_ vars causes issues
;; discussed in 80decf05.
"^XDG_CURRENT_DESKTOP$"
"^XDG_DATA_HOME$"
"^XDG_RUNTIME_DIR$"
"^XDG_SESSION_(CLASS|TYPE)$"
"^(WAYLAND_)?DISPLAY$"
#$@(ngc-preserved-env container) ; Environment from container.
;; The following are useful for debugging.
"^CAPSULE_DEBUG$"
@ -310,6 +315,7 @@ in a sandboxed FHS environment."
,@(exists-> "/dev/nvidia-modeset")
,@(exists-> "/etc/machine-id")
"/etc/localtime" ; Needed for correct time zone.
"/etc/os-release" ; Needed for distro info.
"/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.
@ -333,6 +339,7 @@ in a sandboxed FHS environment."
,@(exists-> (string-append home "/.config/pulse"))
,@(exists-> (string-append xdg-runtime "/pulse"))
,@(exists-> (string-append xdg-runtime "/bus"))
,@(exists-> (string-append xdg-runtime "/" wayland-display))
,@(exists-> (getenv "XAUTHORITY"))
#$@(ngc-shared container)))
(DEBUG (equal? (getenv "DEBUG") "1"))
@ -347,10 +354,10 @@ in a sandboxed FHS environment."
;; the "usual" path, probably so they are included in the
;; pressure-vessel container.
(setenv "GUIX_LOCPATH" "/usr/lib/locale")
;; 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")
;; By default VA-API drivers are searched for in mesa's store path,
;; so set this path to where the drivers will actually be located in
;; the container.
(setenv "LIBVA_DRIVERS_PATH" "/lib64/dri:/lib/dri")
(format #t "\n* Launching ~a in sandbox: ~a.\n\n"
#$(package-name (ngc-wrap-package container)) sandbox-home)
(when DEBUG
@ -455,7 +462,9 @@ application."
`((guix build utils))
#~(begin
(use-modules (guix build utils)
(ice-9 getopt-long))
(ice-9 getopt-long)
(srfi srfi-1)
(srfi srfi-26))
(define (path->str path)
(if (list? path)
(string-join path "/")
@ -465,9 +474,13 @@ application."
(dest (path->str (cdr pair))))
(unless (file-exists? dest)
(symlink target dest))))
(define (icd-symlink file)
(define (file-symlink file dir)
(mkdir-p dir)
(new-symlink
`(,file . ("/usr/share/vulkan/icd.d" ,(basename file)))))
`(,file . (,dir ,(basename file)))))
;; Use stat to follow links from packages like MangoHud.
(define (get-files dir)
(find-files (path->str dir) #:stat stat))
(define fhs-option-spec
'((asound32 (value #f))))
(let* ((guix-env (getenv "GUIX_ENVIRONMENT"))
@ -488,14 +501,11 @@ application."
"/run/current-system/profile/share"
"/sbin"
"/usr/lib"
"/usr/share/vulkan/icd.d"))
"/usr/share"))
(for-each
new-symlink
`((,ld.so.cache . "/etc/ld.so.cache")
(,ld.so.conf . "/etc/ld.so.conf") ;; needed?
;; For MangoHud implicit layers.
((,guix-env "share/vulkan/implicit_layer.d") .
"/usr/share/vulkan/implicit_layer.d")
((,guix-env "etc/ssl") . "/etc/ssl")
((,guix-env "etc/ssl") . "/run/current-system/profile/etc/ssl")
((,union32 "lib") . "/lib")
@ -512,17 +522,41 @@ application."
((,union64 "share/mime") . "/usr/share/mime") ; Steam tray icon.
((,union64 "share/glib-2.0") . "/usr/share/glib-2.0") ; Heroic interface.
((,union64 "share/drirc.d") . "/usr/share/drirc.d")
((,union64 "share/fonts") . "/usr/share/fonts")
((,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")))
((,union64 "etc/fonts") . "/etc/fonts")))
(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)))
(cut file-symlink <> "/usr/share/egl/egl_external_platform.d")
(append-map
get-files
`((,union32 "share/egl/egl_external_platform.d")
(,union64 "share/egl/egl_external_platform.d"))))
(for-each
(cut file-symlink <> "/usr/share/glvnd/egl_vendor.d")
(append-map
get-files
`((,union32 "share/glvnd/egl_vendor.d")
(,union64 "share/glvnd/egl_vendor.d"))))
(for-each
(cut file-symlink <> "/usr/share/vulkan/icd.d")
(append-map
get-files
`((,union32 "share/vulkan/icd.d")
(,union64 "share/vulkan/icd.d"))))
(for-each
(cut file-symlink <> "/usr/share/vulkan/explicit_layer.d")
(append-map
get-files
`((,union64 "share/vulkan/explicit_layer.d")
(,union32 "share/vulkan/explicit_layer.d"))))
(for-each
(cut file-symlink <> "/usr/share/vulkan/implicit_layer.d")
(append-map
get-files
`((,union32 "share/vulkan/implicit_layer.d")
(,union64 "share/vulkan/implicit_layer.d")
;; For MangoHud implicit layers.
(,guix-env "share/vulkan/implicit_layer.d"))))
;; TODO: This is not 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).
@ -537,7 +571,7 @@ application."
;; games). Wait to set this inside the container to not cause
;; issues on foreign distros, see
;; <https://gitlab.com/nonguix/nonguix/-/issues/303>
(setenv "LD_LIBRARY_PATH" "/lib64:/lib")
(setenv "LD_LIBRARY_PATH" "/lib64:/lib:/lib64/vdpau:/lib/vdpau")
;; Process FHS-specific command line options.
(let* ((options (getopt-long (or fhs-args '("")) fhs-option-spec))