HWI: allow building with unstable nixpkgs
This commit is contained in:
parent
199b9bf315
commit
b7047c7286
@ -21,6 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
- TestModules=1 STABLE=1
|
- TestModules=1 STABLE=1
|
||||||
- PKG=hwi STABLE=1
|
- PKG=hwi STABLE=1
|
||||||
|
- PKG=hwi STABLE=0
|
||||||
- PKG=lightning-charge STABLE=1
|
- PKG=lightning-charge STABLE=1
|
||||||
- PKG=lightning-charge STABLE=0
|
- PKG=lightning-charge STABLE=0
|
||||||
- PKG=nanopos STABLE=1
|
- PKG=nanopos STABLE=1
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, python3 }:
|
{ stdenv, fetchurl, fetchFromGitHub, python3 }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
with python3.pkgs;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
buildInputs = [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
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 {};
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
buildPythonPackage rec {
|
python.pkgs.buildPythonPackage rec {
|
||||||
pname = "hwi";
|
pname = "hwi";
|
||||||
version = "1.0.3";
|
version = "1.0.3";
|
||||||
|
|
||||||
@ -20,8 +26,7 @@ buildPythonPackage rec {
|
|||||||
# TODO: enable tests
|
# TODO: enable tests
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
inherit buildInputs;
|
propagatedBuildInputs = with python.pkgs; [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
||||||
propagatedBuildInputs = buildInputs;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/bitcoin-core/hwi;
|
homepage = https://github.com/bitcoin-core/hwi;
|
||||||
|
28
pkgs/hwi/ecdsa/default.nix
Normal file
28
pkgs/hwi/ecdsa/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ 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 stdenv.lib; {
|
||||||
|
description = "ECDSA cryptographic signature library";
|
||||||
|
homepage = "https://github.com/warner/python-ecdsa";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ aszlig ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
20
pkgs/hwi/mnemonic/default.nix
Normal file
20
pkgs/hwi/mnemonic/default.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ 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 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user