nixpkgs/pkgs/servers/trezord/default.nix

52 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
2017-02-08 17:18:22 +01:00
, libusb1, libmicrohttpd
}:
let
version = "1.2.1";
2017-02-08 17:18:22 +01:00
in
stdenv.mkDerivation rec {
name = "trezord-${version}";
src = fetchgit {
url = "https://github.com/trezor/trezord";
rev = "refs/tags/v${version}";
sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
2017-02-08 17:18:22 +01:00
};
meta = with stdenv.lib; {
description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
homepage = https://mytrezor.com;
license = licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ canndrew jb55 ];
platforms = platforms.linux;
};
patches = [ ./dynamic-link.patch ];
nativeBuildInputs = [
cmake
gcc
2017-02-08 17:18:22 +01:00
pkgconfig
];
buildInputs = [
curl
boost
protobuf
libusb1
libmicrohttpd
jsoncpp
];
LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ curl ]}";
cmakeFlags="-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'";
installPhase = ''
mkdir -p $out/bin
cp trezord $out/bin
'';
}