Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockbook: fix build on aarch64-linux #93610

Merged
merged 1 commit into from
Jul 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions pkgs/servers/blockbook/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{ stdenv
, buildGoModule
, lib
, fetchFromGitHub
, rocksdb
, bzip2
, zlib
, packr
, snappy
, pkg-config
, zeromq
, bzip2
, lz4
, rocksdb
, snappy
, zeromq
, zlib
}:

buildGoModule rec {
Expand All @@ -26,9 +25,9 @@ buildGoModule rec {

vendorSha256 = "1qjlvhizl8cy06cgf4phia70bgbm4lj57z5z2gyr8aglx98bnpdn";

buildInputs = [ bzip2 zlib snappy zeromq lz4 ];
nativeBuildInputs = [ packr pkg-config ];

nativeBuildInputs = [ pkg-config packr ];
buildInputs = [ bzip2 lz4 rocksdb snappy zeromq zlib ];

buildFlagsArray = ''
-ldflags=
Expand All @@ -45,17 +44,16 @@ buildGoModule rec {
};

overrideModAttrs = (_: {
postBuild = ''
postBuild = ''
rm -r vendor/github.com/ethereum/go-ethereum
cp -r --reflink=auto ${goethereum} vendor/github.com/ethereum/go-ethereum
'';
});
'';
});

preBuild = lib.optionalString stdenv.isDarwin ''
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
ulimit -n 8192
'' + ''
export CGO_CFLAGS="-I${rocksdb}/include"
export CGO_LDFLAGS="-L${rocksdb}/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4"
export CGO_LDFLAGS="-L${stdenv.cc.cc.lib}/lib -lrocksdb -lz -lbz2 -lsnappy -llz4 -lm -lstdc++"
packr clean && packr
'';

Expand All @@ -67,11 +65,11 @@ buildGoModule rec {
cp -r $src/static/css/ $out/share/
'';

meta = with lib; {
meta = with stdenv.lib; {
description = "Trezor address/account balance backend";
homepage = "https://github.com/trezor/blockbook";
license = licenses.agpl3;
maintainers = with maintainers; [ mmahut maintainers."1000101" ];
platforms = remove "aarch64-linux" platforms.unix;
platforms = platforms.unix;
};
}