2019-01-02 21:40:53 +00:00
|
|
|
let
|
2019-01-04 16:19:52 +00:00
|
|
|
overlay = builtins.fetchGit {
|
|
|
|
url = "https://github.com/mozilla/nixpkgs-mozilla";
|
|
|
|
ref = "master";
|
2019-02-25 16:00:50 +00:00
|
|
|
rev = "e37160aaf4de5c4968378e7ce6fe5212f4be239f";
|
2019-01-04 16:19:52 +00:00
|
|
|
};
|
|
|
|
defaultPkgs = import <nixpkgs> {overlays = [ (import overlay) ]; };
|
2019-02-25 16:00:50 +00:00
|
|
|
defaultRust = (defaultPkgs.rustChannelOf { date = "2019-03-05"; channel = "nightly"; }).rust;
|
|
|
|
defaultCargo = (defaultPkgs.rustChannelOf { date = "2019-03-05"; channel = "nightly"; }).cargo;
|
2019-01-04 16:19:52 +00:00
|
|
|
defaultBuildRustPackage = defaultPkgs.callPackage (import <nixpkgs/pkgs/build-support/rust>) {
|
2019-01-02 21:40:53 +00:00
|
|
|
rust = {
|
|
|
|
rustc = defaultRust;
|
|
|
|
cargo = defaultCargo;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in { pkgs ? defaultPkgs, rust ? defaultRust, buildRustPackage ? defaultBuildRustPackage }:
|
|
|
|
pkgs.lib.flip pkgs.callPackage { inherit buildRustPackage; } (
|
|
|
|
{ lib, buildRustPackage, fetchFromGitHub, llvmPackages, clang }:
|
|
|
|
|
|
|
|
let
|
2019-02-25 16:00:50 +00:00
|
|
|
version = "0.4.3";
|
2019-01-02 21:40:53 +00:00
|
|
|
|
|
|
|
in buildRustPackage {
|
|
|
|
name = "electrs-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romanz";
|
|
|
|
repo = "electrs";
|
2019-02-25 16:00:50 +00:00
|
|
|
rev = "5ab3b4648769bf4a421d48fb29c93ef048db7dbf";
|
|
|
|
sha256 = "1xjjs1j4wm8pv7h0gr7i8xi2j78ss3haai4hyaiavwph8kk5n0ch";
|
2019-01-02 21:40:53 +00:00
|
|
|
};
|
|
|
|
|
2019-02-25 16:00:50 +00:00
|
|
|
cargoSha256 = "0a80i77s3r4nivrrxndadzgxcpnyamrw7xqrrlz1ylwyjz00xcnf";
|
2019-01-02 21:40:53 +00:00
|
|
|
|
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
buildInputs = [ clang ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An efficient re-implementation of Electrum Server in Rust";
|
|
|
|
homepage = https://github.com/romanz/electrs;
|
|
|
|
maintainers = with maintainers; [ tailhook ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|