guix: remove linuxdeployqt

This commit is contained in:
tobtoht 2023-03-24 14:22:59 +01:00
parent 678a5ead96
commit 002560857c
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
5 changed files with 17 additions and 92 deletions

View file

@ -3,41 +3,42 @@
set -e
unset SOURCE_DATE_EPOCH
# Manually create the AppImage (reproducibly) since linuxdeployqt is not able to create cross-compiled AppImages
APPDIR="$PWD/feather.AppDir"
mkdir -p "$APPDIR"
mkdir -p "$APPDIR/usr/share/applications/"
mkdir -p "$APPDIR/usr/bin"
mkdir -p "$APPDIR/usr/lib"
mkdir -p "$APPDIR/usr/plugins"
cp "src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"
cp "src/assets/feather.desktop" "$APPDIR/feather.desktop"
cp "src/assets/images/appicons/64x64.png" "$APPDIR/feather.png"
cp "build/bin/feather" "$APPDIR/usr/bin/feather"
chmod +x "$APPDIR/usr/bin/feather"
# libgcc_s.so.1 not found
export LD_LIBRARY_PATH=/feather/contrib/depends/x86_64-linux-gnu/lib/:/gnu/store:/gnu/store/0wfxmi621h9xn4169xzhzd1p5g91cj9m-gcc-cross-x86_64-linux-gnu-10.3.0-lib/x86_64-linux-gnu/lib/
mkdir -p "${APPDIR}/usr/lib"
# linuxdeployqt glibc moaning bypass
mkdir -p "$APPDIR/usr/share/doc/libc6"
touch "$APPDIR/usr/share/doc/libc6/copyright"
XCB_LIBS=(libxcb-cursor.so.0 libxcb-render.so.0 libxcb-xfixes.so.0 libxcb-icccm.so.4 libxcb-render-util.so.0
libxcb-xkb.so.1 libxcb-image.so.0 libxcb-shape.so.0 libxkbcommon.so.0 libxcb-keysyms.so.1
libxcb-shm.so.0 libxkbcommon-x11.so.0 libxcb-randr.so.0 libxcb-sync.so.1)
# TODO: linuxdeployqt can't build ARM appimages on x86_64, skip this step for ARM builds
case "$HOST" in
x86_64*)
linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs -unsupported-allow-new-glibc
rm "$APPDIR/AppRun"
;;
esac
for lib in "${XCB_LIBS[@]}"
do
echo "${lib}"
cp "/feather/contrib/depends/${HOST}/lib/${lib}" "${APPDIR}/usr/lib/"
"${HOST}-strip" "${APPDIR}/usr/lib/${lib}"
patchelf --set-rpath "\$ORIGIN" "${APPDIR}/usr/lib/${lib}"
done
patchelf --set-rpath "\$ORIGIN/../lib" "$APPDIR/usr/bin/feather"
cp "contrib/AppImage/AppRun" "$APPDIR/"
chmod +x "$APPDIR/AppRun"
find feather.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
# Manually create AppImage (reproducibly)
mksquashfs feather.AppDir feather.squashfs -info -root-owned -no-xattrs -noappend -fstime 0
# mksquashfs writes a timestamp to the header
printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))

View file

@ -1,18 +0,0 @@
package=native_linuxdeployqt
$(package)_version=8
$(package)_download_path=https://github.com/probonopd/linuxdeployqt/archive/refs/tags/
$(package)_file_name=8.tar.gz
$(package)_sha256_hash=5597279392431aef16997c4b6892b5aa044392f7e8869439ebea33945a8bdbad
$(package)_dependencies=qt
define $(package)_config_cmds
qmake
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install
endef

View file

@ -1,17 +0,0 @@
package=native_patchelf
$(package)_version=0.14.5
$(package)_download_path=https://github.com/NixOS/patchelf/releases/download/$($(package)_version)/
$(package)_file_name=patchelf-$($(package)_version).tar.gz
$(package)_sha256_hash=113ada3f1ace08f0a7224aa8500f1fa6b08320d8f7df05ff58585286ec5faa6f
define $(package)_config_cmds
./configure --prefix=$(build_prefix)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View file

@ -2,7 +2,7 @@ packages := boost openssl libiconv unbound qrencode zbar sodium polyseed hidapi
native_packages := native_libxcb native_xcb_proto native_libXau native_xproto native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_cursor native_libxcb_util_wm native_qt native_protobuf
linux_packages := eudev liblzma libarchive libfuse libsquashfuse libappimage appimage_runtime
linux_native_packages = native_patchelf
linux_native_packages =
darwin_packages :=
darwin_native_packages = darwin_sdk native_cctools native_libtapi native_clang

View file

@ -33,7 +33,6 @@
(gnu packages shells)
(gnu packages tls)
(gnu packages version-control)
(gnu packages qt)
(guix build-system gnu)
(guix build-system perl)
(guix build-system python)
@ -286,45 +285,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
"glibc-2.27-fcommon.patch"
"glibc-2.27-guix-prefix.patch"))))))
(define-public linuxdeployqt
(package
(name "linuxdeployqt")
(version "b4697483c98120007019c3456914cfd1dba58384")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/probonopd/linuxdeployqt")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0zp1c5pya39g5nwkly1ix58svj08lfsfmv530jyf2ya7m4vvkhfs"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(invoke "qmake"
(string-append "PREFIX=" out)
"linuxdeployqt.pro"))))
(replace 'install
;; Messes up for some reason.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "bin/linuxdeployqt" bin)
#t))))))
(native-inputs (list qtbase-5))
(home-page "https://github.com/probonopd/linuxdeployqt")
(synopsis "Linux deploy tool")
(description "Makes Linux applications self-contained by copying in the libraries
and plugins that the application uses, and optionally generates an AppImage.
Can be used for Qt and other applications ")
(license license:gpl3+)))
(define-public ldid
(package
(name "ldid")
@ -393,7 +353,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
gperf
gettext-minimal
squashfs-tools
linuxdeployqt
;; Native GCC 10 toolchain
gcc-toolchain-10
(list gcc-toolchain-10 "static")