mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
add asmap-data package and bitcoind module option
This commit is contained in:
parent
c0994bfc7b
commit
ade602f995
@ -254,6 +254,11 @@ let
|
||||
example = "bech32";
|
||||
description = "The type of addresses to use";
|
||||
};
|
||||
fetchASmap = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = "Fetch the latest ASmap from the github:asmap/asmap-data repository.";
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "bitcoin";
|
||||
@ -337,6 +342,9 @@ let
|
||||
${optionalString (cfg.zmqpubrawblock != null) "zmqpubrawblock=${cfg.zmqpubrawblock}"}
|
||||
${optionalString (cfg.zmqpubrawtx != null) "zmqpubrawtx=${cfg.zmqpubrawtx}"}
|
||||
|
||||
# ASmap option
|
||||
${optionalString (cfg.fetchASmap != null) "asmap=${pkgs.asmap-data}"}
|
||||
|
||||
# Extra options
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
23
pkgs/asmap-data.nix
Normal file
23
pkgs/asmap-data.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ stdenv, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "asmap-data";
|
||||
version = "dcce69e48211facdbd52a461cfce333d5800b7de";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "asmap";
|
||||
repo = "asmap-data";
|
||||
rev = version;
|
||||
sha256 = "sha256-bp93VZX6EF6vwpbA4jqAje/1txfKeqN9BhVRLkdM+94=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r $src/latest_asmap.dat $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Contains an asmap file from the ASMap Data Demo Repository";
|
||||
homepage = "https://github.com/asmap/asmap-data";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user