Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990{ lib, fetchFromGitHub, backports-shutil-which, bech32, buildPythonPackage, setuptools, cryptography, docutils, ecdsa, gnupg, pinentry-curses, semver, mnemonic, unidecode, mock, pytestCheckHook, configargparse, python-daemon, pymsgbox, pynacl, nix-update-script,}:
# When changing this package, please test packages {onlykey,trezor}-agent
buildPythonPackage (finalAttrs: { pname = "libagent"; version = "0.16.1"; pyproject = true;
src = fetchFromGitHub { owner = "romanz"; repo = "trezor-agent"; tag = "libagent/${finalAttrs.version}"; hash = "sha256-JFHBE2o5VSJaz5yeCiXmBchm4/1gA+dZ/PRt3+WENdA="; };
# hardcode the path to gpgconf and pinentry in the libagent library postPatch = '' substituteInPlace libagent/gpg/keyring.py \ --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" \ --replace "'gpg-connect-agent'" "'${gnupg}/bin/gpg-connect-agent'" \ --replace "get_gnupg_components(sp=sp)['pinentry']" "'${(lib.getExe pinentry-curses)}'" '';
build-system = [ setuptools ];
# https://github.com/romanz/trezor-agent/pull/481 pythonRemoveDeps = [ "backports.shutil-which" ];
dependencies = [ backports-shutil-which unidecode configargparse python-daemon pymsgbox ecdsa docutils mnemonic semver pynacl bech32 cryptography ];
pythonImportsCheck = [ "libagent" ];
nativeCheckInputs = [ mock pytestCheckHook ];
disabledTests = [ # test fails in sandbox "test_get_agent_sock_path" ];
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=libagent/(.*)" ]; };
meta = { description = "Using hardware wallets as SSH/GPG agent"; homepage = "https://github.com/romanz/trezor-agent"; license = lib.licenses.lgpl3Only; maintainers = with lib.maintainers; [ np ]; };})