diff options
| author | Sebastian Dümcke <code@sam-d.com> | 2024-11-07 17:50:04 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-11-23 16:30:17 +0100 |
| commit | ccf72d5074b0c5ba793e686cbb1d6eaad39824bf (patch) | |
| tree | 1f0df2544d98228460424d17aafc6865dda38b71 /tests/pack.scm | |
| parent | b143ec8edacbdc2afb9e0c8fb4e8940b861be01a (diff) | |
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>
Diffstat (limited to 'tests/pack.scm')
| -rw-r--r-- | tests/pack.scm | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/tests/pack.scm b/tests/pack.scm index f8a9e09c284..1c1e3125575 100644 --- a/tests/pack.scm +++ b/tests/pack.scm | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> | 3 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
| 4 | ;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> | 4 | ;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 5 | ;;; Copyright © 2023 Oleg Pykhalov <go.wigust@gmail.com> | 5 | ;;; Copyright © 2023 Oleg Pykhalov <go.wigust@gmail.com> |
| 6 | ;;; Copyright © 2024 Noé Lopez <noelopez@free.fr> | ||
| 6 | ;;; | 7 | ;;; |
| 7 | ;;; This file is part of GNU Guix. | 8 | ;;; This file is part of GNU Guix. |
| 8 | ;;; | 9 | ;;; |
| @@ -32,7 +33,8 @@ | |||
| 32 | #:use-module (guix utils) | 33 | #:use-module (guix utils) |
| 33 | #:use-module ((guix build utils) #:select (%store-directory)) | 34 | #:use-module ((guix build utils) #:select (%store-directory)) |
| 34 | #:use-module (gnu packages) | 35 | #:use-module (gnu packages) |
| 35 | #:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target)) | 36 | #:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target |
| 37 | hello)) | ||
| 36 | #:use-module (gnu packages bootstrap) | 38 | #:use-module (gnu packages bootstrap) |
| 37 | #:use-module ((gnu packages package-management) #:select (rpm)) | 39 | #:use-module ((gnu packages package-management) #:select (rpm)) |
| 38 | #:use-module ((gnu packages compression) #:select (squashfs-tools)) | 40 | #:use-module ((gnu packages compression) #:select (squashfs-tools)) |
| @@ -341,6 +343,42 @@ | |||
| 341 | (built-derivations (list check)))) | 343 | (built-derivations (list check)))) |
| 342 | 344 | ||
| 343 | (unless store (test-skip 1)) | 345 | (unless store (test-skip 1)) |
| 346 | (test-assertm "appimage" | ||
| 347 | (mlet* %store-monad | ||
| 348 | ((guile (set-guile-for-build (default-guile))) | ||
| 349 | (profile -> (profile | ||
| 350 | (content (packages->manifest (list %bootstrap-guile hello))) | ||
| 351 | (hooks '()) | ||
| 352 | (locales? #f))) | ||
| 353 | (image (self-contained-appimage "hello-appimage" profile | ||
| 354 | #:entry-point "bin/hello" | ||
| 355 | #:extra-options | ||
| 356 | (list #:relocatable? #t))) | ||
| 357 | (check (gexp->derivation | ||
| 358 | "check-appimage" | ||
| 359 | #~(invoke #$image)))) | ||
| 360 | (built-derivations (list check)))) | ||
| 361 | |||
| 362 | (unless store (test-skip 1)) | ||
| 363 | (test-assertm "appimage + localstatedir" | ||
| 364 | (mlet* %store-monad | ||
| 365 | ((guile (set-guile-for-build (default-guile))) | ||
| 366 | (profile -> (profile | ||
| 367 | (content (packages->manifest (list %bootstrap-guile hello))) | ||
| 368 | (hooks '()) | ||
| 369 | (locales? #f))) | ||
| 370 | (image (self-contained-appimage "hello-appimage" profile | ||
| 371 | #:entry-point "bin/hello" | ||
| 372 | #:localstatedir? #t | ||
| 373 | #:extra-options | ||
| 374 | (list #:relocatable? #t))) | ||
| 375 | (check (gexp->derivation | ||
| 376 | "check-appimage" | ||
| 377 | #~(begin | ||
| 378 | (invoke #$image))))) | ||
| 379 | (built-derivations (list check)))) | ||
| 380 | |||
| 381 | (unless store (test-skip 1)) | ||
| 344 | (test-assertm "deb archive with symlinks and control files" | 382 | (test-assertm "deb archive with symlinks and control files" |
| 345 | (mlet* %store-monad | 383 | (mlet* %store-monad |
| 346 | ((guile (set-guile-for-build (default-guile))) | 384 | ((guile (set-guile-for-build (default-guile))) |
