python3Packages.pre-commit-hooks: 3.4.0 -> 4.0.1
This commit is contained in:
parent
3191d4f0af
commit
64f17e1332
|
@ -1,9 +1,8 @@
|
||||||
{ buildPythonPackage
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchPypi
|
|
||||||
, git
|
, git
|
||||||
, isPy27
|
, pythonOlder
|
||||||
, lib
|
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, ruamel_yaml
|
, ruamel_yaml
|
||||||
, toml
|
, toml
|
||||||
|
@ -11,19 +10,25 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pre-commit-hooks";
|
pname = "pre-commit-hooks";
|
||||||
version = "3.4.0";
|
version = "4.0.1";
|
||||||
disabled = isPy27;
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
# fetchPypi does not provide tests
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pre-commit";
|
owner = "pre-commit";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1aqkmprdc2lhds9c59pkkf2js65j63197flanaggk7cm8k0kz7zs";
|
sha256 = "sha256-Rg2I79r0Pp3AUgT6mD+kEdm+5CEGgdmFn6G3xcU6fnk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ toml ruamel_yaml ];
|
propagatedBuildInputs = [
|
||||||
checkInputs = [ git pytestCheckHook ];
|
ruamel_yaml
|
||||||
|
toml
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
git
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
# the tests require a functional git installation which requires a valid HOME
|
# the tests require a functional git installation which requires a valid HOME
|
||||||
# directory.
|
# directory.
|
||||||
|
@ -34,6 +39,8 @@ buildPythonPackage rec {
|
||||||
git config --global user.email "nix-builder@nixos.org"
|
git config --global user.email "nix-builder@nixos.org"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pre_commit_hooks" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Some out-of-the-box hooks for pre-commit";
|
description = "Some out-of-the-box hooks for pre-commit";
|
||||||
homepage = "https://github.com/pre-commit/pre-commit-hooks";
|
homepage = "https://github.com/pre-commit/pre-commit-hooks";
|
||||||
|
|
Loading…
Reference in a new issue