Loading pkgs/by-name/pr/pre-commit/package.nix +2 −8 Original line number Diff line number Diff line Loading @@ -107,12 +107,6 @@ buildPythonApplication rec { deactivate ''; # Propagating dependencies leaks them through $PYTHONPATH which causes issues # when used in nix-shell. postFixup = '' rm $out/nix-support/propagated-build-inputs ''; disabledTests = [ # ERROR: The install method you used for conda--probably either `pip install conda` # or `easy_install conda`--is not compatible with using conda as an application. Loading Loading @@ -182,8 +176,8 @@ buildPythonApplication rec { "pre_commit" ]; passthru.tests.version = testers.testVersion { package = pre-commit; passthru.tests = callPackage ./tests.nix { inherit git pre-commit; }; meta = with lib; { Loading pkgs/by-name/pr/pre-commit/tests.nix 0 → 100644 +45 −0 Original line number Diff line number Diff line { git, pre-commit, runCommand, testers, }: { check-meta-hooks = runCommand "check-meta-hooks" { nativeBuildInputs = [ git pre-commit ]; } '' cd "$(mktemp --directory)" export HOME="$PWD" cat << 'EOF' > .pre-commit-config.yaml repos: - repo: local hooks: - id: echo name: echo entry: echo files: \.yaml$ language: system - repo: meta hooks: - id: check-hooks-apply - id: check-useless-excludes - id: identity EOF git config --global user.email "you@example.com" git config --global user.name "Your Name" git init --initial-branch=main git add . pre-commit run --all-files touch $out ''; version = testers.testVersion { package = pre-commit; }; } Loading
pkgs/by-name/pr/pre-commit/package.nix +2 −8 Original line number Diff line number Diff line Loading @@ -107,12 +107,6 @@ buildPythonApplication rec { deactivate ''; # Propagating dependencies leaks them through $PYTHONPATH which causes issues # when used in nix-shell. postFixup = '' rm $out/nix-support/propagated-build-inputs ''; disabledTests = [ # ERROR: The install method you used for conda--probably either `pip install conda` # or `easy_install conda`--is not compatible with using conda as an application. Loading Loading @@ -182,8 +176,8 @@ buildPythonApplication rec { "pre_commit" ]; passthru.tests.version = testers.testVersion { package = pre-commit; passthru.tests = callPackage ./tests.nix { inherit git pre-commit; }; meta = with lib; { Loading
pkgs/by-name/pr/pre-commit/tests.nix 0 → 100644 +45 −0 Original line number Diff line number Diff line { git, pre-commit, runCommand, testers, }: { check-meta-hooks = runCommand "check-meta-hooks" { nativeBuildInputs = [ git pre-commit ]; } '' cd "$(mktemp --directory)" export HOME="$PWD" cat << 'EOF' > .pre-commit-config.yaml repos: - repo: local hooks: - id: echo name: echo entry: echo files: \.yaml$ language: system - repo: meta hooks: - id: check-hooks-apply - id: check-useless-excludes - id: identity EOF git config --global user.email "you@example.com" git config --global user.name "Your Name" git init --initial-branch=main git add . pre-commit run --all-files touch $out ''; version = testers.testVersion { package = pre-commit; }; }