Merge branch 'container' into 'master'
Draft: Merge NVIDIA and non-NVIDIA containers. See merge request nonguix/nonguix!607
This commit is contained in:
commit
99fa802c50
|
@ -14,6 +14,7 @@
|
||||||
#:use-module ((nonguix licenses) #:prefix license:)
|
#:use-module ((nonguix licenses) #:prefix license:)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
|
@ -210,99 +211,56 @@ implementation with gogdl and Amazon Games using Nile.")
|
||||||
steam-gameruntime-libs
|
steam-gameruntime-libs
|
||||||
fhs-min-libs))
|
fhs-min-libs))
|
||||||
|
|
||||||
(define steam-nvidia-container-libs
|
|
||||||
(modify-inputs steam-container-libs
|
|
||||||
(replace "mesa" nvda)))
|
|
||||||
|
|
||||||
(define heroic-extra-client-libs
|
(define heroic-extra-client-libs
|
||||||
`(("curl" ,curl) ; Required for Heroic to download e.g. Wine.
|
`(("curl" ,curl) ; Required for Heroic to download e.g. Wine.
|
||||||
("which" ,which) ; Heroic complains about trying to use which (though works).
|
("which" ,which) ; Heroic complains about trying to use which (though works).
|
||||||
("gtk+" ,gtk+))) ; Required for Heroic interface (gtk filechooser schema).
|
("gtk+" ,gtk+))) ; Required for Heroic interface (gtk filechooser schema).
|
||||||
|
|
||||||
(define steam-ld.so.conf
|
(define-public (steam-container-for driver)
|
||||||
(packages->ld.so.conf
|
|
||||||
(list (fhs-union steam-container-libs
|
|
||||||
#:name "fhs-union-64")
|
|
||||||
(fhs-union steam-container-libs
|
|
||||||
#:name "fhs-union-32"
|
|
||||||
#:system "i686-linux"))))
|
|
||||||
|
|
||||||
(define steam-ld.so.cache
|
|
||||||
(ld.so.conf->ld.so.cache steam-ld.so.conf))
|
|
||||||
|
|
||||||
(define steam-nvidia-ld.so.conf
|
|
||||||
(packages->ld.so.conf
|
|
||||||
(list (fhs-union steam-nvidia-container-libs
|
|
||||||
#:name "fhs-union-64")
|
|
||||||
(fhs-union steam-nvidia-container-libs
|
|
||||||
#:name "fhs-union-32"
|
|
||||||
#:system "i686-linux"))))
|
|
||||||
|
|
||||||
(define steam-nvidia-ld.so.cache
|
|
||||||
(ld.so.conf->ld.so.cache steam-nvidia-ld.so.conf))
|
|
||||||
|
|
||||||
(define-public steam-container
|
|
||||||
(nonguix-container
|
(nonguix-container
|
||||||
(name "steam")
|
(name "steam")
|
||||||
(wrap-package steam-client)
|
(wrap-package steam-client)
|
||||||
(run "/bin/steam")
|
(run "/bin/steam")
|
||||||
(ld.so.conf steam-ld.so.conf)
|
(packages
|
||||||
(ld.so.cache steam-ld.so.cache)
|
(modify-inputs steam-container-libs
|
||||||
(union64
|
(replace "mesa" driver)))
|
||||||
(fhs-union steam-container-libs
|
(preserved-env %nvidia-environment-variable-regexps)
|
||||||
#:name "fhs-union-64"))
|
|
||||||
(union32
|
|
||||||
(fhs-union steam-container-libs
|
|
||||||
#:name "fhs-union-32"
|
|
||||||
#:system "i686-linux"))
|
|
||||||
(link-files '("share"))
|
(link-files '("share"))
|
||||||
(description "Steam is a digital software distribution platform created by
|
(description "Steam is a digital software distribution platform created by
|
||||||
Valve. This package provides a script for launching Steam in a Guix container
|
Valve. This package provides a script for launching Steam in a Guix container
|
||||||
which will use the directory @file{$HOME/.local/share/guix-sandbox-home} where
|
which will use the directory @file{$HOME/.local/share/guix-sandbox-home} where
|
||||||
all games will be installed.")))
|
all games will be installed.")))
|
||||||
|
(define-deprecated/public-alias steam-container (steam-container-for mesa))
|
||||||
|
(define-deprecated/public-alias steam-nvidia-container (steam-container-for nvda))
|
||||||
|
|
||||||
(define-public steam-nvidia-container
|
(define-public steam-for
|
||||||
(nonguix-container
|
(compose nonguix-container->package steam-container-for))
|
||||||
(inherit steam-container)
|
|
||||||
(name "steam-nvidia")
|
|
||||||
;; Steam's .desktop files expect a "steam" executable, so provide that.
|
|
||||||
(binary-name "steam")
|
|
||||||
(ld.so.conf steam-nvidia-ld.so.conf)
|
|
||||||
(ld.so.cache steam-nvidia-ld.so.cache)
|
|
||||||
(union64
|
|
||||||
(fhs-union steam-nvidia-container-libs
|
|
||||||
#:name "fhs-union-64"))
|
|
||||||
(union32
|
|
||||||
(fhs-union steam-nvidia-container-libs
|
|
||||||
#:name "fhs-union-32"
|
|
||||||
#:system "i686-linux"))
|
|
||||||
(preserved-env %nvidia-environment-variable-regexps)))
|
|
||||||
|
|
||||||
(define-public steam (nonguix-container->package steam-container))
|
(define-public steam (steam-for mesa))
|
||||||
(define-public steam-nvidia (nonguix-container->package steam-nvidia-container))
|
(define-public steam-nvidia (deprecated-package "steam-nvidia" (steam-for nvda)))
|
||||||
|
|
||||||
(define-public heroic-container
|
(define-public (heroic-container-for driver)
|
||||||
(nonguix-container
|
(nonguix-container
|
||||||
(name "heroic")
|
(name "heroic")
|
||||||
(wrap-package heroic-client)
|
(wrap-package heroic-client)
|
||||||
(run "/bin/heroic")
|
(run "/bin/heroic")
|
||||||
(ld.so.conf steam-ld.so.conf)
|
|
||||||
(ld.so.cache steam-ld.so.cache)
|
|
||||||
;; TODO: Probably can remove some of the packages from these lists, at
|
;; TODO: Probably can remove some of the packages from these lists, at
|
||||||
;; least changing the client libraries as Heroic is rather different from
|
;; least changing the client libraries as Heroic is rather different from
|
||||||
;; Steam. However, a good number will be needed to run games anyway. A
|
;; Steam. However, a good number will be needed to run games anyway. A
|
||||||
;; better separation and testing in Steam as well would be helpful to
|
;; better separation and testing in Steam as well would be helpful to
|
||||||
;; differentiate what packages are needed for what in general. For now,
|
;; differentiate what packages are needed for what in general. For now,
|
||||||
;; this is easier and works.
|
;; this is easier and works.
|
||||||
(union64
|
(packages
|
||||||
(fhs-union `(,@heroic-extra-client-libs
|
(modify-inputs `(,@heroic-extra-client-libs
|
||||||
,@steam-container-libs)
|
,@steam-container-libs)
|
||||||
#:name "fhs-union-64"))
|
(replace "mesa" driver)))
|
||||||
;; Don't include heroic-client-libs as they are not needed in 32-bit.
|
;; Don't include heroic-client-libs as they are not needed in 32-bit.
|
||||||
(union32
|
(union32
|
||||||
(fhs-union steam-container-libs
|
(fhs-union (modify-inputs steam-container-libs
|
||||||
|
(replace "mesa" driver))
|
||||||
#:name "fhs-union-32"
|
#:name "fhs-union-32"
|
||||||
#:system "i686-linux"))
|
#:system "i686-linux"))
|
||||||
|
(preserved-env %nvidia-environment-variable-regexps)
|
||||||
(link-files '("share"))
|
(link-files '("share"))
|
||||||
(description "Heroic is an Open Source Game Launcher. Right now it supports launching
|
(description "Heroic is an Open Source Game Launcher. Right now it supports launching
|
||||||
games from the Epic Games Store using Legendary, GOG Games using our custom
|
games from the Epic Games Store using Legendary, GOG Games using our custom
|
||||||
|
@ -310,25 +268,14 @@ implementation with gogdl and Amazon Games using Nile. This package provides
|
||||||
a script for launching Heroic in a Guix container which will use the directory
|
a script for launching Heroic in a Guix container which will use the directory
|
||||||
@file{$HOME/.local/share/guix-sandbox-home} where all games will be
|
@file{$HOME/.local/share/guix-sandbox-home} where all games will be
|
||||||
installed.")))
|
installed.")))
|
||||||
|
(define-deprecated/public-alias heroic-container (heroic-container-for mesa))
|
||||||
|
(define-deprecated/public-alias heroic-nvidia-container (heroic-container-for nvda))
|
||||||
|
|
||||||
(define-public heroic-nvidia-container
|
(define-public heroic-for
|
||||||
(nonguix-container
|
(compose nonguix-container->package heroic-container-for))
|
||||||
(inherit heroic-container)
|
|
||||||
(name "heroic-nvidia")
|
|
||||||
(ld.so.conf steam-nvidia-ld.so.conf)
|
|
||||||
(ld.so.cache steam-nvidia-ld.so.cache)
|
|
||||||
(union64
|
|
||||||
(fhs-union `(,@heroic-extra-client-libs
|
|
||||||
,@steam-nvidia-container-libs)
|
|
||||||
#:name "fhs-union-64"))
|
|
||||||
(union32
|
|
||||||
(fhs-union steam-nvidia-container-libs
|
|
||||||
#:name "fhs-union-32"
|
|
||||||
#:system "i686-linux"))
|
|
||||||
(preserved-env %nvidia-environment-variable-regexps)))
|
|
||||||
|
|
||||||
(define-public heroic (nonguix-container->package heroic-container))
|
(define-public heroic (heroic-for mesa))
|
||||||
(define-public heroic-nvidia (nonguix-container->package heroic-nvidia-container))
|
(define-public heroic-nvidia (deprecated-package "heroic-nvidia" (heroic-for nvda)))
|
||||||
|
|
||||||
(define-public protonup-ng
|
(define-public protonup-ng
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -91,10 +91,24 @@
|
||||||
(manifest-name ngc-manifest-name (default "nonguix-container-manifest.scm"))
|
(manifest-name ngc-manifest-name (default "nonguix-container-manifest.scm"))
|
||||||
(internal-name ngc-internal-name (default "fhs-internal"))
|
(internal-name ngc-internal-name (default "fhs-internal"))
|
||||||
(sandbox-home ngc-sandbox-home (default ".local/share/guix-sandbox-home"))
|
(sandbox-home ngc-sandbox-home (default ".local/share/guix-sandbox-home"))
|
||||||
(ld.so.conf ngc-ld.so.conf)
|
(ld.so.conf ngc-ld.so.conf
|
||||||
(ld.so.cache ngc-ld.so.cache)
|
(default (packages->ld.so.conf
|
||||||
(union64 ngc-union64 (default '()))
|
(list (ngc-union64 this-nonguix-container)
|
||||||
(union32 ngc-union32 (default '()))
|
(ngc-union32 this-nonguix-container))))
|
||||||
|
(thunked))
|
||||||
|
(ld.so.cache ngc-ld.so.cache
|
||||||
|
(default (ld.so.conf->ld.so.cache
|
||||||
|
(ngc-ld.so.conf this-nonguix-container)))
|
||||||
|
(thunked))
|
||||||
|
(union64 ngc-union64
|
||||||
|
(default (fhs-union (ngc-packages this-nonguix-container)
|
||||||
|
#:name "fhs-union-64"))
|
||||||
|
(thunked))
|
||||||
|
(union32 ngc-union32
|
||||||
|
(default (fhs-union (ngc-packages this-nonguix-container)
|
||||||
|
#:name "fhs-union-32"
|
||||||
|
#:system "i686-linux"))
|
||||||
|
(thunked))
|
||||||
(preserved-env ngc-preserved-env (default '()))
|
(preserved-env ngc-preserved-env (default '()))
|
||||||
(exposed ngc-exposed (default '()))
|
(exposed ngc-exposed (default '()))
|
||||||
(shared ngc-shared (default '()))
|
(shared ngc-shared (default '()))
|
||||||
|
@ -410,12 +424,12 @@ the exact path for the fhs-internal package."
|
||||||
(item item))))
|
(item item))))
|
||||||
|
|
||||||
(manifest-add
|
(manifest-add
|
||||||
(packages->manifest (list #$@(ngc-packages container)))
|
(packages->manifest '())
|
||||||
(map store-item->manifest-entry
|
(map store-item->manifest-entry
|
||||||
'(#$(file-append (ngc-wrap-package container))
|
'(#$(ngc-wrap-package container)
|
||||||
#$(file-append (ngc-union64 container))
|
#$(ngc-union64 container)
|
||||||
#$(file-append (ngc-union32 container))
|
#$(ngc-union32 container)
|
||||||
#$(file-append fhs-internal)))))))
|
#$fhs-internal))))))
|
||||||
|
|
||||||
(define (make-container-internal container)
|
(define (make-container-internal container)
|
||||||
"Return a dummy package housing the fhs-internal script."
|
"Return a dummy package housing the fhs-internal script."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user