Commit Graph

16 Commits

Author SHA1 Message Date
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Winter
a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
Pol Dellaiera
65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02: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
Maximilian Bosch
d94ccbdd12 passExtensions.pass-audit: get rid of pythonEnv
It seems a little odd to first generate an interpreter pointing to an
environment and then building a package from it. This commit alters the
build process so that

* dependencies are listed explicitly as in any normal python build.
* a PYTHONPATH is then generated out of all dependencies and $out. This
  is injected into the package's entrypoint, the `audit.bash`.
2024-07-12 10:58:17 +02:00
Florian Brandes
6bb5edd7b1 passExtensions.pass-audit: fix python3.12 compat
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-07-11 18:07:05 +02:00
Robert Schütz
e3a18722cd passExtensions.pass-audit: fix tests 2024-03-27 17:51:58 -07:00
Sandro Jäckel
653837881e treewide: replace lib/${python.libPrefix}/site-packages with its shorthand ${python.sitePackages}
which should be always preferred
2024-01-30 19:56:57 +01:00
GetPsyched
f98ec4f73c treewide: update meta.description to fit the guidelines 2024-01-09 17:12:31 +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
Maximilian Bosch
d34a465327 passExtensions.pass-audit: 1.1 -> 1.2
ChangeLog: https://github.com/roddhjav/pass-audit/blob/v1.2/CHANGELOG.md#12---2022-01-30
2022-02-08 20:02:22 +01:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Sandro
a1d83d01f2 pass.audit: Disable tests on darwin 2020-12-04 15:04:21 +01:00
Maximilian Bosch
1f20c084a7 passExtensions.pass-audit: 1.0.1 -> 1.1 2020-04-28 00:18:26 +02:00
Michael Reilly
84cf00f980 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Maximilian Bosch
16001eab7c passExtensions.pass-audit: 0.1 -> 1.0.1, refactor
Updates to v1.0.1[1] which supports subdirs and zxcvbn[2]-based
complexity checks. Also, the following things changed:

* Add separate output for man-pages
* Enable test-suite (after adding a patch which mocks the
  `pwnedpasswords.com`).
* Added myself as maintainer.

[1] https://github.com/roddhjav/pass-audit/releases/tag/v1.0.1 /
    https://github.com/roddhjav/pass-audit/releases/tag/v1.0

[2] https://pypi.org/project/zxcvbn-python/
2020-03-15 23:13:04 +01:00