mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 11:29:59 +01:00
pack: Support localstatedir in AppImage format.
* guix/scripts/pack.scm (self-contained-appimage): Support localstatedir option. Change-Id: I296b3d3e442aa90f36de62a9b23aba4a2c3de9a0 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
9f9e89a8ca
commit
1ec7bf9f29
1 changed files with 12 additions and 1 deletions
|
@ -1018,15 +1018,22 @@ generating the AppImage. Valid compressors are: ~a~%")
|
|||
compressor-name
|
||||
%valid-compressors)))
|
||||
|
||||
(define database
|
||||
(and localstatedir?
|
||||
(file-append (store-database (list profile))
|
||||
"/db/db.sqlite")))
|
||||
|
||||
(define builder
|
||||
(with-extensions (list guile-gcrypt)
|
||||
(with-imported-modules (source-module-closure
|
||||
'((guix build store-copy)
|
||||
(guix build utils))
|
||||
(guix build utils)
|
||||
(gnu build install))
|
||||
#:select? not-config?)
|
||||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(guix build store-copy)
|
||||
(gnu build install)
|
||||
(rnrs io ports)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26))
|
||||
|
@ -1060,6 +1067,10 @@ generating the AppImage. Valid compressors are: ~a~%")
|
|||
(string-append appdir "/" #$name ".desktop")
|
||||
#:name #$name
|
||||
#:exec #$entry-point)
|
||||
;; Install database and gc roots.
|
||||
(when #+database
|
||||
;; Initialize /var/guix.
|
||||
(install-database-and-gc-roots appdir #+database profile))
|
||||
;; Compress the AppDir.
|
||||
(invoke #+(file-append squashfs-tools "/bin/mksquashfs") appdir
|
||||
squashfs "-root-owned" "-noappend"
|
||||
|
|
Loading…
Add table
Reference in a new issue