1acb22a872
move script to pkg dir, add hint to script in pkg def remove unneeded script deps add extended bash error checking rename DIR -> TMPDIR remove TMPDIR on exit strip whitespace, simplify comments gpg2 -> gpg latesttagelectrs -> latest tmpdir: don't use XDG_RUNTIME_DIR XDG_RUNTIME_DIR is often in RAM and shouldn't be used for larger workloads like repo downlaods verify fingerprint of the imported key remove trailing '-' in output simplify output Hide --fetch-key output Output is not relevant to user, looks better without it More accurately describe ./get-sha256 function User might think that ./get-sha256 automatically updates sha256 in default.nix Fetch key from sks keyservers instead of keybase.io Using --recv-key simplifies getting the right key, and only the right key, greatly. I try to refrain from using sks keyservers, but the certificate spamming attack shouldn't be an issue in this case because we create a temporary keychain just for the verificaiton. remove unneeded cargoDepsHook Make clang nativeBuildInput instead of buildInput
30 lines
998 B
Nix
30 lines
998 B
Nix
{ lib, rustPlatform, llvmPackages, fetchurl, pkgs }:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "electrs";
|
|
version = "0.8.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/romanz/electrs/archive/v${version}.tar.gz";
|
|
# Use ./get-sha256.sh to fetch latest (verified) sha256
|
|
sha256 = "6a00226907a0c36b10884e7dd9f87eb58123f089977a752b917d166af072ea3d";
|
|
};
|
|
|
|
# Needed for librocksdb-sys
|
|
nativeBuildInputs = [ llvmPackages.clang ];
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
cargoSha256 = if pkgs ? cargo-vendor then
|
|
# nixpkgs ≤ 19.09
|
|
"19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi"
|
|
else
|
|
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
|
|
"1x88zj7p4i7pfb25ch1a54sawgimq16bfcsz1nmzycc8nbwbf493";
|
|
|
|
meta = with lib; {
|
|
description = "An efficient Electrum Server in Rust";
|
|
homepage = "https://github.com/romanz/electrs";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ earvstedt ];
|
|
};
|
|
}
|