From 7ae0a387018f3fdd9fc5dc9c13aa2186b46f592e Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 4 May 2021 13:15:13 +0200 Subject: [PATCH] electrs: replace local version with nixpkgs --- pkgs/default.nix | 1 - pkgs/electrs/default.nix | 24 ------------------------ pkgs/electrs/get-sha256.sh | 24 ------------------------ pkgs/pinned.nix | 1 + test/pkgs-unstable.nix | 1 - 5 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 pkgs/electrs/default.nix delete mode 100755 pkgs/electrs/get-sha256.sh diff --git a/pkgs/default.nix b/pkgs/default.nix index b2556a5..17867b1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,6 @@ { pkgs ? import {} }: let self = { spark-wallet = pkgs.callPackage ./spark-wallet { }; - electrs = pkgs.callPackage ./electrs { }; elementsd = pkgs.callPackage ./elementsd { withGui = false; }; liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { }; joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; }; diff --git a/pkgs/electrs/default.nix b/pkgs/electrs/default.nix deleted file mode 100644 index 9f17e15..0000000 --- a/pkgs/electrs/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, rustPlatform, llvmPackages, fetchurl, pkgs }: -rustPlatform.buildRustPackage rec { - pname = "electrs"; - version = "0.8.9"; - - src = fetchurl { - url = "https://github.com/romanz/electrs/archive/v${version}.tar.gz"; - # Use ./get-sha256.sh to fetch latest (verified) sha256 - sha256 = "e28367127bca9d5444b1061ba7cbf2636788b1db80977da05cd7ba2182dde2ca"; - }; - - # Needed for librocksdb-sys - nativeBuildInputs = [ llvmPackages.clang ]; - LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; - - cargoSha256 = "07bh5mdmi70gy8bmwjzw87d4kc12d5aciiq3slgc07fvhc7nrlmx"; - - meta = with lib; { - description = "An efficient Electrum Server in Rust"; - homepage = "https://github.com/romanz/electrs"; - license = licenses.mit; - maintainers = with maintainers; [ earvstedt ]; - }; -} diff --git a/pkgs/electrs/get-sha256.sh b/pkgs/electrs/get-sha256.sh deleted file mode 100755 index bdeed00..0000000 --- a/pkgs/electrs/get-sha256.sh +++ /dev/null @@ -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/romanz/electrs 2> /dev/null -cd electrs -latest=$(git describe --tags `git rev-list --tags --max-count=1`) -echo "Latest release is ${latest}" - -# GPG verification -export GNUPGHOME=$TMPDIR -echo "Fetching Roman Zeyde's Key" -gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 15c8c3574ae4f1e25f3f35c587cae5fa46917cbb 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=electrs-"${latest//v}"/ ${latest} | sha256sum | cut -d\ -f1)" diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index 9284fce..de489b6 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -14,6 +14,7 @@ in lndconnect nbxplorer btcpayserver + electrs hwi; stable = nixBitcoinPkgsStable; diff --git a/test/pkgs-unstable.nix b/test/pkgs-unstable.nix index fed037c..ebd249b 100644 --- a/test/pkgs-unstable.nix +++ b/test/pkgs-unstable.nix @@ -3,7 +3,6 @@ let pkgs = import pinned.nixpkgs-unstable {}; nbPkgs = import ../pkgs { inherit pkgs; }; pkgsUnstable = with nbPkgs; [ - electrs joinmarket lightning-loop lightning-pool