pre-commit: cleanup (#414735)

authored by Gaétan Lepage and committed by GitHub 48ad995f 1128c774

+16 -11
+16 -11
pkgs/by-name/pr/pre-commit/package.nix
··· 2 2 lib, 3 3 fetchFromGitHub, 4 4 python3Packages, 5 - libiconv, 6 5 cargo, 7 6 coursier, 8 7 dotnet-sdk, ··· 14 13 julia, 15 14 julia-bin, 16 15 pre-commit, 16 + versionCheckHook, 17 + writableTmpDirAsHomeHook, 17 18 }: 18 19 19 20 with python3Packages; ··· 24 25 buildPythonApplication rec { 25 26 pname = "pre-commit"; 26 27 version = "4.2.0"; 27 - format = "setuptools"; 28 - 29 - disabled = pythonOlder "3.9"; 28 + pyproject = true; 30 29 31 30 src = fetchFromGitHub { 32 31 owner = "pre-commit"; ··· 41 40 ./pygrep-pythonpath.patch 42 41 ]; 43 42 44 - propagatedBuildInputs = [ 43 + build-system = [ 44 + setuptools 45 + ]; 46 + 47 + dependencies = [ 45 48 cfgv 46 49 identify 47 50 nodeenv ··· 55 58 cargo 56 59 gitMinimal 57 60 go 58 - libiconv # For rust tests on Darwin 61 + # libiconv # For rust tests on Darwin 59 62 perl 60 63 pytest-env 61 64 pytest-forked ··· 64 67 re-assert 65 68 cabal-install 66 69 julia' 70 + versionCheckHook 71 + writableTmpDirAsHomeHook 67 72 ] 68 73 ++ lib.optionals (!i686Linux) [ 69 74 # coursier can be moved back to the main nativeCheckInputs list once we’re able to bootstrap a ··· 79 84 # Node.js-related tests that are currently disabled on i686-linux. 80 85 nodejs 81 86 ]; 87 + versionCheckProgramArg = "--version"; 82 88 83 89 postPatch = '' 84 90 substituteInPlace pre_commit/resources/hook-tmpl \ ··· 110 116 export DOTNET_ROOT="${dotnet-sdk}/share/dotnet" 111 117 '' 112 118 + '' 113 - export HOME=$(mktemp -d) 114 - 115 119 git init -b master 116 120 117 121 python -m venv --system-site-packages venv ··· 213 217 inherit gitMinimal pre-commit; 214 218 }; 215 219 216 - meta = with lib; { 220 + meta = { 217 221 description = "Framework for managing and maintaining multi-language pre-commit hooks"; 218 222 homepage = "https://pre-commit.com/"; 219 - license = licenses.mit; 220 - maintainers = with maintainers; [ borisbabic ]; 223 + changelog = "https://github.com/pre-commit/pre-commit/blob/v${version}/CHANGELOG.md"; 224 + license = lib.licenses.mit; 225 + maintainers = with lib.maintainers; [ borisbabic ]; 221 226 mainProgram = "pre-commit"; 222 227 }; 223 228 }