Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 fetchpatch, 6}: 7 8buildGoModule rec { 9 pname = "dcrd"; 10 version = "1.8.1"; 11 12 src = fetchFromGitHub { 13 owner = "decred"; 14 repo = "dcrd"; 15 tag = "release-v${version}"; 16 hash = "sha256-nSocqwXgJhvfbdElddbb1gGxoygmtVtK6DbiSuMxYew="; 17 }; 18 19 patches = [ 20 (fetchpatch { 21 name = "dcrd-appdata-env-variable.patch"; 22 url = "https://github.com/decred/dcrd/pull/3152/commits/216132d7d852f3f2e2a6bf7f739f47ed62ac9387.patch"; 23 hash = "sha256-R1GzP0qVP5XW1GnSJqFOpJVnwrVi/62tL1L2mc33+Dw="; 24 }) 25 ]; 26 27 vendorHash = "sha256-Napcfj1+KjQ21Jb/qpIzg2W/grzun2Pz5FV5yIBXoTo="; 28 29 subPackages = [ 30 "." 31 "cmd/promptsecret" 32 ]; 33 34 __darwinAllowLocalNetworking = true; 35 36 preCheck = '' 37 export DCRD_APPDATA="$TMPDIR" 38 ''; 39 40 meta = { 41 homepage = "https://decred.org"; 42 description = "Decred daemon in Go (golang)"; 43 license = with lib.licenses; [ isc ]; 44 maintainers = with lib.maintainers; [ juaningan ]; 45 }; 46}