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";
|
2020-07-07 03:35:57 -07:00
|
|
|
version = "0.8.5";
|
2020-03-04 09:08:55 -08:00
|
|
|
|
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
|
2020-07-07 03:35:57 -07:00
|
|
|
sha256 = "651663f68ead632d806980c1915e4b963dcccfbb674c794a7c5d9b7cc4dfecbf";
|
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-05-02 09:07:21 -07:00
|
|
|
cargoSha256 = if builtins.pathExists "${pkgs.path}/pkgs/build-support/rust/fetchcargo.nix" then
|
|
|
|
# nixpkgs ≤ 20.03
|
2020-07-07 03:35:57 -07:00
|
|
|
"0clxam7i5yxiqsqxwzdq6z7j7c82rj5zyk186vhvzwh6hzfrv7zm"
|
2020-03-04 09:08:56 -08:00
|
|
|
else
|
|
|
|
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
|
2020-07-07 03:35:57 -07:00
|
|
|
"0kpv2y22wi42ymcwbqr1cw6npb0ca11hi3dhhhdj1al8kzdgi70w";
|
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
|
|
|
};
|
|
|
|
}
|