summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/appimage.scm26
-rw-r--r--guix/scripts/pack.scm2
2 files changed, 19 insertions, 9 deletions
diff --git a/gnu/packages/appimage.scm b/gnu/packages/appimage.scm
index 16e8da65cb3..57900ee2e33 100644
--- a/gnu/packages/appimage.scm
+++ b/gnu/packages/appimage.scm
@@ -19,9 +19,11 @@
19(define-module (gnu packages appimage) 19(define-module (gnu packages appimage)
20 #:use-module ((guix licenses) #:prefix license:) 20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (gnu packages base) 21 #:use-module (gnu packages base)
22 #:use-module (gnu packages c)
22 #:use-module (gnu packages compression) 23 #:use-module (gnu packages compression)
23 #:use-module (gnu packages file-systems) 24 #:use-module (gnu packages file-systems)
24 #:use-module (gnu packages linux) 25 #:use-module (gnu packages linux)
26 #:use-module (gnu packages pkg-config)
25 #:use-module (gnu packages) 27 #:use-module (gnu packages)
26 #:use-module (guix build-system gnu) 28 #:use-module (guix build-system gnu)
27 #:use-module (guix gexp) 29 #:use-module (guix gexp)
@@ -30,9 +32,9 @@
30 #:use-module (guix utils)) 32 #:use-module (guix utils))
31 33
32(define-public appimage-type2-runtime 34(define-public appimage-type2-runtime
33 (let ((revision "0") 35 (let ((revision "1")
34 ;; No releases, just the latest commit. 36 ;; No releases, just the latest commit.
35 (commit "47b665594856b4e8928f8932adcf6d13061d8c30")) 37 (commit "caf24f9f712084686bfc24a70b75e50df0aefb9c"))
36 (package 38 (package
37 (name "appimage-type2-runtime") 39 (name "appimage-type2-runtime")
38 (version (git-version "continuous" revision commit)) 40 (version (git-version "continuous" revision commit))
@@ -44,16 +46,16 @@
44 (commit commit))) 46 (commit commit)))
45 (file-name (git-file-name name version)) 47 (file-name (git-file-name name version))
46 (sha256 48 (sha256
47 (base32 "0954crhlbapxis96g1s0vfpf78ybr64zvjalak387ksxj560g44x")))) 49 (base32 "17z0byws3dp375wcyq5xwy5npqy7hslqw21n677dp38z4f940nzv"))))
48 (build-system gnu-build-system) 50 (build-system gnu-build-system)
49 (arguments 51 (arguments
50 (list 52 (list
51 #:tests? #f ; No tests 53 #:tests? #f ; No tests
52 #:make-flags 54 #:make-flags
53 #~(list "-Csrc/runtime" "runtime-fuse3" 55 #~(list "-Csrc/runtime" "runtime"
54 (string-append "CC=" #$(cc-for-target)) 56 (string-append "CC=" #$(cc-for-target))
55 (string-append 57 (string-append
56 "CFLAGS=" "-I" #$(this-package-input "fuse") "/include/fuse/" 58 "CFLAGS=" "-I" #$(this-package-input "fuse") "/include/fuse3/"
57 " -DGIT_COMMIT='\"" "guix-" #$version "\"'" 59 " -DGIT_COMMIT='\"" "guix-" #$version "\"'"
58 " -D_FILE_OFFSET_BITS=64" 60 " -D_FILE_OFFSET_BITS=64"
59 " -static" 61 " -static"
@@ -64,17 +66,22 @@
64 (ice-9 binary-ports)) 66 (ice-9 binary-ports))
65 #:phases 67 #:phases
66 #~(modify-phases %standard-phases 68 #~(modify-phases %standard-phases
69 (add-after 'unpack 'use-pkgconfig-flags
70 (lambda _
71 (substitute* "src/runtime/Makefile"
72 (("-lmimalloc")
73 "$(pkg-config --cflags mimalloc)"))))
67 (delete 'configure) 74 (delete 'configure)
68 (replace 'install 75 (replace 'install
69 (lambda _ 76 (lambda _
70 (install-file "src/runtime/runtime-fuse3" 77 (install-file "src/runtime/runtime"
71 (string-append #$output "/bin")))) 78 (string-append #$output "/bin"))))
72 ;; Must be after all elf reliant phases. Used to identify the 79 ;; Must be after all elf reliant phases. Used to identify the
73 ;; executable as an AppImage as per the specification. 80 ;; executable as an AppImage as per the specification.
74 (add-after 'make-dynamic-linker-cache 'set-magic-bytes 81 (add-after 'make-dynamic-linker-cache 'set-magic-bytes
75 (lambda _ 82 (lambda _
76 (let ((port (open (string-append #$output 83 (let ((port (open (string-append #$output
77 "/bin/runtime-fuse3") 84 "/bin/runtime")
78 (logior O_WRONLY)))) 85 (logior O_WRONLY))))
79 (seek port 8 SEEK_SET) 86 (seek port 8 SEEK_SET)
80 (put-bytevector port #vu8(#x41 #x49 #x02)) 87 (put-bytevector port #vu8(#x41 #x49 #x02))
@@ -84,9 +91,12 @@
84 (this-package-input "fuse") 91 (this-package-input "fuse")
85 (gexp-input (this-package-input "zstd") "static") 92 (gexp-input (this-package-input "zstd") "static")
86 (gexp-input (this-package-input "zlib") "static")))) 93 (gexp-input (this-package-input "zlib") "static"))))
94 (native-inputs (list pkg-config))
87 ;; Only needed at build time. 95 ;; Only needed at build time.
88 (inputs (list squashfuse-for-appimage 96 (inputs (list `(,fuse "out")
89 `(,fuse "static") 97 `(,fuse "static")
98 mimalloc
99 squashfuse-for-appimage
90 `(,zstd "static") 100 `(,zstd "static")
91 `(,zlib "static"))) 101 `(,zlib "static")))
92 (synopsis "Runtime for executing AppImages") 102 (synopsis "Runtime for executing AppImages")
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 722c707e508..f46abc44d62 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -999,7 +999,7 @@ added to the pack."
999 (warning (G_ "AppImages should be built with the --relocatable flag~%")))) 999 (warning (G_ "AppImages should be built with the --relocatable flag~%"))))
1000 1000
1001 (define runtime-package appimage-type2-runtime) 1001 (define runtime-package appimage-type2-runtime)
1002 (define runtime-path "bin/runtime-fuse3") 1002 (define runtime-path "bin/runtime")
1003 (define %valid-compressors '("gzip" "zstd")) 1003 (define %valid-compressors '("gzip" "zstd"))
1004 1004
1005 (let ((compressor-name (compressor-name compressor))) 1005 (let ((compressor-name (compressor-name compressor)))