2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-03-09 03:18:52 +00:00
|
|
|
, stdenv
|
2020-11-12 09:05:59 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, trezor-udev-rules
|
2021-03-09 03:18:52 +00:00
|
|
|
, AppKit
|
2020-11-12 09:05:59 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "trezord-go";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.0.33";
|
|
|
|
commit = "2680d5e";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-03-12 07:09:13 +00:00
|
|
|
owner = "trezor";
|
|
|
|
repo = "trezord-go";
|
|
|
|
rev = "v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
fetchSubmodules = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-3I6NOzDMhzRyVSOURl7TjJ1Z0P0RcKrSs5rNaZ0Ho9M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
vendorSha256 = "sha256-wXgAmZEXdM4FcMCQbAs+ydXshCAMu7nl/yVv/3sqaXE=";
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isLinux [ trezor-udev-rules ]
|
2021-03-12 07:09:13 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X main.githash=${commit}"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-29 15:07:52 +00:00
|
|
|
description = "Trezor Communication Daemon aka Trezor Bridge";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://trezor.io";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2020-08-20 17:08:02 +00:00
|
|
|
maintainers = with maintainers; [ canndrew jb55 prusnak mmahut _1000101 ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "trezord-go";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|