Files
nixpkgs/pkgs/development/python-modules/btchip-python/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

44 lines
860 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
hidapi,
pyscard,
ecdsa,
}:
buildPythonPackage rec {
pname = "btchip-python";
version = "0.1.32";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-NPXgwWHAj2XcDQcLov9MMV7SHEt+D6oypGhi0Nwbj1U=";
};
postPatch = ''
# fix extra_requires validation
substituteInPlace setup.py \
--replace "python-pyscard>=1.6.12-4build1" "python-pyscard>=1.6.12"
'';
propagatedBuildInputs = [
hidapi
ecdsa
];
optional-dependencies.smartcard = [ pyscard ];
# tests requires hardware
doCheck = false;
pythonImportsCheck = [ "btchip.btchip" ];
meta = {
description = "Python communication library for Ledger Hardware Wallet products";
homepage = "https://github.com/LedgerHQ/btchip-python";
license = lib.licenses.asl20;
};
}