Skip to content

Commit

Permalink
fix: patch trezord-go only for current system architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlesisz authored and grdddj committed Oct 18, 2023
1 parent 5c45b38 commit 5aaa5cb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/binaries/trezord-go/bin/download.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#!/usr/bin/env bash
set -e

SYSTEM_ARCH=$(uname -m)

# TODO: fetch trezord-go from nix

# Bridge needs an older glibc so we are pinning to nixos-21.05 (stable) as of 2021-07-02
nix-shell -p autoPatchelfHook -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/e9148dc1c30e02aae80cc52f68ceb37b772066f3.tar.gz" --run "autoPatchelf trezord-*"
if [[ $SYSTEM_ARCH == x86_64* ]]; then
FILES="-name \"trezord-*\" -not -name \"*-arm\""
elif [[ $SYSTEM_ARCH == aarch64* ]]; then
FILES="trezord-*-arm"
else
echo "Not a supported arch - $SYSTEM_ARCH"
exit 1
fi

# Older bridge (<= 31) needs older glibc so we are pinning to nixos-21.05 (stable) as of 2021-07-02
nix-shell -p autoPatchelfHook -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/e9148dc1c30e02aae80cc52f68ceb37b772066f3.tar.gz" --run "autoPatchelf $FILES"

0 comments on commit 5aaa5cb

Please sign in to comment.