-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
174 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env groovy | ||
library '[email protected].13' | ||
library '[email protected].18' | ||
|
||
/* Options section can't access functions in objects. */ | ||
def isPRBuild = utils.isPRBuild() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ callPackage }: | ||
callPackage ./binary.nix { | ||
version = "1.21.11"; | ||
hashes = { | ||
# Use `print-hashes.sh ${version}` to generate the list below | ||
darwin-amd64 = "a3efff72f7aba31c85b53ebfd3985d0e3157a87b0e69e178161ba7097c197885"; | ||
darwin-arm64 = "0142f5ac9f9a1bf19b826ee08a8c7955a745f7a2e62d36e0566d29fcac4d88e0"; | ||
linux-386 = "8b00cbc2519c2d052177bf2c8472bf06578d3b0182eeb3406a1d7d4e5d4c59ef"; | ||
linux-amd64 = "54a87a9325155b98c85bc04dc50298ddd682489eb47f486f2e6cb0707554abf0"; | ||
linux-arm64 = "715d9a7ff72e4e0e3378c48318c52c6e4dd32a47c4136f3c08846f89b2ee2241"; | ||
linux-armv6l = "a62bff8297816a387a36bbda2889dd0dbcf0f8ce03bc62162ecd6918d6acecb5"; | ||
linux-loong64 = "19c738e3670efb6581a91d7d93e719080ccf710684938d015ab3e7ca044715be"; | ||
linux-mips = "4240bd1a4ca8ab664ead554b418bd1b1f319b063258763ade44f81a4dd018e61"; | ||
linux-mips64 = "6245001da9e2c39698f97543019f9faf4813f0564e471ec654f4698e0b9f19eb"; | ||
linux-mips64le = "d10166bb6ea6538e24f01ac9bcbbbaee5657d07b9edc11a82cbf569355a36534"; | ||
linux-mipsle = "8ab7e1af86845aa39bc93e1ae7e58f79a0b8df59783129c3b73aa0379f693c4a"; | ||
linux-ppc64 = "2939e56894877c51eb9c579f55588b80c77f38481240042512307ad1db5b3dd8"; | ||
linux-ppc64le = "6f5e18187abc4ff1c3173afbe38ef29f84b6d1ee7173f40075a4134863b209a5"; | ||
linux-riscv64 = "3ee5f9aac2f252838d88bb4cf93560c567814889c74d87ad8a04be16aa5e1b21"; | ||
linux-s390x = "489c363d5da2d3d5709419bda61856582c5ebdc7874ca7ecdebf67d736d329e6"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Use this script to run different sanity checks for the APP_DIR used for AppImage | ||
# | ||
# It will check the | ||
# - glibc, libdtdc++ versions required | ||
# - unreseolved dynamic libraries | ||
# - issues with rpaths and interpreter | ||
# | ||
# You can run this script on build machine after APP_DIR is prepared, | ||
# but also on the client machine, which will run the AppImage (useful for ldd check). | ||
# You need to extract AppImage with `--appimage-extract` | ||
|
||
set -e pipefail | ||
|
||
echo 'GLIBC highest version:' | ||
find "${APP_DIR}" -type f -exec objdump -T {} \; 2>&1 | grep -v GLIBCXX | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -uV | tail -1 | ||
|
||
echo 'GLIBCXX highest version' | ||
find "${APP_DIR}" -type f -exec objdump -T {} \; 2>&1 | grep GLIBCXX | sed 's/.*GLIBCXX_\([.0-9]*\).*/\1/g' | sort -uV | tail -1 | ||
|
||
echo 'Unresolved libraries:' | ||
find "${APP_DIR}" -type f -exec ldd {} \; 2>&1 | grep -v 'you do not have execution permission' | grep -v 'not a dynamic executable' | grep -v ' => ' | grep -v 'ld-linux-x86-64.so.2' | grep -q 'linux-vdso.so.1' | wc -l | ||
|
||
echo 'Rpaths not starting with $ORIGIN:' | ||
find "${APP_DIR}" -type f -exec patchelf --print-rpath {} \; 2>&1 | grep -v 'not an ELF executable' | grep -v 'missing ELF header' | grep -v '^\$ORIGIN' | wc -l | ||
|
||
echo 'Interpreters not default system(/lib64/ld-linux-x86-64.so.2):' | ||
find "${APP_DIR}" -type f -exec patchelf --print-interpreter {} \; 2>&1 | grep -v 'not an ELF executable' | grep -v 'cannot find section' | grep -v 'missing ELF header' | grep -v '/lib64/ld-linux-x86-64.so.2' | wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e pipefail | ||
|
||
# Fix rpath and interpreter not fixed by linuxdeployqt | ||
if [[ ! -z "${IN_NIX_SHELL}" ]]; then | ||
patchelf --set-rpath '$ORIGIN/../../lib' \ | ||
"${APP_DIR}/usr/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so" \ | ||
"${APP_DIR}/usr/bin/StatusQ/libStatusQ.so" | ||
|
||
patchelf --set-rpath '$ORIGIN' \ | ||
"${APP_DIR}/usr/lib/libcom_err.so.3" \ | ||
"${APP_DIR}/usr/lib/libstatus.so" | ||
|
||
patchelf --set-rpath '$ORIGIN/../' \ | ||
"${APP_DIR}"/usr/lib/gstreamer-1.0/* \ | ||
"${APP_DIR}"/usr/lib/nss/*.so | ||
|
||
patchelf --set-rpath '$ORIGIN/../../' "${APP_DIR}"/usr/lib/gstreamer1.0/gstreamer-1.0/* | ||
|
||
patchelf --set-rpath '$ORIGIN/../lib' "${APP_DIR}/usr/libexec/QtWebEngineProcess" | ||
|
||
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 \ | ||
"${APP_DIR}/usr/bin/nim_status_client" \ | ||
"${APP_DIR}/usr/libexec/QtWebEngineProcess" \ | ||
"${APP_DIR}/usr/lib/libQt5Core.so.5" \ | ||
"${APP_DIR}"/usr/lib/gstreamer1.0/gstreamer-1.0/* | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e pipefail | ||
|
||
rm -rf "${APP_DIR}" | ||
|
||
mkdir -p \ | ||
"${APP_DIR}/usr/bin" \ | ||
"${APP_DIR}/usr/lib" \ | ||
"${APP_DIR}/usr/qml" \ | ||
"${APP_DIR}/usr/i18n" \ | ||
"${APP_DIR}/usr/bin/StatusQ" \ | ||
"${APP_DIR}/usr/plugins/platforminputcontexts" | ||
|
||
cp bin/nim_status_client "${APP_DIR}/usr/bin" | ||
cp bin/StatusQ/* "${APP_DIR}/usr/bin/StatusQ" | ||
cp nim-status.desktop "${APP_DIR}/." | ||
cp status.png "${APP_DIR}/status.png" | ||
cp status.png "${APP_DIR}/usr/" | ||
cp -R resources.rcc "${APP_DIR}/usr/" | ||
cp -R "${FLEETS_FILE}" "${APP_DIR}/usr/" | ||
cp bin/i18n/* "${APP_DIR}/usr/i18n" | ||
cp vendor/status-go/build/bin/libstatus.so "${APP_DIR}/usr/lib/" | ||
cp vendor/status-go/build/bin/libstatus.so.0 "${APP_DIR}/usr/lib/" | ||
cp "${STATUSKEYCARDGO}" "${APP_DIR}/usr/lib/" | ||
cp "${FCITX5_QT}" "${APP_DIR}/usr/plugins/platforminputcontexts/" | ||
|
||
# Copy dependencies, which linuxdeployqt can't manage from nix store or system (FHS) | ||
if [[ -z "${IN_NIX_SHELL}" ]]; then | ||
cp -r /usr/lib/x86_64-linux-gnu/nss "${APP_DIR}/usr/lib/" | ||
cp -P /usr/lib/x86_64-linux-gnu/libgst* "${APP_DIR}/usr/lib/" | ||
cp -r /usr/lib/x86_64-linux-gnu/gstreamer-1.0 "${APP_DIR}/usr/lib/" | ||
cp -r /usr/lib/x86_64-linux-gnu/gstreamer1.0 "${APP_DIR}/usr/lib/" | ||
else | ||
mkdir -p "${APP_DIR}"/usr/lib/{gstreamer1.0,gstreamer-1.0,nss} | ||
mkdir -p "${APP_DIR}"/usr/libexec | ||
|
||
echo "${GST_PLUGIN_SYSTEM_PATH_1_0}" | tr ':' '\n' | sort -u | xargs -I {} find {} -name "*.so" | xargs -I {} cp {} "${APP_DIR}/usr/lib/gstreamer-1.0/" | ||
cp -r "${GSTREAMER_PATH}/libexec/gstreamer-1.0" "${APP_DIR}/usr/lib/gstreamer1.0/" | ||
cp "${LIBKRB5_PATH}/lib/libcom_err.so.3" "${APP_DIR}/usr/lib/libcom_err.so.3" | ||
cp "${NSS_PATH}"/lib/{libfreebl3,libfreeblpriv3,libnssckbi,libnssdbm3,libsoftokn3}.{chk,so} "${APP_DIR}/usr/lib/nss/" || true | ||
cp "${QTWEBENGINE_PATH}/libexec/QtWebEngineProcess" "${APP_DIR}/usr/libexec/QtWebEngineProcess" | ||
cp "${QTWEBENGINE_PATH}"/resources/* "${APP_DIR}/usr/libexec/" | ||
cp -r "${QTWEBENGINE_PATH}/translations/qtwebengine_locales" "${APP_DIR}/usr/libexec/" | ||
|
||
chmod -R u+w "${APP_DIR}/usr" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters