flatpak: remove unneeded store items

This commit is contained in:
tobtoht 2023-06-29 16:12:04 +02:00
parent 2f51ff8b0e
commit c65165a9e3
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -44,7 +44,19 @@ 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
patchelf --set-rpath "/${GUIX_GLIBC}/lib:/${GUIX_FONTCONFIG}/lib:/${GUIX_GCC}/lib" feather
patchelf --set-rpath "/${GUIX_GLIBC}/lib:/${GUIX_FONTCONFIG}/lib:\$ORIGIN/lib" feather
# Copy dynamically linked libraries
mkdir lib
cp "${GUIX_GCC}/lib/libgcc_s.so.1" lib/
# Remove unneeded store items
chmod -R 755 .
rm -rf "$(get_store_path "bash-static")"
rm -rf "$(get_store_path "bash-minimal")"
rm -rf "$(get_store_path "gcc")"
rm -rf "$(get_store_path "font-dejavu")"
rm -rf "$(get_store_path "util-linux")"
# Fonts
# fontconfig looks in /app/share/fonts
@ -58,4 +70,6 @@ ln -s "/${GUIX_PROFILE}/share/xml" share/xml
ln -s "/${GUIX_PROFILE}" profile
# Setup startup symlink
ln -s "/app/${LN_GUIX_STORE}" startup
ln -s "/app/${LN_GUIX_STORE}" startup
chmod -R 555 .