Skip to content

Commit

Permalink
trezord: rebuild protobuf files
Browse files Browse the repository at this point in the history
This allows it to build with Protobuf 3.6
  • Loading branch information
abbradar committed Sep 11, 2017
1 parent f3ecd57 commit 27a4820
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions pkgs/servers/trezord/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
{ stdenv, fetchgit, fetchFromGitHub, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
, libusb1, libmicrohttpd
}:

Expand All @@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
};

common = fetchFromGitHub {
owner = "trezor";
repo = "trezor-common";
rev = "b55fb61218431e9c99c9d6c1673801902fc9e92e";
sha256 = "1zanbgz1qjs8wfwp0z91sqcvj77a9iis694k415jyd2dn4riqhdg";
};

meta = with stdenv.lib; {
description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
homepage = https://mytrezor.com;
Expand All @@ -40,8 +47,15 @@ stdenv.mkDerivation rec {
jsoncpp
];

preConfigure = ''
( cd src/config
ln -s $common/protob/config.proto
protoc -I . --cpp_out=. config.proto
)
'';

LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ curl ]}";
cmakeFlags="-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'";
cmakeFlags = [ "-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'" ];

installPhase = ''
mkdir -p $out/bin
Expand Down

0 comments on commit 27a4820

Please sign in to comment.