-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: patch trezord-go only for current system architecture
- Loading branch information
1 parent
5c45b38
commit 5aaa5cb
Showing
1 changed file
with
13 additions
and
2 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
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" |