1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "btcd";
9 version = "0.24.2";
10
11 src = fetchFromGitHub {
12 owner = "btcsuite";
13 repo = "btcd";
14 rev = "v${version}";
15 hash = "sha256-83eiVYXpyiGgLmYxj3rFk4CHG7F9UQ3vk1ZHm64Cm4A=";
16 };
17
18 vendorHash = "sha256-ek+gaolwpwoEEWHKYpK2OxCpk/0vywF784J3CC0UCZ4=";
19
20 subPackages = [
21 "."
22 "cmd/*"
23 ];
24
25 preCheck = ''
26 DIR="github.com/btcsuite/btcd/"
27 # TestCreateDefaultConfigFile requires the sample-btcd.conf in $DIR
28 mkdir -p $DIR
29 cp sample-btcd.conf $DIR
30 '';
31
32 meta = {
33 description = "Alternative full node bitcoin implementation written in Go (golang)";
34 homepage = "https://github.com/btcsuite/btcd";
35 changelog = "https://github.com/btcsuite/btcd/releases/tag/v${version}";
36 license = lib.licenses.isc;
37 maintainers = with lib.maintainers; [ _0xB10C ];
38 };
39}