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.black: init at 18.4a0 #38386
Conversation
buildPythonPackage rec { | ||
pname = "black"; | ||
version = "18.4a0"; | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using buildPythonPackage
the name
attribute defaults to name = "${pname}-${version}";
so this line can be omitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, black
doesn't provide a python module. In that case, it must be moved to e.g. pkgs/development/tools/black
and called from all-packages.nix
.
propagatedBuildInputs = [ attrs click ]; | ||
|
||
meta = with stdenv.lib; { | ||
description = "The uncompromising Python code formatter."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
meta = with stdenv.lib; { | ||
description = "The uncompromising Python code formatter."; | ||
homepage = "https://github.com/ambv/black"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no quotes
@dotlambda made the changes for meta attributes. It can also be used as a python module, for instance here https://github.com/ambv/black/blob/master/vim/plugin/black.vim#L77 |
@GrahamcOfBorg build python3.pkgs.black |
Success on x86_64-linux (full log) Attempted: python3.pkgs.black Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python3.pkgs.black Partial log (click to expand)
|
Motivation for this change
Add python code formatter
black
: https://github.com/ambv/black.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)