Skip to content

Commit

Permalink
add esplora pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
jkitman committed Feb 27, 2023
1 parent 9e56d6e commit 61ccef8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7060,6 +7060,12 @@
githubId = 1204734;
name = "Emil Karlson";
};
jkitman = {
email = "[email protected]";
github = "jkitman";
githubId = 104733614;
name = "Josh Kitman";
};
jlamur = {
email = "[email protected]";
github = "jlamur";
Expand Down
47 changes: 47 additions & 0 deletions pkgs/applications/blockchains/esplora/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, llvmPackages
, rocksdb_6_23
, Security
}:

let
rocksdb = rocksdb_6_23;
in
rustPlatform.buildRustPackage rec {
pname = "esplora";
# last tagged versoin is far behind master
version = "20230218";

src = fetchFromGitHub {
owner = "Blockstream";
repo = "electrs";
rev = "adedee15f1fe460398a7045b292604df2161adc0";
hash = "sha256-KnN5C7wFtDF10yxf+1dqIMUb8Q+UuCz4CMQrUFAChuA=";
};

cargoHash = "sha256-tM5IFiIYX2SlAp6Q5uccVjW6TgOf5MfoFrLXz3GlZ90=";

# 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 ];

# rename to avoid a name conflict with other electrs package
postInstall = ''
mv $out/bin/electrs $out/bin/esplora
'';

meta = with lib; {
description = "Blockstream's re-implementation of Electrum Server for Esplora";
homepage = "https://github.com/Blockstream/electrs";
license = licenses.mit;
maintainers = with maintainers; [ jkitman ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34698,6 +34698,10 @@ with pkgs;

erigon = callPackage ../applications/blockchains/erigon { };

esplora = callPackage ../applications/blockchains/esplora {
inherit (darwin.apple_sdk.frameworks) Security;
};

exodus = callPackage ../applications/blockchains/exodus { };

faraday = callPackage ../applications/blockchains/faraday { };
Expand Down

0 comments on commit 61ccef8

Please sign in to comment.