mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
python3Packages.pre-commit-hooks: init at 3.3.0
This commit is contained in:
parent
47d5dc7e51
commit
30c312db55
2 changed files with 45 additions and 0 deletions
43
pkgs/development/python-modules/pre-commit-hooks/default.nix
Normal file
43
pkgs/development/python-modules/pre-commit-hooks/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchPypi
|
||||||
|
, git
|
||||||
|
, isPy27
|
||||||
|
, lib
|
||||||
|
, pytestCheckHook
|
||||||
|
, ruamel_yaml
|
||||||
|
, toml
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pre-commit-hooks";
|
||||||
|
version = "3.3.0";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
|
# fetchPypi does not provide tests
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pre-commit";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1sppwcqsbr9gv2cpjslngcbggsxvdr84zgrin94yjr40jgkjzdpq";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ toml ruamel_yaml ];
|
||||||
|
checkInputs = [ git pytestCheckHook ];
|
||||||
|
|
||||||
|
# the tests require a functional git installation which requires a valid HOME
|
||||||
|
# directory.
|
||||||
|
preCheck = ''
|
||||||
|
export HOME="$(mktemp -d)"
|
||||||
|
|
||||||
|
git config --global user.name "Nix Builder"
|
||||||
|
git config --global user.email "nix-builder@nixos.org"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Some out-of-the-box hooks for pre-commit";
|
||||||
|
homepage = "https://github.com/pre-commit/pre-commit-hooks";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ kalbasit ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4789,6 +4789,8 @@ in {
|
||||||
|
|
||||||
pre-commit = callPackage ../development/python-modules/pre-commit { };
|
pre-commit = callPackage ../development/python-modules/pre-commit { };
|
||||||
|
|
||||||
|
pre-commit-hooks = callPackage ../development/python-modules/pre-commit-hooks { };
|
||||||
|
|
||||||
preggy = callPackage ../development/python-modules/preggy { };
|
preggy = callPackage ../development/python-modules/preggy { };
|
||||||
|
|
||||||
premailer = callPackage ../development/python-modules/premailer { };
|
premailer = callPackage ../development/python-modules/premailer { };
|
||||||
|
|
Loading…
Reference in a new issue