Skip to content

pythonPackages.cryptop: init at 0.1.0 #27778

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

Merged
merged 1 commit into from
Jul 30, 2017

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Jul 30, 2017

This commit adds the python application cryptop, which is a small curses
application for viewing cryptocurrency portfolio values.

Motivation for this change

New application.

Things done

Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@bhipple bhipple requested a review from FRidh as a code owner July 30, 2017 19:07
Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Python applications do not belong in python-packages.nix. Please move the expression out of python-modules and call it from all-packages.nix instead. Otherwise, this looks good.

@bhipple
Copy link
Contributor Author

bhipple commented Jul 30, 2017

Thanks Fridh! I saw that comment In the python contributing guide, but wasn't sure where to put it instead of python-packages.nix.

I'm also struggling a little to test this. The nox command seems to be dying after trying to build some unrelated Haskell packages in my personal config.nix (that build on their own), and I can't seem to figure out how to get this thing to build in nix-repl. Somehow I did get it to build and put it in my path, and it works for Python 2.7, but I suspect it's busted for Python 3. Is there some set of commands I should be running along the lines of:

nix-shell '<src>' -p "python27Packages.crypto"

@bhipple bhipple force-pushed the feature/python-cryptop-init branch from d63cfbb to 9c95417 Compare July 30, 2017 19:40
@bhipple
Copy link
Contributor Author

bhipple commented Jul 30, 2017

Hmm I seem to have busted it. I'll keep trying to figure it out; is there a good representative Python application I should study for reference? Most of the ones I'm looking at (youtube-dl, yapf, isort, flake8, etc.) seem to be in python-packages.nix.

@FRidh FRidh self-assigned this Jul 30, 2017
This commit adds the python application cryptop, which is a small curses
application for viewing cryptocurrency portfolio values.
@FRidh FRidh force-pushed the feature/python-cryptop-init branch from 5dbbe61 to 031d627 Compare July 30, 2017 20:42
@FRidh
Copy link
Member

FRidh commented Jul 30, 2017

@bhipple good that you gave it a try. Unfortunately you've seen some bad examples so I've forced push the necessary changes instead.

@FRidh FRidh merged commit 38e81ea into NixOS:master Jul 30, 2017
@bhipple
Copy link
Contributor Author

bhipple commented Jul 30, 2017

Do you know how I could test this with nix-shell? These seem to work:

$ nix-build -A cryptop
/nix/store/pr3xcl3dy6nzrnw92m4h2yfbv5j041r1-cryptop-0.1.0
$ nix-repl '<src>' 
> :b cryptop
  out -> /nix/store/pr3xcl3dy6nzrnw92m4h2yfbv5j041r1-cryptop-0.1.0

but this one complains about undefined cryptop string:

$ nix-shell --pure '<src>' -p "cryptop"
error: undefined variable 'cryptop' at (string):1:74

Any hints?

@bhipple
Copy link
Contributor Author

bhipple commented Jul 30, 2017

Thanks for the help Fridh. Now I can study your fix as the "canonical" example 👍

@bhipple
Copy link
Contributor Author

bhipple commented Jul 30, 2017

Answer to the above question in case someone looks at it, courtesy of clever in IRC:

$ nix-shell -E 'with import <src>{}; stdenv.mkDerivation { name="dummy"; buildInputs = [ cryptop ]; }'

@bhipple bhipple deleted the feature/python-cryptop-init branch November 28, 2017 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants