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
|
||||
|
||||
** 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
|
||||
(use-modules (gnu services gnome)
|
||||
(gnu services xorg)
|
||||
(nongnu packages nvidia)
|
||||
(nongnu services nvidia))
|
||||
(use-modules (nonguix transformations))
|
||||
|
||||
(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"))))
|
||||
...))
|
||||
...)
|
||||
(define %my-os
|
||||
(operating-system ...))
|
||||
#+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
|
||||
guix build mesa-utils --with-graft=mesa=nvda
|
||||
guix build mesa-utils --with-input=mesa=nvda
|
||||
guix shell mesa-utils nvda --with-graft=mesa=nvda -- glxinfo
|
||||
#+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
|
||||
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)=:
|
||||
A programmatical approach is provided by procedure =(replace-mesa)= defined in
|
||||
=(nongnu packages nvidia)= module. It can be applied onto any object:
|
||||
|
||||
#+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>)
|
||||
...)
|
||||
(replace-mesa <any-object>)
|
||||
#+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
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
(package name)
|
||||
(version version)
|
||||
(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"))))))
|
||||
|
||||
(define (nvidia-package? package)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
|
||||
;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
||||
;;; 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)
|
||||
#:use-module (gnu packages clojure)
|
||||
|
|
@ -94,7 +94,7 @@ lets you focus on your code.")
|
|||
(define-public clj-kondo
|
||||
(package
|
||||
(name "clj-kondo")
|
||||
(version "2025.12.23")
|
||||
(version "2026.01.12")
|
||||
(source (origin
|
||||
(method url-fetch/zipbomb)
|
||||
(uri (string-append
|
||||
|
|
@ -102,7 +102,7 @@ lets you focus on your code.")
|
|||
version "/clj-kondo-" version "-linux-amd64.zip"))
|
||||
(sha256
|
||||
(base32
|
||||
"1z47h8g9wg71gvvykp9paqi7k95si0bdcq9d1wx8ydnak7038l9s"))))
|
||||
"1yangvsa469d884hw36j6qv102lhq809m3w5fwmry1qqd7x5bzg4"))))
|
||||
(build-system binary-build-system)
|
||||
(arguments
|
||||
(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.")
|
||||
(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
|
||||
(package
|
||||
(name "clojure-lsp")
|
||||
|
|
@ -181,7 +213,7 @@ perform refactors and more.")
|
|||
(inherit clojure-tools-bin)
|
||||
(name "babashka-clojure-tools")
|
||||
;; Version must match the one hardcoded in #'borkdude.deps/version.
|
||||
(version "1.12.3.1577")
|
||||
(version "1.12.4.1582")
|
||||
(source
|
||||
(origin
|
||||
(inherit (package-source clojure-tools-bin))
|
||||
|
|
@ -189,12 +221,12 @@ perform refactors and more.")
|
|||
version
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1k5s3sdz72j2faz4rsbgqq4i5f30npf6ms0sg3lp764bx0x53y5v"))))))
|
||||
(base32 "08gzfblnz0zhnk6pwr9vcm6y168psgrwmqww3wqk1v7j5gr68n7x"))))))
|
||||
|
||||
(define-public babashka
|
||||
(package
|
||||
(name "babashka")
|
||||
(version "1.12.213")
|
||||
(version "1.12.214")
|
||||
(source (origin
|
||||
(method url-fetch/tarbomb)
|
||||
(uri (string-append "https://github.com/babashka/babashka"
|
||||
|
|
@ -202,7 +234,7 @@ perform refactors and more.")
|
|||
version "-linux-amd64.tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0p2rxkjk1n3wgzhnpasigs09b0h8q5vhjgpn04mfd3fg20fgkax3"))))
|
||||
"14vrjddia92cz1da67nyjbq0y0jsdnn0235xma5jnkppqvy9jxqn"))))
|
||||
(build-system binary-build-system)
|
||||
(arguments
|
||||
(list #:patchelf-plan
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ various IDEs and plugins.")
|
|||
(files '("share/dotnet")))))
|
||||
(inputs
|
||||
`(("gcc:lib" ,gcc "lib")
|
||||
("icu4c" ,icu4c-71)
|
||||
("icu4c" ,icu4c)
|
||||
("lttng-ust" ,lttng-ust)
|
||||
("mit-krb5" ,mit-krb5)
|
||||
("openssl" ,openssl)
|
||||
|
|
@ -287,7 +287,7 @@ building different types of applications.")
|
|||
(inputs
|
||||
`(("gcc:lib" ,gcc "lib")
|
||||
("glibc", glibc)
|
||||
("icu4c" ,icu4c-71)
|
||||
("icu4c" ,icu4c)
|
||||
("lttng-ust" ,lttng-ust)
|
||||
("mit-krb5" ,mit-krb5)
|
||||
("openssl" ,openssl)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
|
||||
|
||||
(define-module (nongnu packages gradle)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages java)
|
||||
#:use-module (guix build-system copy)
|
||||
|
|
@ -35,9 +36,16 @@
|
|||
`("JAVA_HOME" =
|
||||
(,(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))
|
||||
(inputs (list `(,openjdk "jdk")))
|
||||
(inputs (list coreutils findutils `(,openjdk "jdk") sed))
|
||||
(home-page "https://gradle.org/")
|
||||
(synopsis "Flexible build automation tool for JVM")
|
||||
(description "Gradle is a build tool with a focus on build automation and
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ its core.")
|
|||
(define-public signal-desktop
|
||||
(package
|
||||
(name "signal-desktop")
|
||||
(version "7.84.0")
|
||||
(version "7.85.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
|
@ -92,7 +92,7 @@ its core.")
|
|||
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
|
||||
"_amd64.deb"))
|
||||
(sha256
|
||||
(base32 "1vcfzkzqvfgd9kfnqszksbc8f9l9a9pz91j50sxfvd7kv3787mwb"))))
|
||||
(base32 "1yk2r6g8r1di08ji8z7hgnw7mv4rxqlrx6x167syls273wp4nzi1"))))
|
||||
(supported-systems '("x86_64-linux"))
|
||||
(build-system chromium-binary-build-system)
|
||||
(arguments
|
||||
|
|
|
|||
|
|
@ -87,19 +87,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 "20251208132959")
|
||||
(define %firefox-esr-build-id "20260112140008")
|
||||
|
||||
(define-public firefox-esr
|
||||
(package
|
||||
(name "firefox-esr")
|
||||
(version "140.6.0esr")
|
||||
(version "140.7.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 "1jadc0ynq49zcqd7ix9nxlrqy5gfhm61p7yliwy068bma2mwjdbc"))
|
||||
(base32 "0a8mrc4pja4cjhayg4af5lsfrf7161gfq03idwik0vvjf68772k0"))
|
||||
(patches
|
||||
(map (lambda (patch)
|
||||
(search-path
|
||||
|
|
@ -529,20 +529,20 @@ Release (ESR) version.")
|
|||
|
||||
;; 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 "20251217214444")
|
||||
(define %firefox-build-id "20260112140453")
|
||||
|
||||
(define-public firefox
|
||||
(package
|
||||
(inherit firefox-esr)
|
||||
(name "firefox")
|
||||
(version "146.0.1")
|
||||
(version "147.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
||||
version "/source/firefox-" version ".source.tar.xz"))
|
||||
(sha256
|
||||
(base32 "1swih4jljq162vgdl2m2d8xn4s4hj4vjqcfww59kk4kkhh78lrz9"))
|
||||
(base32 "1znr9wp4f79b83mv0as9kj0nh09yjxzqv4nbi4bmn7jgfmiqwb92"))
|
||||
(patches
|
||||
(map (lambda (patch)
|
||||
(search-path
|
||||
|
|
@ -564,6 +564,9 @@ Release (ESR) version.")
|
|||
(replace 'set-build-id
|
||||
(lambda _
|
||||
(setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))))))
|
||||
(inputs
|
||||
(modify-inputs (package-inputs firefox-esr)
|
||||
(replace "icu4c" icu4c-78)))
|
||||
(native-inputs
|
||||
(modify-inputs (package-native-inputs firefox-esr)
|
||||
(replace "rust" rust-firefox)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ its unpacked checkout."
|
|||
(origin
|
||||
(method url-fetch)
|
||||
(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"))
|
||||
(file-name (string-append "NVIDIA-Linux-x86_64-" version))
|
||||
(sha256 (base32 hash))
|
||||
|
|
@ -231,9 +231,9 @@ ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\
|
|||
(define-public nvidia-driver
|
||||
(package
|
||||
(name "nvidia-driver")
|
||||
(version "580.119.02")
|
||||
(version "580.126.09")
|
||||
(source (nvidia-source
|
||||
version "1mzc700ngsnpmngblw51x58lgrdgsb1x1449lgksx27fsggza840"))
|
||||
version "09pchs4lk2h8zpm8q2fqky6296h54knqi1vwsihzdpwaizj57b2c"))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
(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
|
||||
(package
|
||||
(name "nvidia-settings")
|
||||
(version "580.119.02")
|
||||
(version "580.126.09")
|
||||
(source (nvidia-settings-source
|
||||
name version "1hkr2d54s85a94fzg1pl6yvsqi5f3d1mlmli84s4qs8dm35yb3xh"))
|
||||
name version "1w6ippwzb4ly7jh3m2v8ygplf3j8gf3bh77fqxz4mhgckmdc49z1"))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
(list #:tests? #f ;no test suite
|
||||
|
|
|
|||
|
|
@ -44,54 +44,55 @@
|
|||
#:use-module ((nonguix licenses) #:prefix nonguix-license:))
|
||||
|
||||
(define-public ffmpeg/nvidia
|
||||
(package
|
||||
(inherit ffmpeg)
|
||||
(name "ffmpeg-nvidia")
|
||||
(inputs
|
||||
(modify-inputs
|
||||
(package-inputs ffmpeg)
|
||||
(prepend nv-codec-headers)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ffmpeg)
|
||||
((#:configure-flags flags)
|
||||
;; Currently only interested in NVENC.
|
||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||
;; in the future.
|
||||
#~(cons* "--enable-cuvid"
|
||||
"--enable-ffnvcodec"
|
||||
"--enable-encoder=hevc_nvenc"
|
||||
"--enable-encoder=h264_nvenc"
|
||||
#$flags))))
|
||||
(description
|
||||
(string-append
|
||||
(package-description ffmpeg)
|
||||
" This build of FFmpeg includes the nonfree NVIDIA encoder for
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit ffmpeg)
|
||||
(inputs
|
||||
(modify-inputs
|
||||
(package-inputs ffmpeg)
|
||||
(prepend nv-codec-headers)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ffmpeg)
|
||||
((#:configure-flags flags)
|
||||
;; Currently only interested in NVENC.
|
||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||
;; in the future.
|
||||
#~(cons* "--enable-cuvid"
|
||||
"--enable-ffnvcodec"
|
||||
"--enable-encoder=hevc_nvenc"
|
||||
"--enable-encoder=h264_nvenc"
|
||||
#$flags))))
|
||||
(description
|
||||
(string-append
|
||||
(package-description ffmpeg)
|
||||
" This build of FFmpeg includes the nonfree NVIDIA encoder for
|
||||
@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
|
||||
(package
|
||||
(inherit ffmpeg-6)
|
||||
(name "ffmpeg-nvidia")
|
||||
(inputs
|
||||
(modify-inputs
|
||||
(package-inputs ffmpeg-6)
|
||||
(prepend nv-codec-headers)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ffmpeg-6)
|
||||
((#:configure-flags flags)
|
||||
;; Currently only interested in NVENC.
|
||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||
;; in the future.
|
||||
#~(cons* "--enable-cuvid"
|
||||
"--enable-ffnvcodec"
|
||||
"--enable-encoder=hevc_nvenc"
|
||||
"--enable-encoder=h264_nvenc"
|
||||
#$flags))))
|
||||
(description (package-description ffmpeg/nvidia))
|
||||
(properties '((upstream-name . "ffmpeg")))))
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit ffmpeg-6)
|
||||
(inputs
|
||||
(modify-inputs
|
||||
(package-inputs ffmpeg-6)
|
||||
(prepend nv-codec-headers)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ffmpeg-6)
|
||||
((#:configure-flags flags)
|
||||
;; Currently only interested in NVENC.
|
||||
;; Might be better to make a ffmpeg-nonfree with all nonfree codecs
|
||||
;; in the future.
|
||||
#~(cons* "--enable-cuvid"
|
||||
"--enable-ffnvcodec"
|
||||
"--enable-encoder=hevc_nvenc"
|
||||
"--enable-encoder=h264_nvenc"
|
||||
#$flags))))
|
||||
(description (package-description ffmpeg/nvidia))
|
||||
(properties '((upstream-name . "ffmpeg"))))))
|
||||
|
||||
(define-deprecated-package ffmpeg-nvenc ffmpeg/nvidia)
|
||||
(define-deprecated-package ffmpeg-nvidia ffmpeg/nvidia)
|
||||
|
||||
(define-public gmmlib
|
||||
(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
|
||||
;; the container.
|
||||
(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"
|
||||
#$(package-name (ngc-wrap-package container)) sandbox-home)
|
||||
(when DEBUG
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#:use-module (nongnu system linux-initrd)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services base)
|
||||
#:use-module (gnu services xorg)
|
||||
#:use-module (nongnu services nvidia)
|
||||
#:use-module (gnu packages package-management)
|
||||
#:use-module (nongnu packages linux)
|
||||
|
|
@ -92,11 +93,15 @@ and INITRD (default: microcode-initrd)."
|
|||
(operating-system
|
||||
(inherit os)
|
||||
(kernel linux)
|
||||
(firmware firmware)
|
||||
(firmware
|
||||
(delete-duplicates
|
||||
(append firmware
|
||||
(operating-system-firmware os))))
|
||||
(initrd initrd))))
|
||||
|
||||
(define* (nonguix-transformation-nvidia #:key (driver nvda)
|
||||
(kernel-mode-setting? #t)
|
||||
(configure-xorg? #f)
|
||||
(open-source-kernel-module? #f))
|
||||
"Return a procedure that transforms an operating system, setting up
|
||||
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
|
||||
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'.
|
||||
|
||||
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
|
||||
`((,nvda . ,(service nvidia-service-type
|
||||
(nvidia-configuration
|
||||
|
|
@ -146,5 +155,10 @@ TODO: Xorg configuration."
|
|||
(leave
|
||||
(G_ "no NVIDIA service configuration available for '~a'~%")
|
||||
(package-name driver)))
|
||||
,@(if configure-xorg?
|
||||
(list (set-xorg-configuration
|
||||
(xorg-configuration
|
||||
(modules (cons driver %default-xorg-modules)))))
|
||||
'())
|
||||
,@(operating-system-user-services os))
|
||||
#:driver driver)))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue