Browse Source

pythonPackage.pre-commit: move to python-modules

Add pkgs.gitAndTools.pre-commit alias
  Add pkgs.pre-commit alias
othernimblestuff
Jonathan Ringer 2 years ago
committed by Frederik Rietdijk
parent
commit
2b2d8919e8
  1. 2
      pkgs/applications/version-management/git-and-tools/default.nix
  2. 25
      pkgs/development/python-modules/pre-commit/default.nix
  3. 2
      pkgs/top-level/all-packages.nix
  4. 2
      pkgs/top-level/python-packages.nix

2
pkgs/applications/version-management/git-and-tools/default.nix

@ -145,7 +145,7 @@ let
lab = callPackage ./lab { };
pre-commit = callPackage ./pre-commit { };
pre-commit = pkgs.python3Packages.toPythonApplication pkgs.python3Packages.pre-commit;
pass-git-helper = python3Packages.callPackage ./pass-git-helper { };

25
pkgs/applications/version-management/git-and-tools/pre-commit/default.nix → pkgs/development/python-modules/pre-commit/default.nix

@ -1,5 +1,18 @@
{ stdenv, python3Packages }:
with python3Packages; buildPythonApplication rec {
{ lib, fetchPypi, buildPythonApplication, pythonOlder
, aspy-yaml
, cached-property
, cfgv
, futures
, identify
, importlib-metadata
, importlib-resources
, nodeenv
, six
, toml
, virtualenv
}:
buildPythonApplication rec {
pname = "pre-commit";
version = "1.18.1";
@ -19,13 +32,13 @@ with python3Packages; buildPythonApplication rec {
toml
virtualenv
importlib-metadata
] ++ stdenv.lib.optional (pythonOlder "3.7") importlib-resources
++ stdenv.lib.optional (pythonOlder "3.2") futures;
] ++ lib.optional (pythonOlder "3.7") importlib-resources
++ lib.optional (pythonOlder "3.2") futures;
# Tests fail due to a missing windll dependency
# slow and impure
doCheck = false;
meta = with stdenv.lib; {
meta = with lib; {
description = "A framework for managing and maintaining multi-language pre-commit hooks";
homepage = https://pre-commit.com/;
license = licenses.mit;

2
pkgs/top-level/all-packages.nix

@ -5517,6 +5517,8 @@ in
pptpd = callPackage ../tools/networking/pptpd {};
pre-commit = gitAndTools.pre-commit;
prettyping = callPackage ../tools/networking/prettyping { };
prey-bash-client = callPackage ../tools/security/prey { };

2
pkgs/top-level/python-packages.nix

@ -1909,6 +1909,8 @@ in {
pkginfo = callPackage ../development/python-modules/pkginfo { };
pre-commit = callPackage ../development/python-modules/pre-commit { };
pretend = callPackage ../development/python-modules/pretend { };
detox = callPackage ../development/python-modules/detox { };

Loading…
Cancel
Save