1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

pack: Add support for AppImage pack format.

* guix/scripts/pack.scm (self-contained-appimage): New procedure.
(%formats, show-formats): Add it.
(guix-pack): Honor it.
* doc/guix.texi: Document AppImage pack.
* tests/pack.scm ("appimage", "appimage + localstatedir"): New tests.

Co-authored-by: Noé Lopez <noelopez@free.fr>
Change-Id: I33ebfec623cff1cfcd6f029d2d3054c23ab1949a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Sebastian Dümcke
2024-11-07 17:50:04 +01:00
committed by Ludovic Courtès
parent b143ec8eda
commit ccf72d5074
3 changed files with 198 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2024 Noé Lopez <noelopez@free.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,7 +33,8 @@
#:use-module (guix utils)
#:use-module ((guix build utils) #:select (%store-directory))
#:use-module (gnu packages)
#:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target))
#:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target
hello))
#:use-module (gnu packages bootstrap)
#:use-module ((gnu packages package-management) #:select (rpm))
#:use-module ((gnu packages compression) #:select (squashfs-tools))
@@ -340,6 +342,42 @@
(mkdir #$output))))))))
(built-derivations (list check))))
(unless store (test-skip 1))
(test-assertm "appimage"
(mlet* %store-monad
((guile (set-guile-for-build (default-guile)))
(profile -> (profile
(content (packages->manifest (list %bootstrap-guile hello)))
(hooks '())
(locales? #f)))
(image (self-contained-appimage "hello-appimage" profile
#:entry-point "bin/hello"
#:extra-options
(list #:relocatable? #t)))
(check (gexp->derivation
"check-appimage"
#~(invoke #$image))))
(built-derivations (list check))))
(unless store (test-skip 1))
(test-assertm "appimage + localstatedir"
(mlet* %store-monad
((guile (set-guile-for-build (default-guile)))
(profile -> (profile
(content (packages->manifest (list %bootstrap-guile hello)))
(hooks '())
(locales? #f)))
(image (self-contained-appimage "hello-appimage" profile
#:entry-point "bin/hello"
#:localstatedir? #t
#:extra-options
(list #:relocatable? #t)))
(check (gexp->derivation
"check-appimage"
#~(begin
(invoke #$image)))))
(built-derivations (list check))))
(unless store (test-skip 1))
(test-assertm "deb archive with symlinks and control files"
(mlet* %store-monad