git.iko.soy/typeable/nixpkgs
on master help sign in
trezord: 1.2.1 -> 2.0.12

The old trezord is obsolete and no longer functions with Trezor's password manager app.

commita60e17438ea38d048b690d4fa6c2c67053479463 authorRussell O'Connor <roconnor@blockstream.io> dateTue 10 Apr 2018, 18:12 (9 years ago) parent56fb68d
3 files changed+14−71
nixos/modules/services/hardware/trezord.nix+1−1 pkgs/servers/trezord/default.nix+13−52 pkgs/servers/trezord/dynamic-link.patch−18
nixos/modules/services/hardware/trezord.nix+1−1
@@ -38,7 +38,7 @@ in {
3838 path = [];
3939 serviceConfig = {
4040 Type = "simple";
41− ExecStart = "${pkgs.trezord}/bin/trezord -f";
41+ ExecStart = "${pkgs.trezord}/bin/trezord-go";
4242 User = "trezord";
4343 };
4444 };
pkgs/servers/trezord/default.nix+13−52
@@ -1,65 +1,26 @@
1−{ stdenv, fetchgit, fetchFromGitHub, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
2−, libusb1, libmicrohttpd
3−}:
1+{ stdenv, buildGoPackage, fetchFromGitHub }:
42
5−let
6− version = "1.2.1";
7−in
3+buildGoPackage rec {
4+ name = "trezord-go-${version}";
5+ version = "2.0.12";
86
9−stdenv.mkDerivation rec {
10− name = "trezord-${version}";
7+ # Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
8+ hardeningDisable = [ "fortify" ];
119
12− src = fetchgit {
13− url = "https://github.com/trezor/trezord";
14− rev = "refs/tags/v${version}";
15− sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
16− };
10+ goPackagePath = "github.com/trezor/trezord-go";
1711
18− common = fetchFromGitHub {
19− owner = "trezor";
20− repo = "trezor-common";
21− rev = "b55fb61218431e9c99c9d6c1673801902fc9e92e";
22− sha256 = "1zanbgz1qjs8wfwp0z91sqcvj77a9iis694k415jyd2dn4riqhdg";
12+ src = fetchFromGitHub {
13+ owner = "trezor";
14+ repo = "trezord-go";
15+ rev = "v${version}";
16+ sha256 = "03pz223jjfbd0g9gkk21q6d27jc8vd1bc1jz00i0f3dzvsyfx5g6";
2317 };
2418
2519 meta = with stdenv.lib; {
26− description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
20+ description = "TREZOR Communication Daemon aka TREZOR Bridge";
2721 homepage = https://mytrezor.com;
2822 license = licenses.gpl3;
2923 maintainers = with stdenv.lib.maintainers; [ canndrew jb55 ];
3024 platforms = platforms.linux;
3125 };
32−
33− patches = [ ./dynamic-link.patch ];
34−
35− nativeBuildInputs = [
36− cmake
37− gcc
38− pkgconfig
39− ];
40−
41− buildInputs = [
42− curl
43− boost
44− protobuf
45− libusb1
46− libmicrohttpd
47− jsoncpp
48− ];
49−
50− preConfigure = ''
51− ( cd src/config
52− ln -s $common/protob/config.proto
53− protoc -I . --cpp_out=. config.proto
54− )
55− '';
56−
57− LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ curl ]}";
58− cmakeFlags = [ "-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'" ];
59−
60− installPhase = ''
61− mkdir -p $out/bin
62− cp trezord $out/bin
63− '';
6426}
65−
pkgs/servers/trezord/dynamic-link.patchdeleted−18
@@ -1,18 +0,0 @@
1−diff --git a/CMakeLists.txt b/CMakeLists.txt
2−index 7c0e2cf..0e3f4ac 100644
3−--- a/CMakeLists.txt
4−+++ b/CMakeLists.txt
5−@@ -59,13 +59,6 @@ target_link_libraries(trezord ${OS_LIBRARIES})
6− find_package(CURL REQUIRED)
7− find_package(libmicrohttpd REQUIRED)
8−
9−-# add static libs
10−-if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
11−- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
12−- set(BUILD_SHARED_LIBS off)
13−- set(Boost_USE_STATIC_LIBS on)
14−- set(CMAKE_FIND_STATIC FIRST)
15−-endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
16− find_package(Boost 1.53.0 REQUIRED
17− regex thread system unit_test_framework program_options chrono)
18− find_package(Protobuf 2.5.0 REQUIRED)