mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2026-01-25 03:54:58 -06:00
Compare commits
17 commits
7c137948ae
...
cabc16baec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cabc16baec | ||
|
|
f5338f63fc | ||
|
|
60d1e7b0f6 | ||
|
|
260dc0fdb7 | ||
|
|
26cccf3dfd | ||
|
|
597f3883fb | ||
|
|
a68bb43ba0 | ||
|
|
2b2f366b30 | ||
|
|
61b10ab59f | ||
|
|
9740d0edfd | ||
|
|
77bf998b18 | ||
|
|
cbb74d61e8 | ||
|
|
67bfb5b37b | ||
|
|
a0bb4541ba | ||
|
|
f6d284cefe | ||
|
|
bdfb94ab58 | ||
|
|
2b33a49a61 |
12 changed files with 244 additions and 119 deletions
138
README.org
138
README.org
|
|
@ -223,72 +223,114 @@ firmware, and blacklisting of conflicting modules:
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** NVIDIA graphics card
|
** NVIDIA graphics card
|
||||||
|
NVIDIA support in Nonguix is implemented with a few interfaces and packages:
|
||||||
|
=nonguix-transformation-nvidia= for system setup, =replace-mesa= and =nvda= for
|
||||||
|
application setup.
|
||||||
|
|
||||||
NVIDIA graphics card support in Nonguix consists of a system service =nvidia-service-type= and a package =nvda= for application setup.
|
*** System setup
|
||||||
|
Procedure =nonguix-transformation-nvidia= is defined in the
|
||||||
|
=(nonguix transformations)= module.
|
||||||
|
|
||||||
The following code serves as an example for system setup:
|
#+begin_example
|
||||||
|
nonguix-transformation-nvidia [#:driver nvda]
|
||||||
|
[#:kernel-mode-setting? #t]
|
||||||
|
[#:configure-xorg? #f]
|
||||||
|
[#:open-source-kernel-module?]
|
||||||
|
|
||||||
|
Return a procedure that transforms an operating system, setting up
|
||||||
|
DRIVER (default: nvda) for NVIDIA graphics card.
|
||||||
|
|
||||||
|
KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg
|
||||||
|
support.
|
||||||
|
|
||||||
|
CONFIGURE-XORG? (default: #f) is required for display managers that can start
|
||||||
|
the Xorg server (e.g. GDM).
|
||||||
|
|
||||||
|
OPEN-SOURCE-KERNEL-MODULE? (default: #f) only supports Turing and later
|
||||||
|
architectures and is expected to work with 'linux-lts'.
|
||||||
|
|
||||||
|
Use 'replace-mesa', for application setup out of the operating system
|
||||||
|
declaration.
|
||||||
|
|
||||||
|
TODO: Power management.
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
For example, assuming the follow operating system declaration, defined as
|
||||||
|
variable =%my-os=:
|
||||||
|
|
||||||
#+BEGIN_SRC scheme
|
#+BEGIN_SRC scheme
|
||||||
(use-modules (gnu services gnome)
|
(use-modules (nonguix transformations))
|
||||||
(gnu services xorg)
|
|
||||||
(nongnu packages nvidia)
|
|
||||||
(nongnu services nvidia))
|
|
||||||
|
|
||||||
(operating-system
|
(define %my-os
|
||||||
(kernel-arguments '("modprobe.blacklist=nouveau"
|
(operating-system ...))
|
||||||
;; 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
|
#+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:
|
No arguments are required for headless and Wayland environments:
|
||||||
|
|
||||||
|
#+begin_src scheme
|
||||||
|
((nonguix-transformation-nvidia)
|
||||||
|
%my-os)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
For Xorg environmnets, set =#:configure-xorg?= argument to =#t=:
|
||||||
|
|
||||||
|
#+begin_src scheme
|
||||||
|
((nonguix-transformation-nvidia #:configure-xorg? #t)
|
||||||
|
%my-os)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Full example below, using =compose= so that other system transformations can be
|
||||||
|
mixed in:
|
||||||
|
|
||||||
|
#+begin_src scheme
|
||||||
|
(use-modules (nonguix transformations) ...)
|
||||||
|
|
||||||
|
(define %my-os
|
||||||
|
(operating-system ...))
|
||||||
|
|
||||||
|
((compose (nonguix-transformation-nvidia))
|
||||||
|
%my-os)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Application setup
|
||||||
|
Application setup involves replacing the underlying graphics library from =mesa=
|
||||||
|
to =nvda=. Within an operating system declaration, it's handled by
|
||||||
|
=nonguix-transformation-nvidia=. In other cases we'll use the [[https://guix.gnu.org/manual/devel/en/html_node/Security-Updates.html][grafts]] mechanism
|
||||||
|
explictly.
|
||||||
|
|
||||||
|
In Guix command-line interface, we can use the =--with-graft== [[https://guix.gnu.org/manual/devel/en/guix.html#Package-Transformation-Options][package
|
||||||
|
transformation option]].
|
||||||
|
|
||||||
|
For example, spawning a one-off software environmnet with =guix shell=:
|
||||||
|
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
guix build mesa-utils --with-graft=mesa=nvda
|
guix shell mesa-utils nvda --with-graft=mesa=nvda -- glxinfo
|
||||||
guix build mesa-utils --with-input=mesa=nvda
|
|
||||||
#+END_SRC
|
#+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:
|
Note that =nvda= is added into the shell, it's for [[https://guix.gnu.org/manual/devel/en/html_node/Search-Paths.html][search paths]].
|
||||||
|
|
||||||
#+BEGIN_SRC shell
|
A programmatical approach is provided by procedure =(replace-mesa)= defined in
|
||||||
guix shell mesa-utils nvda --with-graft=mesa=nvda \
|
=(nongnu packages nvidia)= module. It can be applied onto any object:
|
||||||
-- glxinfo
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
To graft mesa with nvda programmatically, use =replace-mesa= defined in =(nongnu packages nvidia)=:
|
|
||||||
|
|
||||||
#+BEGIN_SRC scheme
|
#+BEGIN_SRC scheme
|
||||||
(use-modules (nongnu packages nvidia))
|
(use-modules (nongnu packages nvidia))
|
||||||
|
|
||||||
;; Replace mesa with nvda for a single package.
|
(replace-mesa <any-object>)
|
||||||
(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
|
#+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.
|
Additional note for PRIME render offload on switchable graphics setup: launch
|
||||||
|
graphical applications with environment variables
|
||||||
|
=__NV_PRIME_RENDER_OFFLOAD=1= and =__GLX_VENDOR_LIBRARY_NAME=nvidia=.
|
||||||
|
|
||||||
|
*** Package variants
|
||||||
|
A few packages require extra effort to support and they're implemented as
|
||||||
|
package variants. When you need one of them, install the variant below instead
|
||||||
|
of the normal one. Application setup is still necessary.
|
||||||
|
|
||||||
|
- heroic-nvidia
|
||||||
|
- mpv-nvidia
|
||||||
|
- obs-nvidia
|
||||||
|
- steam-nvidia
|
||||||
|
|
||||||
** Substitutes for nonguix
|
** Substitutes for nonguix
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
(package name)
|
(package name)
|
||||||
(version version)
|
(version version)
|
||||||
(urls (list (string-append
|
(urls (list (string-append
|
||||||
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
"https://download.nvidia.com/XFree86/Linux-x86_64/"
|
||||||
version "/NVIDIA-Linux-x86_64-" version ".run"))))))
|
version "/NVIDIA-Linux-x86_64-" version ".run"))))))
|
||||||
|
|
||||||
(define (nvidia-package? package)
|
(define (nvidia-package? package)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
|
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
|
||||||
;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
||||||
;;; Copyright © 2025 Remco van 't Veer <remco@remworks.net>
|
;;; Copyright © 2025 Remco van 't Veer <remco@remworks.net>
|
||||||
;;; Copyright © 2025 Mathieu Lirzin <mthl@reuz.fr>
|
;;; Copyright © 2025, 2026 Mathieu Lirzin <mthl@reuz.fr>
|
||||||
|
|
||||||
(define-module (nongnu packages clojure)
|
(define-module (nongnu packages clojure)
|
||||||
#:use-module (gnu packages clojure)
|
#:use-module (gnu packages clojure)
|
||||||
|
|
@ -94,7 +94,7 @@ lets you focus on your code.")
|
||||||
(define-public clj-kondo
|
(define-public clj-kondo
|
||||||
(package
|
(package
|
||||||
(name "clj-kondo")
|
(name "clj-kondo")
|
||||||
(version "2025.12.23")
|
(version "2026.01.12")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/zipbomb)
|
(method url-fetch/zipbomb)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
|
|
@ -102,7 +102,7 @@ lets you focus on your code.")
|
||||||
version "/clj-kondo-" version "-linux-amd64.zip"))
|
version "/clj-kondo-" version "-linux-amd64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1z47h8g9wg71gvvykp9paqi7k95si0bdcq9d1wx8ydnak7038l9s"))))
|
"1yangvsa469d884hw36j6qv102lhq809m3w5fwmry1qqd7x5bzg4"))))
|
||||||
(build-system binary-build-system)
|
(build-system binary-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:patchelf-plan `'(("clj-kondo" ("gcc" "zlib")))
|
(list #:patchelf-plan `'(("clj-kondo" ("gcc" "zlib")))
|
||||||
|
|
@ -123,6 +123,38 @@ lets you focus on your code.")
|
||||||
and EDN, without the need of a running REPL.")
|
and EDN, without the need of a running REPL.")
|
||||||
(license license:epl1.0)))
|
(license license:epl1.0)))
|
||||||
|
|
||||||
|
(define-public cljfmt
|
||||||
|
(package
|
||||||
|
(name "cljfmt")
|
||||||
|
(version "0.15.6")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch/tarbomb)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/weavejester/cljfmt/releases/download/"
|
||||||
|
version "/cljfmt-" version "-linux-amd64.tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1hnk0kb5za18gla2lgskl53aws721r9lpwif2fnm6jixymkv32ih"))))
|
||||||
|
(build-system binary-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:patchelf-plan `'(("cljfmt" ("gcc" "zlib")))
|
||||||
|
#:install-plan `'(("./cljfmt" "/bin/"))
|
||||||
|
#:phases #~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'chmod
|
||||||
|
(lambda _
|
||||||
|
(chmod "cljfmt" #o755))))))
|
||||||
|
(native-inputs
|
||||||
|
(list unzip))
|
||||||
|
(inputs
|
||||||
|
(list `(,gcc "lib")
|
||||||
|
zlib))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://github.com/weavejester/cljfmt")
|
||||||
|
(synopsis "Formatter for Clojure code")
|
||||||
|
(description "cljfmt is a tool for detecting and fixing formatting errors
|
||||||
|
in Clojure code.")
|
||||||
|
(license license:epl1.0)))
|
||||||
|
|
||||||
(define-public clojure-lsp
|
(define-public clojure-lsp
|
||||||
(package
|
(package
|
||||||
(name "clojure-lsp")
|
(name "clojure-lsp")
|
||||||
|
|
@ -181,7 +213,7 @@ perform refactors and more.")
|
||||||
(inherit clojure-tools-bin)
|
(inherit clojure-tools-bin)
|
||||||
(name "babashka-clojure-tools")
|
(name "babashka-clojure-tools")
|
||||||
;; Version must match the one hardcoded in #'borkdude.deps/version.
|
;; Version must match the one hardcoded in #'borkdude.deps/version.
|
||||||
(version "1.12.3.1577")
|
(version "1.12.4.1582")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(inherit (package-source clojure-tools-bin))
|
(inherit (package-source clojure-tools-bin))
|
||||||
|
|
@ -189,12 +221,12 @@ perform refactors and more.")
|
||||||
version
|
version
|
||||||
".tar.gz"))
|
".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1k5s3sdz72j2faz4rsbgqq4i5f30npf6ms0sg3lp764bx0x53y5v"))))))
|
(base32 "08gzfblnz0zhnk6pwr9vcm6y168psgrwmqww3wqk1v7j5gr68n7x"))))))
|
||||||
|
|
||||||
(define-public babashka
|
(define-public babashka
|
||||||
(package
|
(package
|
||||||
(name "babashka")
|
(name "babashka")
|
||||||
(version "1.12.213")
|
(version "1.12.214")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/tarbomb)
|
(method url-fetch/tarbomb)
|
||||||
(uri (string-append "https://github.com/babashka/babashka"
|
(uri (string-append "https://github.com/babashka/babashka"
|
||||||
|
|
@ -202,7 +234,7 @@ perform refactors and more.")
|
||||||
version "-linux-amd64.tar.gz"))
|
version "-linux-amd64.tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0p2rxkjk1n3wgzhnpasigs09b0h8q5vhjgpn04mfd3fg20fgkax3"))))
|
"14vrjddia92cz1da67nyjbq0y0jsdnn0235xma5jnkppqvy9jxqn"))))
|
||||||
(build-system binary-build-system)
|
(build-system binary-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:patchelf-plan
|
(list #:patchelf-plan
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ various IDEs and plugins.")
|
||||||
(files '("share/dotnet")))))
|
(files '("share/dotnet")))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("gcc:lib" ,gcc "lib")
|
`(("gcc:lib" ,gcc "lib")
|
||||||
("icu4c" ,icu4c-71)
|
("icu4c" ,icu4c)
|
||||||
("lttng-ust" ,lttng-ust)
|
("lttng-ust" ,lttng-ust)
|
||||||
("mit-krb5" ,mit-krb5)
|
("mit-krb5" ,mit-krb5)
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
|
|
@ -287,7 +287,7 @@ building different types of applications.")
|
||||||
(inputs
|
(inputs
|
||||||
`(("gcc:lib" ,gcc "lib")
|
`(("gcc:lib" ,gcc "lib")
|
||||||
("glibc", glibc)
|
("glibc", glibc)
|
||||||
("icu4c" ,icu4c-71)
|
("icu4c" ,icu4c)
|
||||||
("lttng-ust" ,lttng-ust)
|
("lttng-ust" ,lttng-ust)
|
||||||
("mit-krb5" ,mit-krb5)
|
("mit-krb5" ,mit-krb5)
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
|
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
|
||||||
|
|
||||||
(define-module (nongnu packages gradle)
|
(define-module (nongnu packages gradle)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages java)
|
#:use-module (gnu packages java)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
|
@ -35,9 +36,16 @@
|
||||||
`("JAVA_HOME" =
|
`("JAVA_HOME" =
|
||||||
(,(dirname
|
(,(dirname
|
||||||
(dirname
|
(dirname
|
||||||
(search-input-file inputs "bin/javac")))))))))))
|
(search-input-file inputs "bin/javac")))))
|
||||||
|
`("PATH" prefix
|
||||||
|
(,(dirname
|
||||||
|
(search-input-file inputs "bin/sed"))
|
||||||
|
,(dirname
|
||||||
|
(search-input-file inputs "bin/uname"))
|
||||||
|
,(dirname
|
||||||
|
(search-input-file inputs "/bin/xargs"))))))))))
|
||||||
(native-inputs (list unzip))
|
(native-inputs (list unzip))
|
||||||
(inputs (list `(,openjdk "jdk")))
|
(inputs (list coreutils findutils `(,openjdk "jdk") sed))
|
||||||
(home-page "https://gradle.org/")
|
(home-page "https://gradle.org/")
|
||||||
(synopsis "Flexible build automation tool for JVM")
|
(synopsis "Flexible build automation tool for JVM")
|
||||||
(description "Gradle is a build tool with a focus on build automation and
|
(description "Gradle is a build tool with a focus on build automation and
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ its core.")
|
||||||
(define-public signal-desktop
|
(define-public signal-desktop
|
||||||
(package
|
(package
|
||||||
(name "signal-desktop")
|
(name "signal-desktop")
|
||||||
(version "7.84.0")
|
(version "7.85.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
|
|
@ -92,7 +92,7 @@ its core.")
|
||||||
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
|
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
|
||||||
"_amd64.deb"))
|
"_amd64.deb"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1vcfzkzqvfgd9kfnqszksbc8f9l9a9pz91j50sxfvd7kv3787mwb"))))
|
(base32 "1yk2r6g8r1di08ji8z7hgnw7mv4rxqlrx6x167syls273wp4nzi1"))))
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(build-system chromium-binary-build-system)
|
(build-system chromium-binary-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
|
|
|
||||||
|
|
@ -87,19 +87,19 @@
|
||||||
|
|
||||||
;; Update this id with every firefox update to its release date.
|
;; Update this id with every firefox update to its release date.
|
||||||
;; It's used for cache validation and therefore can lead to strange bugs.
|
;; It's used for cache validation and therefore can lead to strange bugs.
|
||||||
(define %firefox-esr-build-id "20251208132959")
|
(define %firefox-esr-build-id "20260112140008")
|
||||||
|
|
||||||
(define-public firefox-esr
|
(define-public firefox-esr
|
||||||
(package
|
(package
|
||||||
(name "firefox-esr")
|
(name "firefox-esr")
|
||||||
(version "140.6.0esr")
|
(version "140.7.0esr")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
||||||
version "/source/firefox-" version ".source.tar.xz"))
|
version "/source/firefox-" version ".source.tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1jadc0ynq49zcqd7ix9nxlrqy5gfhm61p7yliwy068bma2mwjdbc"))
|
(base32 "0a8mrc4pja4cjhayg4af5lsfrf7161gfq03idwik0vvjf68772k0"))
|
||||||
(patches
|
(patches
|
||||||
(map (lambda (patch)
|
(map (lambda (patch)
|
||||||
(search-path
|
(search-path
|
||||||
|
|
@ -529,20 +529,20 @@ Release (ESR) version.")
|
||||||
|
|
||||||
;; Update this id with every firefox update to its release date.
|
;; Update this id with every firefox update to its release date.
|
||||||
;; It's used for cache validation and therefore can lead to strange bugs.
|
;; It's used for cache validation and therefore can lead to strange bugs.
|
||||||
(define %firefox-build-id "20251217214444")
|
(define %firefox-build-id "20260112140453")
|
||||||
|
|
||||||
(define-public firefox
|
(define-public firefox
|
||||||
(package
|
(package
|
||||||
(inherit firefox-esr)
|
(inherit firefox-esr)
|
||||||
(name "firefox")
|
(name "firefox")
|
||||||
(version "146.0.1")
|
(version "147.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
||||||
version "/source/firefox-" version ".source.tar.xz"))
|
version "/source/firefox-" version ".source.tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1swih4jljq162vgdl2m2d8xn4s4hj4vjqcfww59kk4kkhh78lrz9"))
|
(base32 "1znr9wp4f79b83mv0as9kj0nh09yjxzqv4nbi4bmn7jgfmiqwb92"))
|
||||||
(patches
|
(patches
|
||||||
(map (lambda (patch)
|
(map (lambda (patch)
|
||||||
(search-path
|
(search-path
|
||||||
|
|
@ -564,6 +564,9 @@ Release (ESR) version.")
|
||||||
(replace 'set-build-id
|
(replace 'set-build-id
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))))))
|
(setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))))))
|
||||||
|
(inputs
|
||||||
|
(modify-inputs (package-inputs firefox-esr)
|
||||||
|
(replace "icu4c" icu4c-78)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(modify-inputs (package-native-inputs firefox-esr)
|
(modify-inputs (package-native-inputs firefox-esr)
|
||||||
(replace "rust" rust-firefox)
|
(replace "rust" rust-firefox)
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ its unpacked checkout."
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
"https://download.nvidia.com/XFree86/Linux-x86_64/"
|
||||||
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
||||||
(file-name (string-append "NVIDIA-Linux-x86_64-" version))
|
(file-name (string-append "NVIDIA-Linux-x86_64-" version))
|
||||||
(sha256 (base32 hash))
|
(sha256 (base32 hash))
|
||||||
|
|
@ -231,9 +231,9 @@ ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\
|
||||||
(define-public nvidia-driver
|
(define-public nvidia-driver
|
||||||
(package
|
(package
|
||||||
(name "nvidia-driver")
|
(name "nvidia-driver")
|
||||||
(version "580.119.02")
|
(version "580.126.09")
|
||||||
(source (nvidia-source
|
(source (nvidia-source
|
||||||
version "1mzc700ngsnpmngblw51x58lgrdgsb1x1449lgksx27fsggza840"))
|
version "09pchs4lk2h8zpm8q2fqky6296h54knqi1vwsihzdpwaizj57b2c"))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:modules '((guix build copy-build-system)
|
(list #:modules '((guix build copy-build-system)
|
||||||
|
|
@ -632,9 +632,9 @@ add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
|
||||||
(define-public nvidia-settings
|
(define-public nvidia-settings
|
||||||
(package
|
(package
|
||||||
(name "nvidia-settings")
|
(name "nvidia-settings")
|
||||||
(version "580.119.02")
|
(version "580.126.09")
|
||||||
(source (nvidia-settings-source
|
(source (nvidia-settings-source
|
||||||
name version "1hkr2d54s85a94fzg1pl6yvsqi5f3d1mlmli84s4qs8dm35yb3xh"))
|
name version "1w6ippwzb4ly7jh3m2v8ygplf3j8gf3bh77fqxz4mhgckmdc49z1"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:tests? #f ;no test suite
|
(list #:tests? #f ;no test suite
|
||||||
|
|
|
||||||
|
|
@ -44,54 +44,55 @@
|
||||||
#:use-module ((nonguix licenses) #:prefix nonguix-license:))
|
#:use-module ((nonguix licenses) #:prefix nonguix-license:))
|
||||||
|
|
||||||
(define-public ffmpeg/nvidia
|
(define-public ffmpeg/nvidia
|
||||||
(package
|
(hidden-package
|
||||||
(inherit ffmpeg)
|
(package
|
||||||
(name "ffmpeg-nvidia")
|
(inherit ffmpeg)
|
||||||
(inputs
|
(inputs
|
||||||
(modify-inputs
|
(modify-inputs
|
||||||
(package-inputs ffmpeg)
|
(package-inputs ffmpeg)
|
||||||
(prepend nv-codec-headers)))
|
(prepend nv-codec-headers)))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments ffmpeg)
|
(substitute-keyword-arguments (package-arguments ffmpeg)
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
;; Currently only interested in NVENC.
|
;; Currently only interested in NVENC.
|
||||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||||
;; in the future.
|
;; in the future.
|
||||||
#~(cons* "--enable-cuvid"
|
#~(cons* "--enable-cuvid"
|
||||||
"--enable-ffnvcodec"
|
"--enable-ffnvcodec"
|
||||||
"--enable-encoder=hevc_nvenc"
|
"--enable-encoder=hevc_nvenc"
|
||||||
"--enable-encoder=h264_nvenc"
|
"--enable-encoder=h264_nvenc"
|
||||||
#$flags))))
|
#$flags))))
|
||||||
(description
|
(description
|
||||||
(string-append
|
(string-append
|
||||||
(package-description ffmpeg)
|
(package-description ffmpeg)
|
||||||
" This build of FFmpeg includes the nonfree NVIDIA encoder for
|
" This build of FFmpeg includes the nonfree NVIDIA encoder for
|
||||||
@code{h264_nvenc} and @code{hevc_nvenc} hardware encoding on NVIDIA GPUs."))
|
@code{h264_nvenc} and @code{hevc_nvenc} hardware encoding on NVIDIA GPUs."))
|
||||||
(properties '((upstream-name . "ffmpeg")))))
|
(properties '((upstream-name . "ffmpeg"))))))
|
||||||
|
|
||||||
(define-public ffmpeg-6/nvidia
|
(define-public ffmpeg-6/nvidia
|
||||||
(package
|
(hidden-package
|
||||||
(inherit ffmpeg-6)
|
(package
|
||||||
(name "ffmpeg-nvidia")
|
(inherit ffmpeg-6)
|
||||||
(inputs
|
(inputs
|
||||||
(modify-inputs
|
(modify-inputs
|
||||||
(package-inputs ffmpeg-6)
|
(package-inputs ffmpeg-6)
|
||||||
(prepend nv-codec-headers)))
|
(prepend nv-codec-headers)))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments ffmpeg-6)
|
(substitute-keyword-arguments (package-arguments ffmpeg-6)
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
;; Currently only interested in NVENC.
|
;; Currently only interested in NVENC.
|
||||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||||
;; in the future.
|
;; in the future.
|
||||||
#~(cons* "--enable-cuvid"
|
#~(cons* "--enable-cuvid"
|
||||||
"--enable-ffnvcodec"
|
"--enable-ffnvcodec"
|
||||||
"--enable-encoder=hevc_nvenc"
|
"--enable-encoder=hevc_nvenc"
|
||||||
"--enable-encoder=h264_nvenc"
|
"--enable-encoder=h264_nvenc"
|
||||||
#$flags))))
|
#$flags))))
|
||||||
(description (package-description ffmpeg/nvidia))
|
(description (package-description ffmpeg/nvidia))
|
||||||
(properties '((upstream-name . "ffmpeg")))))
|
(properties '((upstream-name . "ffmpeg"))))))
|
||||||
|
|
||||||
(define-deprecated-package ffmpeg-nvenc ffmpeg/nvidia)
|
(define-deprecated-package ffmpeg-nvenc ffmpeg/nvidia)
|
||||||
|
(define-deprecated-package ffmpeg-nvidia ffmpeg/nvidia)
|
||||||
|
|
||||||
(define-public gmmlib
|
(define-public gmmlib
|
||||||
(package
|
(package
|
||||||
|
|
|
||||||
22
nonguix.scm
Normal file
22
nonguix.scm
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (nonguix)
|
||||||
|
#:use-module (srfi srfi-26))
|
||||||
|
|
||||||
|
;; Re-export commonly-used modules for system setup.
|
||||||
|
|
||||||
|
(eval-when (eval load compile)
|
||||||
|
(begin
|
||||||
|
(define %public-modules
|
||||||
|
'((nonguix transformations)
|
||||||
|
(nongnu packages linux)
|
||||||
|
(nongnu system linux-initrd)))
|
||||||
|
|
||||||
|
(for-each (let ((i (module-public-interface (current-module))))
|
||||||
|
(lambda (m)
|
||||||
|
;; Ignore non-existent modules, so that we can split the
|
||||||
|
;; channel without breaking this module in the future.
|
||||||
|
(and=> (false-if-exception (resolve-interface m))
|
||||||
|
(cut module-use! i <>))))
|
||||||
|
%public-modules)))
|
||||||
|
|
@ -381,6 +381,9 @@ in a sandboxed FHS environment."
|
||||||
;; so set this path to where the drivers will actually be located in
|
;; so set this path to where the drivers will actually be located in
|
||||||
;; the container.
|
;; the container.
|
||||||
(setenv "LIBVA_DRIVERS_PATH" "/lib64/dri:/lib/dri")
|
(setenv "LIBVA_DRIVERS_PATH" "/lib64/dri:/lib/dri")
|
||||||
|
;; Set GStreamer plugin paths so both 64-bit and 32-bit plugins are visible
|
||||||
|
;; inside the container. Needed for GStreamer plugins to load in container.
|
||||||
|
(setenv "GST_PLUGIN_SYSTEM_PATH" "/lib64/gstreamer-1.0:/lib/gstreamer-1.0")
|
||||||
(format #t "\n* Launching ~a in sandbox: ~a.\n\n"
|
(format #t "\n* Launching ~a in sandbox: ~a.\n\n"
|
||||||
#$(package-name (ngc-wrap-package container)) sandbox-home)
|
#$(package-name (ngc-wrap-package container)) sandbox-home)
|
||||||
(when DEBUG
|
(when DEBUG
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#:use-module (nongnu system linux-initrd)
|
#:use-module (nongnu system linux-initrd)
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
|
#:use-module (gnu services xorg)
|
||||||
#:use-module (nongnu services nvidia)
|
#:use-module (nongnu services nvidia)
|
||||||
#:use-module (gnu packages package-management)
|
#:use-module (gnu packages package-management)
|
||||||
#:use-module (nongnu packages linux)
|
#:use-module (nongnu packages linux)
|
||||||
|
|
@ -92,11 +93,15 @@ and INITRD (default: microcode-initrd)."
|
||||||
(operating-system
|
(operating-system
|
||||||
(inherit os)
|
(inherit os)
|
||||||
(kernel linux)
|
(kernel linux)
|
||||||
(firmware firmware)
|
(firmware
|
||||||
|
(delete-duplicates
|
||||||
|
(append firmware
|
||||||
|
(operating-system-firmware os))))
|
||||||
(initrd initrd))))
|
(initrd initrd))))
|
||||||
|
|
||||||
(define* (nonguix-transformation-nvidia #:key (driver nvda)
|
(define* (nonguix-transformation-nvidia #:key (driver nvda)
|
||||||
(kernel-mode-setting? #t)
|
(kernel-mode-setting? #t)
|
||||||
|
(configure-xorg? #f)
|
||||||
(open-source-kernel-module? #f))
|
(open-source-kernel-module? #f))
|
||||||
"Return a procedure that transforms an operating system, setting up
|
"Return a procedure that transforms an operating system, setting up
|
||||||
DRIVER (default: nvda) for NVIDIA graphics card.
|
DRIVER (default: nvda) for NVIDIA graphics card.
|
||||||
|
|
@ -104,12 +109,16 @@ DRIVER (default: nvda) for NVIDIA graphics card.
|
||||||
KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg
|
KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg
|
||||||
support.
|
support.
|
||||||
|
|
||||||
|
CONFIGURE-XORG? (default: #f) is required for display managers that can start
|
||||||
|
the Xorg server (e.g. GDM).
|
||||||
|
|
||||||
OPEN-SOURCE-KERNEL-MODULE? (default: #f) only supports Turing and later
|
OPEN-SOURCE-KERNEL-MODULE? (default: #f) only supports Turing and later
|
||||||
architectures and is expected to work with 'linux-lts'.
|
architectures and is expected to work with 'linux-lts'.
|
||||||
|
|
||||||
For application setup, use 'replace-mesa'.
|
Use 'replace-mesa', for application setup out of the operating system
|
||||||
|
declaration.
|
||||||
|
|
||||||
TODO: Xorg configuration."
|
TODO: Power management."
|
||||||
(define %presets
|
(define %presets
|
||||||
`((,nvda . ,(service nvidia-service-type
|
`((,nvda . ,(service nvidia-service-type
|
||||||
(nvidia-configuration
|
(nvidia-configuration
|
||||||
|
|
@ -146,5 +155,10 @@ TODO: Xorg configuration."
|
||||||
(leave
|
(leave
|
||||||
(G_ "no NVIDIA service configuration available for '~a'~%")
|
(G_ "no NVIDIA service configuration available for '~a'~%")
|
||||||
(package-name driver)))
|
(package-name driver)))
|
||||||
|
,@(if configure-xorg?
|
||||||
|
(list (set-xorg-configuration
|
||||||
|
(xorg-configuration
|
||||||
|
(modules (cons driver %default-xorg-modules)))))
|
||||||
|
'())
|
||||||
,@(operating-system-user-services os))
|
,@(operating-system-user-services os))
|
||||||
#:driver driver)))))
|
#:driver driver)))))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue