Files
nixpkgs/pkgs/development/python-modules/ledgerwallet/default.nix
T
Michael Daniels 075e8c2c4f treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

73 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
cryptography,
click,
construct,
ecdsa,
hidapi,
intelhex,
pillow,
protobuf,
requests,
setuptools,
setuptools-scm,
tabulate,
toml,
}:
buildPythonPackage rec {
pname = "ledgerwallet";
version = "0.5.3";
pyproject = true;
src = fetchFromGitHub {
owner = "LedgerHQ";
repo = "ledgerctl";
rev = "v${version}";
hash = "sha256-roDfj+igDBS+sTJL4hwYNg5vZzaq+F8QvDA9NucnrMA=";
};
buildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
cryptography
click
construct
ecdsa
hidapi
intelhex
pillow
protobuf
requests
tabulate
toml
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"protobuf >=3.20,<4"' '"protobuf >=3.20"'
'';
# Regenerate protobuf bindings to lift the version upper-bound and enable
# compatibility the current default protobuf library.
preBuild = ''
protoc --python_out=. --pyi_out=. ledgerwallet/proto/*.proto
'';
pythonImportsCheck = [ "ledgerwallet" ];
meta = {
homepage = "https://github.com/LedgerHQ/ledgerctl";
description = "Library to control Ledger devices";
mainProgram = "ledgerctl";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
erdnaxe
];
};
}