hwi: replace local version with upstream

This commit is contained in:
nixbitcoin 2021-04-23 10:46:17 +00:00
parent 757e0cfe22
commit a71f69cb3a
No known key found for this signature in database
GPG Key ID: B6044ECBA2DAE5D0
7 changed files with 2 additions and 120 deletions

View File

@ -3,7 +3,6 @@ let self = {
spark-wallet = pkgs.callPackage ./spark-wallet { };
electrs = pkgs.callPackage ./electrs { };
elementsd = pkgs.callPackage ./elementsd { withGui = false; };
hwi = pkgs.callPackage ./hwi { };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; };
generate-secrets = pkgs.callPackage ./generate-secrets { };

View File

@ -1,36 +0,0 @@
{ lib, pkgs, stdenv, fetchurl, fetchFromGitHub, python3 }:
let
python = python3.override {
packageOverrides = self: super: {
# HWI requires mnemonic <0.19 but nixpkgs has a newer version
mnemonic = self.callPackage ./mnemonic {};
# HWI requires ecdsa <0.14 but nixpkgs has a newer version
ecdsa = self.callPackage ./ecdsa {};
# HWI requires hidapi 0.7.99 but nixpkgs has a newer version
hidapi = self.callPackage ./hidapi {
inherit (pkgs) udev libusb1;
};
};
};
in
python.pkgs.buildPythonPackage rec {
pname = "hwi";
version = "1.1.2";
src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "HWI";
rev = version;
sha256 = "01xjkv74ksj8m0l6frk03wq82ilzp5gkz4rf7lhi1h6qkb9kb1x0";
};
# TODO: enable tests
doCheck = false;
propagatedBuildInputs = with python.pkgs; [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
meta = with lib; {
homepage = https://github.com/bitcoin-core/hwi;
};
}

View File

@ -1,29 +0,0 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pkgs
, six
}:
buildPythonPackage rec {
pname = "ecdsa";
version = "0.13.3";
src = fetchPypi {
inherit pname version;
sha256 = "163c80b064a763ea733870feb96f9dd9b92216cfcacd374837af18e4e8ec3d4d";
};
propagatedBuildInputs = [ six ];
# Only needed for tests
checkInputs = [ pkgs.openssl ];
meta = with lib; {
description = "ECDSA cryptographic signature library";
homepage = "https://github.com/warner/python-ecdsa";
license = licenses.mit;
maintainers = with maintainers; [ aszlig ];
};
}

View File

@ -1,32 +0,0 @@
{ lib, stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }:
buildPythonPackage rec {
pname = "hidapi";
version = "0.7.99.post21";
src = fetchPypi {
inherit pname version;
sha256 = "e0be1aa6566979266a8fc845ab0e18613f4918cf2c977fe67050f5dc7e2a9a97";
};
propagatedBuildInputs =
lib.optionals stdenv.isLinux [ libusb1 udev ] ++
lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++
[ cython ];
# Fix the USB backend library lookup
postPatch = lib.optionalString stdenv.isLinux ''
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
'';
meta = with lib; {
description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi";
homepage = "https://github.com/trezor/cython-hidapi";
# license can actually be either bsd3 or gpl3
# see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt
license = licenses.bsd3;
maintainers = with maintainers; [ np ];
};
}

View File

@ -1,20 +0,0 @@
{ lib, fetchPypi, buildPythonPackage, pbkdf2 }:
buildPythonPackage rec {
pname = "mnemonic";
version = "0.18";
src = fetchPypi {
inherit pname version;
sha256 = "02a7306a792370f4a0c106c2cf1ce5a0c84b9dbd7e71c6792fdb9ad88a727f1d";
};
propagatedBuildInputs = [ pbkdf2 ];
meta = {
description = "Implementation of Bitcoin BIP-0039";
homepage = "https://github.com/trezor/python-mnemonic";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ np ];
};
}

View File

@ -13,7 +13,8 @@ in
lnd
lndconnect
nbxplorer
btcpayserver;
btcpayserver
hwi;
stable = nixBitcoinPkgsStable;
unstable = nixBitcoinPkgsUnstable;

View File

@ -4,7 +4,6 @@ let
nbPkgs = import ../pkgs { inherit pkgs; };
pkgsUnstable = with nbPkgs; [
electrs
hwi
joinmarket
lightning-loop
lightning-pool