]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
flatpak: build flatstart with depends
authortobtoht <tob@featherwallet.org>
Thu, 29 Jun 2023 18:36:16 +0000 (20:36 +0200)
committertobtoht <tob@featherwallet.org>
Thu, 29 Jun 2023 18:49:08 +0000 (20:49 +0200)
contrib/depends/packages/flatstart.mk [new file with mode: 0644]
contrib/depends/packages/packages.mk
contrib/flatpak/make_flatpak.sh
contrib/guix/manifest.scm
contrib/guix/pack.scm

diff --git a/contrib/depends/packages/flatstart.mk b/contrib/depends/packages/flatstart.mk
new file mode 100644 (file)
index 0000000..592f41f
--- /dev/null
@@ -0,0 +1,14 @@
+package=flatstart
+$(package)_version=a148fb86c30968eeb30dc6ac3384ad2a16690520
+$(package)_download_path=https://github.com/tobtoht/ln-guix-store/archive/
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=e9694fcda4f9fcb00374da7a439b881296c0ce67ea98ca44bf2830d1a364365b
+
+define $(package)_build_cmds
+  zig build-exe ln-guix-store.zig --strip -OReleaseSmall
+endef
+
+define $(package)_stage_cmds
+  mkdir -p $($(package)_staging_prefix_dir)/bin && \
+  cp ln-guix-store $($(package)_staging_prefix_dir)/bin/startup
+endef
index 0214305a6357980c3561b8f92387bb08ce30ba2c..822e0de8bd76c084399a1c6254dd4951d3b7c3a8 100644 (file)
@@ -4,6 +4,8 @@ native_packages := native_libxcb native_xcb_proto native_libXau native_xproto na
 linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
 linux_native_packages =
 
+x86_64_linux_packages := flatstart
+
 darwin_packages :=
 darwin_native_packages = darwin_sdk native_cctools native_libtapi
 
index 258b32e21d5417bfadd0ff952f05042acfb2e708..e0d39a6645bad9963436271f4f5faacac88d770d 100644 (file)
@@ -24,6 +24,9 @@ cp /feather/contrib/flatpak/metadata .
 mkdir files
 cd files
 
+# Copy flatstart binary
+cp /feather/contrib/depends/x86_64-linux-gnu/bin/startup .
+
 # Copy feather binary
 cp /feather-bin feather
 
@@ -40,7 +43,6 @@ GUIX_PROFILE=$(get_store_path "profile")
 GUIX_GLIBC=$(get_store_path "glibc")
 GUIX_FONTCONFIG=$(get_store_path "fontconfig")
 GUIX_GCC=$(get_store_path "gcc")
-LN_GUIX_STORE="$(get_store_path "ln-guix-store")/bin/ln-guix-store"
 
 # Patch Feather binary
 patchelf --set-interpreter "/${GUIX_GLIBC}/lib/ld-linux-x86-64.so.2" feather
@@ -74,13 +76,9 @@ rm -rf "${GUIX_GLIBC:?}/bin"
 ln -s "/run/host/fonts" share/fonts
 ln -s "/run/host/fonts-cache" share/fonts-cache
 ln -s "/${GUIX_PROFILE}/share/locale" share/locale
-ln -s "/${GUIX_PROFILE}/share/dbus-1" share/dbus-1
 ln -s "/${GUIX_PROFILE}/share/xml" share/xml
 
 # Setup profile symlink
 ln -s "/${GUIX_PROFILE}" profile
 
-# Setup startup symlink
-ln -s "/app/${LN_GUIX_STORE}" startup
-
 chmod -R 555 .
\ No newline at end of file
index c1185af619813dc12d0ac64e34b8769d8e1e6272..c90b00bd79267627f0c4f53138e883082cde8d80 100644 (file)
@@ -36,6 +36,7 @@
              (gnu packages tls)
              (gnu packages version-control)
              (gnu packages xorg)
+             (gnu packages zig)
              (guix build-system gnu)
              (guix build-system perl)
              (guix build-system python)
@@ -325,6 +326,7 @@ chain for " target " development."))
         cmake-minimal
         meson
         ninja
+        zig
         ;; Native GCC 10 toolchain
         gcc-toolchain-10
         (list gcc-toolchain-10 "static")
index 1bfbf790c21f7257632009948ede733743f1146d..6341b93deb9b8fced0359accc14d228431508632 100644 (file)
@@ -2,43 +2,12 @@
   (gnu packages)
   (gnu packages certs)
   (gnu packages fontutils)
-  (gnu packages zig)
   (guix build-system gnu)
   (guix download)
   ((guix licenses) #:prefix license:)
   (guix packages)
   (guix utils))
 
-(define-public ln-guix-store
-  (package
-    (name "ln-guix-store")
-    (version "a148fb86c30968eeb30dc6ac3384ad2a16690520")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                     "https://github.com/tobtoht/ln-guix-store/archive/" version ".tar.gz"))
-              (sha256 (base32 "0nrncjix2c18px2cm67acz7c15hji2dl6ynsfh1v1z7rlk6lysg9"))))
-    (build-system gnu-build-system)
-    (arguments
-      (list
-        #:make-flags
-        #~(list (string-append "PREFIX=" #$output)
-                (string-append "CC=" #$(cc-for-target)))
-        #:phases
-        #~(modify-phases %standard-phases
-            (delete 'configure)      ; No configure script.
-            (add-before 'build 'pre-build
-              (lambda _
-                (setenv "ZIG_GLOBAL_CACHE_DIR"
-                  (mkdtemp "/tmp/zig-cache-XXXXXX"))))
-            (delete 'check))))
-    (native-inputs
-      (list zig))
-    (synopsis "Symlink /app/gnu to /gnu")
-    (description "Tiny program to symlink /app/gnu to /gnu inside a Flatpak")
-    (license license:bsd-3)
-    (home-page "https://featherwallet.org/")))
-
 (define utf8-locales
   (make-glibc-utf8-locales
     glibc
@@ -49,5 +18,4 @@
   (append
     (list nss-certs
           fontconfig
-          ln-guix-store
           utf8-locales)))
\ No newline at end of file