Skip to content

Commit

Permalink
electrs: enable unstable build, pin pkg to unstable
Browse files Browse the repository at this point in the history
stable's buildRustPackage is painfully slow when evaluating (adds >1 sec
even on a fast machine).

This is fixed (NixOS/nixpkgs#69274) in unstable.
  • Loading branch information
erikarvstedt committed Feb 29, 2020
1 parent 8e1d255 commit 3ec79e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/electrs/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, rustPlatform, clang, llvmPackages, fetchFromGitHub }:
{ lib, rustPlatform, clang, llvmPackages, fetchFromGitHub, pkgs }:
rustPlatform.buildRustPackage rec {
pname = "electrs";
version = "0.8.3";
Expand All @@ -14,7 +14,12 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ clang ];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";

cargoSha256 = "19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi";
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";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/pinned.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
let
nixpkgsPinned = import ./nixpkgs-pinned.nix;
unstable = import nixpkgsPinned.nixpkgs-unstable { config = {}; overlays = []; };
nixBitcoinPkgsUnstable = import ./. { pkgs = unstable; };
in
{
bitcoin = unstable.bitcoin.override { miniupnpc = null; };
bitcoind = unstable.bitcoind.override { miniupnpc = null; };
inherit (unstable)
clightning
lnd;
inherit (nixBitcoinPkgsUnstable) electrs;
}

0 comments on commit 3ec79e1

Please sign in to comment.