Merge fort-nix/nix-bitcoin#370: elementsd: replace local version with nixpkgs

2f4d7b866c elementsd: replace local version with nixpkgs (Pavol Rusnak)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 2f4d7b866c
  nixbitcoin:
    ACK 2f4d7b866c

Tree-SHA512: 9abcb16ca21e6beb8bbe08096f072ff2eca5fded61708f4bab5628dd389f09107187027e3340ba45e47b2b0df005dba923c1e4b48ebfcdbee27efe40069a0391
This commit is contained in:
Jonas Nick 2021-07-19 11:21:59 +00:00
commit 4c6bc1c25f
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
6 changed files with 3 additions and 93 deletions

View File

@ -1,7 +1,6 @@
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
let self = { let self = {
spark-wallet = pkgs.callPackage ./spark-wallet { }; spark-wallet = pkgs.callPackage ./spark-wallet { };
elementsd = pkgs.callPackage ./elementsd { withGui = false; };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { }; liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; }; joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; };
generate-secrets = pkgs.callPackage ./generate-secrets { }; generate-secrets = pkgs.callPackage ./generate-secrets { };

View File

@ -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;
};
}

View File

@ -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)"

View File

@ -12,7 +12,7 @@ in
sha256 = "05v28njaas9l26ibc6vy6imvy7grbkli32bmv0n32x6x9cf68gf9"; sha256 = "05v28njaas9l26ibc6vy6imvy7grbkli32bmv0n32x6x9cf68gf9";
}; };
nixpkgs-unstable = fetch { nixpkgs-unstable = fetch {
rev = "036dc0c709650e0c833822307af801f576d67273"; rev = "88e010dcb29ecf70a973c8d57ed175eadf7f42cf";
sha256 = "0pnrygs6xf7id63zi17pq5379hfppwbb5cfazhypcqz6l3dfk00g"; sha256 = "0v6g32yw3cx2qg76idkccayap6lvnhkgnw70isy4vbjd88injmpv";
}; };
} }

View File

@ -16,6 +16,7 @@ in
nbxplorer nbxplorer
btcpayserver btcpayserver
electrs electrs
elementsd
hwi hwi
lightning-loop lightning-loop
lightning-pool; lightning-pool;

View File

@ -4,12 +4,6 @@ let
nbPkgs = import ../pkgs { inherit pkgs; }; nbPkgs = import ../pkgs { inherit pkgs; };
pkgsUnstable = with nbPkgs; [ pkgsUnstable = with nbPkgs; [
joinmarket 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 in
pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable) pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable)