Merge pull request #38704 from roconnor-blockstream/trezor
trezord: 1.2.1 -> 2.0.12
This commit is contained in:
commit
fbcbac6769
@ -38,7 +38,7 @@ in {
|
|||||||
path = [];
|
path = [];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.trezord}/bin/trezord -f";
|
ExecStart = "${pkgs.trezord}/bin/trezord-go";
|
||||||
User = "trezord";
|
User = "trezord";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,65 +1,26 @@
|
|||||||
{ stdenv, fetchgit, fetchFromGitHub, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||||
, libusb1, libmicrohttpd
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
buildGoPackage rec {
|
||||||
version = "1.2.1";
|
name = "trezord-go-${version}";
|
||||||
in
|
version = "2.0.12";
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
|
||||||
name = "trezord-${version}";
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
src = fetchgit {
|
goPackagePath = "github.com/trezor/trezord-go";
|
||||||
url = "https://github.com/trezor/trezord";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
|
|
||||||
};
|
|
||||||
|
|
||||||
common = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "trezor";
|
owner = "trezor";
|
||||||
repo = "trezor-common";
|
repo = "trezord-go";
|
||||||
rev = "b55fb61218431e9c99c9d6c1673801902fc9e92e";
|
rev = "v${version}";
|
||||||
sha256 = "1zanbgz1qjs8wfwp0z91sqcvj77a9iis694k415jyd2dn4riqhdg";
|
sha256 = "03pz223jjfbd0g9gkk21q6d27jc8vd1bc1jz00i0f3dzvsyfx5g6";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
|
description = "TREZOR Communication Daemon aka TREZOR Bridge";
|
||||||
homepage = https://mytrezor.com;
|
homepage = https://mytrezor.com;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with stdenv.lib.maintainers; [ canndrew jb55 ];
|
maintainers = with stdenv.lib.maintainers; [ canndrew jb55 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./dynamic-link.patch ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
gcc
|
|
||||||
pkgconfig
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
curl
|
|
||||||
boost
|
|
||||||
protobuf
|
|
||||||
libusb1
|
|
||||||
libmicrohttpd
|
|
||||||
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'" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp trezord $out/bin
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 7c0e2cf..0e3f4ac 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -59,13 +59,6 @@ target_link_libraries(trezord ${OS_LIBRARIES})
|
|
||||||
find_package(CURL REQUIRED)
|
|
||||||
find_package(libmicrohttpd REQUIRED)
|
|
||||||
|
|
||||||
-# add static libs
|
|
||||||
-if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
||||||
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
|
||||||
- set(BUILD_SHARED_LIBS off)
|
|
||||||
- set(Boost_USE_STATIC_LIBS on)
|
|
||||||
- set(CMAKE_FIND_STATIC FIRST)
|
|
||||||
-endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
||||||
find_package(Boost 1.53.0 REQUIRED
|
|
||||||
regex thread system unit_test_framework program_options chrono)
|
|
||||||
find_package(Protobuf 2.5.0 REQUIRED)
|
|
Loading…
Reference in New Issue
Block a user