Commit Graph
33 Commits
Author SHA1 Message Date
jfvillablanca 3787f84614 pre-commit: 3.7.1 -> 4.0.1
https://github.com/pre-commit/pre-commit/releases/tag/v4.0.1
2024-10-19 08:33:40 +08:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
R. Ryantm 912dd75be7 pre-commit: 3.7.0 -> 3.7.1 2024-05-12 11:38:55 +00:00
Aaron Jheng 55d8f7fc7d pre-commit: 3.6.2 -> 3.7.0 2024-04-09 16:29:57 +08:00
Aaron Jheng aab54e0a2f pre-commit: 3.6.1 -> 3.6.2 2024-03-02 22:37:28 +08:00
R. Ryantm b51ec220df pre-commit: 3.6.0 -> 3.6.1 2024-02-13 20:51:22 +00:00
Ben SiraphobandGitHub 30b34ac007 Merge pull request #267499 from NilsIrl/pygrep-pythonpath
[pre-commit] Forward sys.path to pygrep via PYTHONPATH
2024-01-27 15:12:49 -05:00
Nils André 69d78abdb8 pre-commit: fix pygrep hooks
Fixes https://github.com/NixOS/nixpkgs/issues/173707
2023-12-27 19:48:37 -08:00
Aaron Jheng f64eee41df pre-commit: 3.3.3 -> 3.6.0 2023-12-10 02:42:33 +00:00
h7x4 41974d5ed9 treewide: add mainProgram 2023-11-27 02:17:53 +01:00
Fabian Affolter fd60d6dc79 pre-commit: 3.3.2 -> 3.3.3
Diff: https://github.com/pre-commit/pre-commit/compare/v3.3.2...v3.3.3
2023-06-15 00:06:16 +02:00
Matt RixmanandFrederik Rietdijk 8ebcb96e4a pre-commit: prevent propagating inputs
Fixes a bug where pre-commit would pollute the PYTHONPATH with its
dependencies, potentially interfering with the user's dependencies.
2023-06-03 16:50:09 +02:00
Fabian Affolter 384fb52227 pre-commit: 3.3.1 -> 3.3.2
Diff: https://github.com/pre-commit/pre-commit/compare/v3.3.1...v3.3.2
2023-05-18 21:41:46 +02:00
Fabian Affolter 6de591e538 pre-commit: 3.2.2 -> 3.3.1 2023-05-07 14:33:02 +02:00
Aaron Jheng f4b0afe9f5 pre-commit: 3.1.0 -> 3.2.1 2023-04-04 02:05:36 +00:00
Aaron Jheng 2c7af95567 pre-commit: 2.20.0 -> 3.1.0 2023-02-24 11:00:59 +00:00
Weijia Wang cb88681631 pre-commit: fix build on aarch64-linux 2023-02-10 09:52:40 +01:00
Robert Hensing d9e4080d15 pre-commit: Disable check on i686-linux 2023-02-03 20:40:34 +01:00
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Martin Weinelt 4e7b8905ba pre-commit: Add pytest-forked
It was provided through pytest-xdist, which isn't the case after the 3.0
release.
2023-01-05 13:20:49 +01:00
K900 d869913e9c pre-commit: skip tests broken with Git 2.38.1 2022-11-02 23:33:16 +03:00
github-actions[bot]andGitHub 886633ba43 Merge master into staging-next 2022-10-15 00:04:00 +00:00
Artturin 7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Rebecca Turner 5a01cf1084 pre-commit: use absolute path for binary in hook
This changes the generated Git hook to refer to the `pre-commit` binary
by its absolute path. This means that Git hooks created with
`nix-shell --run 'pre-commit install'` or similar will be usable outside
of the Nix shell they were created in.

I think this is the intended behavior for this package, considering that
the `postPatch` phase already includes a substitution for this variable,
otherwise unused:

    substituteInPlace pre_commit/resources/hook-tmpl \
      --subst-var-by pre-commit $out
2022-10-07 13:38:15 -04:00
R. Ryantm 9805aedbcc pre-commit: 2.19.0 -> 2.20.0 2022-07-11 07:11:23 +00:00
Fabian Affolter 5b8df072cb pre-commit: 2.18.1 -> 2.19.0 2022-05-05 23:59:45 +02:00
Martin Weinelt 9f340b5bf1 treewide: remove redundant numprocesses pytest-xdist parameter
Including the pytest-xdist package automatically configures numprocesses
to $NIX_BUILD_CORES, so specifying these on a package level has become
redundant.
2022-04-15 01:39:54 +02:00
Robert Hensing 1bf8e7a811 pre-commit: Add libiconv for tests on x86_64-darwin
Note: not a checkInput, because we need
this dependency in the role of a _build_
input during tests: library path, etc.

Solves

    E                 = note: ld: library not found for -liconv
    E                         clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
    E
    E
    E               error: failed to compile `rust-hello-world v0.1.0 (/private/tmp/nix-build-python3.9-pre-commit-2.18.1.drv-1/pytest-of-nixbld4/pytest-0/popen-gw3/test_rust_hook0/0/.pre-commit/repomj5itq00)`, intermediate artifacts can be found at `/private/tmp/nix-build-python3.9-pre-commit-2.18.1.drv-1/pytest-of-nixbld4/pytest-0/popen-gw3/test_rust_hook0/0/.pre-commit/repomj5itq00/target`
    E
    E               Caused by:
    E                 could not compile `rust-hello-world` due to previous error

    pre_commit/util.py:146: CalledProcessError

in test case

    FAILED tests/repository_test.py::test_rust_hook
2022-04-08 15:59:07 +02:00
ArtturinandJonathan Ringer d90f4d5030 pre-commit: enable tests
used arch and openSUSE packages for reference
2022-04-04 17:06:19 -07:00
R. RyantmandJonathan Ringer b393b879e0 pre-commit: 2.17.0 -> 2.18.1 2022-04-04 17:06:19 -07:00
R. Ryantm 7945280b9b pre-commit: 2.16.0 -> 2.17.0 2022-01-19 08:43:41 +00:00
Phillip CloudandRobert Schütz 5c22c16c24 pre-commit: move out of python3packages 2021-12-09 16:13:49 -08:00