Hi, Attila Lendvai schreef op di 07-09-2021 om 18:52 [+0000]: > pardon me for reviving a years old discussion, but i'm facing the same problem once again. > > i have updated trezor support, and i wanted to test generating a new gpg key: > > $ trezor-gpg init "foobar " > > leading to: OSError: Cannot find '.trezor-gpg-gpg-agent' in $PATH > > upstream relies on sys.argv[0] in a non-trivial way: > > https://github.com/romanz/trezor-agent/blob/338a075ed500f210a707cb3adf90104602e35c48/libagent/gpg/__init__.py#L124 You could patch trezor-agent with something like # Python syntax might be incorrect if sys.argv[0] == ".trezor-gpg' sys.argv[0] = "trezor-gpg" device_name = os.path.basename(sys.argv[0]).rsplit('-',1)[0] Would that work? > is there any chance to revive this effort? > > original discussion: https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00017.html > > shall i open an issue? for this specific problem, or the wider situation discussed in the mailing list thread? FWIW, there's 'wrap-program' and there is 'wrap-script'. wrap-script is less likely to cause errors here (it doesn't rename the executable) but less general. Maybe wrap-script can be used instead of wrap-program? Greetings, Maime