depot/third_party/nixpkgs/pkgs/applications/blockchains/electrs/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

43 lines
973 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, llvmPackages
, rocksdb_6_23
, Security
}:
let
rocksdb = rocksdb_6_23;
in
rustPlatform.buildRustPackage rec {
pname = "electrs";
version = "0.9.11";
src = fetchFromGitHub {
owner = "romanz";
repo = pname;
rev = "v${version}";
hash = "sha256-iudHdsSjoPal+ORMB3lU7ejGYv69q/8HcxScZS8D/u8=";
};
cargoHash = "sha256-Ft1AluPfV6BIRGEddrrIGNRmaZIzUsA2DN2TcghCnSQ=";
# needed for librocksdb-sys
nativeBuildInputs = [ rustPlatform.bindgenHook ];
# link rocksdb dynamically
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
passthru.updateScript = ./update.sh;
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 ];
};
}