nixpkgs-suyu/pkgs/applications/blockchains/electrs/default.nix
Erik Arvstedt 2e13a9cc6d
electrs: fix missing metrics feature
With electrs 0.9.0, option `--no-default-features` disables the `metrics`
feature, which brakes electrs option `--monitoring-addr`.

Fix this by removing `--no-default-features`, which is no longer needed
for dynamic linking in 0.9.0.
2021-09-30 14:31:28 +02:00

39 lines
948 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, llvmPackages
, rocksdb
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "electrs";
version = "0.9.0";
src = fetchFromGitHub {
owner = "romanz";
repo = pname;
rev = "v${version}";
sha256 = "04dqbn2nfzllxfcn3v9vkfy2hn2syihijr575621r1pj65pcgf8y";
};
cargoSha256 = "0hl8q62lankrab8gq9vxmkn68drs0hw5pk0q6aiq8fxsb63dzsw0";
# needed for librocksdb-sys
nativeBuildInputs = [ llvmPackages.clang ];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
# link rocksdb dynamically
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
description = "An efficient re-implementation of Electrum Server in Rust";
homepage = "https://github.com/romanz/electrs";
license = licenses.mit;
maintainers = with maintainers; [ prusnak ];
};
}