nix-bitcoin/pkgs/electrs/default.nix

30 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, llvmPackages, fetchurl, pkgs }:
rustPlatform.buildRustPackage rec {
pname = "electrs";
2020-07-07 13:35:57 +03:00
version = "0.8.5";
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 13:35:57 +03:00
sha256 = "651663f68ead632d806980c1915e4b963dcccfbb674c794a7c5d9b7cc4dfecbf";
};
# Needed for librocksdb-sys
nativeBuildInputs = [ llvmPackages.clang ];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
2020-05-02 19:07:21 +03:00
cargoSha256 = if builtins.pathExists "${pkgs.path}/pkgs/build-support/rust/fetchcargo.nix" then
# nixpkgs ≤ 20.03
2020-07-07 13:35:57 +03:00
"0clxam7i5yxiqsqxwzdq6z7j7c82rj5zyk186vhvzwh6hzfrv7zm"
else
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
2020-07-07 13:35:57 +03:00
"0kpv2y22wi42ymcwbqr1cw6npb0ca11hi3dhhhdj1al8kzdgi70w";
meta = with lib; {
description = "An efficient Electrum Server in Rust";
homepage = "https://github.com/romanz/electrs";
license = licenses.mit;
maintainers = with maintainers; [ earvstedt ];
};
}