-
Notifications
You must be signed in to change notification settings - Fork 12
/
release.nix
30 lines (29 loc) · 1.25 KB
/
release.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ runTest ? false, gitDescribe ? "TEST-dirty" }:
/*
The above should be `runTest ? true`, but ledger recently introduced a change that causes
eth.signTransaction to connect to cdn.ledger.com when contract data is attached.
This breaks tests on release. So, to allow release to run, skip tests for now.
Reenable ASAP.
*/
let
ledger-app = import ./. { inherit runTest gitDescribe; };
in rec {
analysis-nanos = ledger-app.clangAnalysis.s.wallet;
release-nanos = ledger-app.nano.s.release.all;
release-nanox = ledger-app.nano.x.release.all;
debug-build = (import ./. { debug = true; inherit runTest gitDescribe; }).nano.s.release.all;
inherit (ledger-app) usbtool;
ledger-blue = (import ./nix/ledgerblue.nix {}).withLedgerblue;
release-notes = ledger-app.pkgs.writeScript "release-notes" ''
PATH=${ledger-app.pkgs.coreutils}:$PATH
MD5=$(md5sum -b ${release-nanos} | awk '{print $1;}')
SHA256=$(sha256sum -b ${release-nanos} | awk '{print $1;}')
SHA512=$(sha512sum -b ${release-nanos} | awk '{print $1;}')
CODE_IDENTIFIER=$(tar xfO ${release-nanos} ledger-app-avalanche-s/code-identifier.txt)
echo "MD5 | $MD5"
echo "SHA256 | $SHA256"
echo "SHA512 | $SHA512"
echo
echo "Code Identifier: $CODE_IDENTIFIER"
'';
}