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
Add pre-commit and its dependencies #49163
Conversation
pre-commit is "a framework for managing and maintaining multi-language pre-commit hooks". More info here: https://pre-commit.com
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.
Please split up these changes into multiple commits.
Precisely like:
- add yourself to the maintainers list
maintainers: add name
- one each for package initialization
pkg-name: init at version
Also preferably with its dependents preceding pre-commit.
More can be seen in CONTRIBUTING.md
buildPythonPackage rec { | ||
pname = "importlib_metadata"; | ||
version = "0.6"; | ||
name = "importlib_metadata"; |
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.
drop this line
sha256 = "074v6mq5dbbr0y697fgajm503sg83faxzvwz41jxy6h0z622rc1n"; | ||
}; | ||
|
||
pythonPath = [ recursivePthLoader ]; |
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.
Why is this needed? Why don't you use propagatedBuildInputs
or nativeBuildInputs
?
|
||
pythonPath = [ recursivePthLoader ]; | ||
|
||
doCheck = false; |
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.
Why? Add a comment.
pythonPath = [ recursivePthLoader ]; | ||
|
||
doCheck = false; | ||
propagatedBuildInputs = [ ]; |
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.
remove
buildPythonPackage rec { | ||
pname = "importlib_resources"; | ||
version = "1.0.1"; | ||
name = "importlib_resources"; |
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.
remove
''; | ||
|
||
meta = { | ||
description = "A framework for managing and maintaining multi-language pre-commit hooks."; |
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.
importlib-metadata = callPackage ../development/python-modules/importlib-metadata { }; | ||
importlib-resources = callPackage ../development/python-modules/importlib-resources { }; | ||
setuptools-markdown = callPackage ../development/python-modules/setuptools-markdown { }; | ||
pre-commit = callPackage ../development/python-modules/pre-commit { }; |
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.
This file should be sorted alphabetically.
|
||
propagatedBuildInputs = [ pypandoc ]; | ||
pythonPath = [ recursivePthLoader ]; | ||
doCheck = false; |
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.
same as above
buildPythonPackage rec { | ||
pname = "setuptools-markdown"; | ||
version = "0.2"; | ||
name = "setuptools_markdown"; |
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.
drop this line
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "setuptools-markdown"; |
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.
Are you sure that this works? Pypandoc is broken.
I only found out after reviewing that this package already exists: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/git-and-tools/pre-commit/default.nix |
pre-commit is "a framework for managing and maintaining multi-language
pre-commit hooks". More info here: https://pre-commit.com
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)