1 { lib, fetchPypi, buildPythonPackage, pythonOlder
16 buildPythonPackage rec {
24 sha256 = "15f1chxrbmfcajk1ngk3jvf6jjbigb5dg66wnn7phmlywaawpy06";
28 ./hook-tmpl-use-the-hardcoded-path-to-pre-commit.patch
29 ./languages-use-the-hardcoded-path-to-python-binaries.patch
32 propagatedBuildInputs = [
41 ] ++ lib.optional (pythonOlder "3.8") importlib-metadata
42 ++ lib.optional (pythonOlder "3.7") importlib-resources;
48 substituteInPlace $out/${python.sitePackages}/pre_commit/resources/hook-tmpl \
49 --subst-var-by pre-commit $out
50 substituteInPlace $out/${python.sitePackages}/pre_commit/languages/python.py \
51 --subst-var-by virtualenv ${virtualenv}
52 substituteInPlace $out/${python.sitePackages}/pre_commit/languages/node.py \
53 --subst-var-by nodeenv ${nodeenv}
57 description = "A framework for managing and maintaining multi-language pre-commit hooks";
58 homepage = "https://pre-commit.com/";
59 license = licenses.mit;
60 maintainers = with maintainers; [ borisbabic ];