elementsd: replace local version with nixpkgs
This commit is contained in:
parent
676a4beb81
commit
2f4d7b866c
@ -1,7 +1,6 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let self = {
|
||||
spark-wallet = pkgs.callPackage ./spark-wallet { };
|
||||
elementsd = pkgs.callPackage ./elementsd { withGui = false; };
|
||||
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
|
||||
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; };
|
||||
generate-secrets = pkgs.callPackage ./generate-secrets { };
|
||||
|
@ -1,60 +0,0 @@
|
||||
{ lib, stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck
|
||||
, zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, protobuf, python3, qrencode, libevent
|
||||
, withGui }:
|
||||
|
||||
with lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elements${optionalString (!withGui) "d"}";
|
||||
version = "0.18.1.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ElementsProject/elements/archive/elements-${version}.tar.gz";
|
||||
# Use ./get-sha256.sh to fetch latest (verified) sha256
|
||||
sha256 = "84a51013596b09c62913649ac90373622185f779446ee7e65b4b258a2876609f";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkgconfig autoreconfHook ]
|
||||
++ optional withGui wrapQtAppsHook;
|
||||
|
||||
buildInputs = [ openssl db48 boost zlib zeromq
|
||||
miniupnpc protobuf libevent]
|
||||
++ optionals stdenv.isLinux [ utillinux ]
|
||||
++ optionals withGui [ qtbase qttools qrencode ];
|
||||
|
||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib"
|
||||
"--disable-bench"
|
||||
] ++ optionals (!doCheck) [
|
||||
"--disable-tests"
|
||||
"--disable-gui-tests"
|
||||
] ++ optionals withGui [
|
||||
"--with-gui=qt5"
|
||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||
];
|
||||
|
||||
checkInputs = [ rapidcheck python3 ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkFlags =
|
||||
[ "LC_ALL=C.UTF-8" ]
|
||||
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
||||
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
||||
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
|
||||
longDescription= ''
|
||||
The Elements blockchain platform is a collection of feature experiments and extensions to the
|
||||
Bitcoin protocol. This platform enables anyone to build their own businesses or networks
|
||||
pegged to Bitcoin as a sidechain or run as a standalone blockchain with arbitrary asset
|
||||
tokens.
|
||||
'';
|
||||
homepage = http://www.github.com/ElementsProject/elements;
|
||||
license = licenses.mit;
|
||||
# elements needs hexdump to build, which doesn't seem to build on darwin at the moment.
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p git gnupg
|
||||
set -euo pipefail
|
||||
|
||||
TMPDIR="$(mktemp -d -p /tmp)"
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
cd $TMPDIR
|
||||
|
||||
echo "Fetching latest release"
|
||||
git clone https://github.com/elementsproject/elements 2> /dev/null
|
||||
cd elements
|
||||
latest=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
echo "Latest release is ${latest}"
|
||||
|
||||
# GPG verification
|
||||
export GNUPGHOME=$TMPDIR
|
||||
echo "Fetching Steven Roose's Key"
|
||||
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys DE10E82629A8CAD55B700B972F2A88D7F8D68E87 2> /dev/null
|
||||
echo "Verifying latest release"
|
||||
git verify-tag ${latest}
|
||||
|
||||
echo "tag: ${latest}"
|
||||
# The prefix option is necessary because GitHub prefixes the archive contents in this format
|
||||
echo "sha256: $(git archive --format tar.gz --prefix=elements-${latest}/ ${latest} | sha256sum | cut -d\ -f1)"
|
@ -12,7 +12,7 @@ in
|
||||
sha256 = "05v28njaas9l26ibc6vy6imvy7grbkli32bmv0n32x6x9cf68gf9";
|
||||
};
|
||||
nixpkgs-unstable = fetch {
|
||||
rev = "036dc0c709650e0c833822307af801f576d67273";
|
||||
sha256 = "0pnrygs6xf7id63zi17pq5379hfppwbb5cfazhypcqz6l3dfk00g";
|
||||
rev = "88e010dcb29ecf70a973c8d57ed175eadf7f42cf";
|
||||
sha256 = "0v6g32yw3cx2qg76idkccayap6lvnhkgnw70isy4vbjd88injmpv";
|
||||
};
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ in
|
||||
nbxplorer
|
||||
btcpayserver
|
||||
electrs
|
||||
elementsd
|
||||
hwi
|
||||
lightning-loop
|
||||
lightning-pool;
|
||||
|
@ -4,12 +4,6 @@ let
|
||||
nbPkgs = import ../pkgs { inherit pkgs; };
|
||||
pkgsUnstable = with nbPkgs; [
|
||||
joinmarket
|
||||
|
||||
## elementsd fails with error
|
||||
# test/key_properties.cpp:16:10: fatal error: rapidcheck/boost_test.h: No such file or directory
|
||||
# 16 | #include <rapidcheck/boost_test.h>
|
||||
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# elementsd
|
||||
];
|
||||
in
|
||||
pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable)
|
||||
|
Loading…
Reference in New Issue
Block a user