mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-03 09:29:37 +00:00
flatpak: build flatstart with depends
This commit is contained in:
parent
37a0132efe
commit
efa56059f2
5 changed files with 21 additions and 37 deletions
14
contrib/depends/packages/flatstart.mk
Normal file
14
contrib/depends/packages/flatstart.mk
Normal file
|
@ -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
|
|
@ -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_packages := eudev libfuse libsquashfuse zstd appimage_runtime
|
||||||
linux_native_packages =
|
linux_native_packages =
|
||||||
|
|
||||||
|
x86_64_linux_packages := flatstart
|
||||||
|
|
||||||
darwin_packages :=
|
darwin_packages :=
|
||||||
darwin_native_packages = darwin_sdk native_cctools native_libtapi
|
darwin_native_packages = darwin_sdk native_cctools native_libtapi
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ cp /feather/contrib/flatpak/metadata .
|
||||||
mkdir files
|
mkdir files
|
||||||
cd files
|
cd files
|
||||||
|
|
||||||
|
# Copy flatstart binary
|
||||||
|
cp /feather/contrib/depends/x86_64-linux-gnu/bin/startup .
|
||||||
|
|
||||||
# Copy feather binary
|
# Copy feather binary
|
||||||
cp /feather-bin feather
|
cp /feather-bin feather
|
||||||
|
|
||||||
|
@ -40,7 +43,6 @@ GUIX_PROFILE=$(get_store_path "profile")
|
||||||
GUIX_GLIBC=$(get_store_path "glibc")
|
GUIX_GLIBC=$(get_store_path "glibc")
|
||||||
GUIX_FONTCONFIG=$(get_store_path "fontconfig")
|
GUIX_FONTCONFIG=$(get_store_path "fontconfig")
|
||||||
GUIX_GCC=$(get_store_path "gcc")
|
GUIX_GCC=$(get_store_path "gcc")
|
||||||
LN_GUIX_STORE="$(get_store_path "ln-guix-store")/bin/ln-guix-store"
|
|
||||||
|
|
||||||
# Patch Feather binary
|
# Patch Feather binary
|
||||||
patchelf --set-interpreter "/${GUIX_GLIBC}/lib/ld-linux-x86-64.so.2" feather
|
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" share/fonts
|
||||||
ln -s "/run/host/fonts-cache" share/fonts-cache
|
ln -s "/run/host/fonts-cache" share/fonts-cache
|
||||||
ln -s "/${GUIX_PROFILE}/share/locale" share/locale
|
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
|
ln -s "/${GUIX_PROFILE}/share/xml" share/xml
|
||||||
|
|
||||||
# Setup profile symlink
|
# Setup profile symlink
|
||||||
ln -s "/${GUIX_PROFILE}" profile
|
ln -s "/${GUIX_PROFILE}" profile
|
||||||
|
|
||||||
# Setup startup symlink
|
|
||||||
ln -s "/app/${LN_GUIX_STORE}" startup
|
|
||||||
|
|
||||||
chmod -R 555 .
|
chmod -R 555 .
|
|
@ -36,6 +36,7 @@
|
||||||
(gnu packages tls)
|
(gnu packages tls)
|
||||||
(gnu packages version-control)
|
(gnu packages version-control)
|
||||||
(gnu packages xorg)
|
(gnu packages xorg)
|
||||||
|
(gnu packages zig)
|
||||||
(guix build-system gnu)
|
(guix build-system gnu)
|
||||||
(guix build-system perl)
|
(guix build-system perl)
|
||||||
(guix build-system python)
|
(guix build-system python)
|
||||||
|
@ -325,6 +326,7 @@ chain for " target " development."))
|
||||||
cmake-minimal
|
cmake-minimal
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
zig
|
||||||
;; Native GCC 10 toolchain
|
;; Native GCC 10 toolchain
|
||||||
gcc-toolchain-10
|
gcc-toolchain-10
|
||||||
(list gcc-toolchain-10 "static")
|
(list gcc-toolchain-10 "static")
|
||||||
|
|
|
@ -2,43 +2,12 @@
|
||||||
(gnu packages)
|
(gnu packages)
|
||||||
(gnu packages certs)
|
(gnu packages certs)
|
||||||
(gnu packages fontutils)
|
(gnu packages fontutils)
|
||||||
(gnu packages zig)
|
|
||||||
(guix build-system gnu)
|
(guix build-system gnu)
|
||||||
(guix download)
|
(guix download)
|
||||||
((guix licenses) #:prefix license:)
|
((guix licenses) #:prefix license:)
|
||||||
(guix packages)
|
(guix packages)
|
||||||
(guix utils))
|
(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
|
(define utf8-locales
|
||||||
(make-glibc-utf8-locales
|
(make-glibc-utf8-locales
|
||||||
glibc
|
glibc
|
||||||
|
@ -49,5 +18,4 @@
|
||||||
(append
|
(append
|
||||||
(list nss-certs
|
(list nss-certs
|
||||||
fontconfig
|
fontconfig
|
||||||
ln-guix-store
|
|
||||||
utf8-locales)))
|
utf8-locales)))
|
Loading…
Reference in a new issue