2020-04-14 02:04:03 -07:00
|
|
|
{ lib, rustPlatform, llvmPackages, fetchurl, pkgs }:
|
2020-03-04 09:08:55 -08:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "electrs";
|
|
|
|
version = "0.8.3";
|
|
|
|
|
2020-04-14 02:04:03 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/romanz/electrs/archive/v${version}.tar.gz";
|
|
|
|
# Use ./get-sha256.sh to fetch latest (verified) sha256
|
|
|
|
sha256 = "6a00226907a0c36b10884e7dd9f87eb58123f089977a752b917d166af072ea3d";
|
2019-05-23 07:03:56 -07:00
|
|
|
};
|
|
|
|
|
2020-03-04 09:08:55 -08:00
|
|
|
# Needed for librocksdb-sys
|
2020-04-14 02:04:03 -07:00
|
|
|
nativeBuildInputs = [ llvmPackages.clang ];
|
2020-03-04 09:08:55 -08:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
2019-05-23 07:03:56 -07:00
|
|
|
|
2020-03-04 09:08:56 -08:00
|
|
|
cargoSha256 = if pkgs ? cargo-vendor then
|
|
|
|
# nixpkgs ≤ 19.09
|
|
|
|
"19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi"
|
|
|
|
else
|
|
|
|
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
|
|
|
|
"1x88zj7p4i7pfb25ch1a54sawgimq16bfcsz1nmzycc8nbwbf493";
|
2019-05-23 07:03:56 -07:00
|
|
|
|
2020-03-04 09:08:55 -08:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An efficient Electrum Server in Rust";
|
|
|
|
homepage = "https://github.com/romanz/electrs";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ earvstedt ];
|
2019-05-23 07:03:56 -07:00
|
|
|
};
|
|
|
|
}
|