Skip to content

Commit 27a4820

Browse files
committedSep 11, 2017
trezord: rebuild protobuf files
This allows it to build with Protobuf 3.6
1 parent f3ecd57 commit 27a4820

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed
 

‎pkgs/servers/trezord/default.nix

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchgit, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
1+
{ stdenv, fetchgit, fetchFromGitHub, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
22
, libusb1, libmicrohttpd
33
}:
44

@@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
1515
sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
1616
};
1717

18+
common = fetchFromGitHub {
19+
owner = "trezor";
20+
repo = "trezor-common";
21+
rev = "b55fb61218431e9c99c9d6c1673801902fc9e92e";
22+
sha256 = "1zanbgz1qjs8wfwp0z91sqcvj77a9iis694k415jyd2dn4riqhdg";
23+
};
24+
1825
meta = with stdenv.lib; {
1926
description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
2027
homepage = https://mytrezor.com;
@@ -40,8 +47,15 @@ stdenv.mkDerivation rec {
4047
jsoncpp
4148
];
4249

50+
preConfigure = ''
51+
( cd src/config
52+
ln -s $common/protob/config.proto
53+
protoc -I . --cpp_out=. config.proto
54+
)
55+
'';
56+
4357
LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ curl ]}";
44-
cmakeFlags="-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'";
58+
cmakeFlags = [ "-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'" ];
4559

4660
installPhase = ''
4761
mkdir -p $out/bin

0 commit comments

Comments
 (0)
Please sign in to comment.