Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.trezor_agent: fix startup error #71290

Merged
merged 1 commit into from Oct 18, 2019

Conversation

alanpearce
Copy link
Contributor

@alanpearce alanpearce commented Oct 17, 2019

Motivation for this change

python3Packages.trezor_agent fails on startup on 19.09 with

Traceback (most recent call last):
  File "/nix/store/nd21l71zzy2833bbab1rmikmwg29602p-python3.7-trezor_agent-0.10.0/bin/.trezor-agent-wrapped", line 7, in <module>
    from trezor_agent import ssh_agent
  File "/nix/store/nd21l71zzy2833bbab1rmikmwg29602p-python3.7-trezor_agent-0.10.0/bin/trezor_agent.py", line 1, in <module>
    import libagent.gpg
  File "/nix/store/hlzgj54s9pvn702qd4mzgv7h19yi3xh7-python3-3.7.4-env/lib/python3.7/site-packages/libagent/gpg/__init__.py", line 21, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @np @mmahut

, wheel
, pinentry
}:

buildPythonPackage rec{
buildPythonApplication rec{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this as buildPythonPackages while it's in the python-modules directory. If you wanted to do a top-level export, then you can just do toPythonApplication python3Packages.trezor_agent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, sure. I'll revert that part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix-review passes on NixOS (python38.cytoolz is broken on master)
diff LGTM
executable is fixed

[2 built (4 failed), 144 copied (342.9 MiB), 69.2 MiB DL]
error: build of '/nix/store/466m47fbkqcl76l9w1i2nlqfgggpw73x-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/71290
1 package failed to build:
python38Packages.trezor_agent

1 package were build:
python37Packages.trezor_agent
[nix-shell:~/.cache/nix-review/pr-71290]$ ./results/python37Packages.trezor_agent/bin/trezor-agent --help
usage: trezor-agent [-h] [-v] [--version] [-e CURVE] [--timeout TIMEOUT]
                    [--debug] [--log-file LOG_FILE] [--sock-path SOCK_PATH]
                    [--pin-entry-binary PIN_ENTRY_BINARY]
                    [--passphrase-entry-binary PASSPHRASE_ENTRY_BINARY]
                    [--cache-expiry-seconds CACHE_EXPIRY_SECONDS]
                    [-d | -f | -s | -c | --mosh]
                    identity [ARGUMENT [ARGUMENT ...]]
...

@jonringer jonringer merged commit 69889d3 into NixOS:master Oct 18, 2019
@alanpearce alanpearce deleted the fix-trezor-agent branch October 18, 2019 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants