Commit Graph

885 Commits

Author SHA1 Message Date
Wolfgang Walther
cc8ee67459 treewide: remove __recurseIntoDerivationForReleaseJobs
This attribute was supposed to be set on derivations, to make the
release tools recurse into them. The remaining uses were all on regular
attrsets, though, so this is safe to remove.

(cherry picked from commit d0c0b875f7)
2025-09-03 16:28:30 +00:00
Wolfgang Walther
aefcb0d50d treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Philip Taron
e33b7b1789 tests.nixpkgs-check-by-name: remove throw; no need for this
(cherry picked from commit 50f6934d89)
2025-07-22 07:12:31 +00:00
Wolfgang Walther
ac946e166a linux: remove assert on linux
Asserting the hostplatform for `linux` is bad, because it can't be
caught by CI. For the `linux` package itself, it doesn't make a
difference, because it also has `meta.platforms = linux` set, so this
will fail evaluation - and in a way that can nicely be caught by CI.

(cherry picked from commit 0febbb4ff9)
2025-07-22 06:45:48 +00:00
Wolfgang Walther
dcb8466e81 tests-stdenv-gcc-stageCompare: delay asserts
The removed assert is covered by `meta.platforms = linux`, which will
throw an "unsupported system" error on darwin. Since the platforms are
restricted to linux anyway, it doesn't make sense to have this set to
`all` in `release-small.nix` - `linux` should suffice. Right?

The other assert is delayed until after the evaluation of `meta`. This
allows the "unsupported system" error on darwin to be thrown at all,
without triggering the assert before. This helps CI, which can't catch
asserts properly, but can do so with `meta.platforms` based errors.

(cherry picked from commit 3ea96163cc)
2025-07-22 06:21:48 +00:00
Yueh-Shun Li
0ba1f47823 fetchhg: make argument hash overridable
(cherry picked from commit ef2f8315bf)
2025-07-09 07:58:19 +00:00
Jan Tojnar
dbf7640764 makeHardcodeGsettingsPatch: Fix schemaExistsFunction w/o stdbool.h
If project uses C and does not include `stdbool.h`,
it will not have available lowercase booleans.
However, since this tool targets GLib programs,
we can rely on uppercase constants defined by GLib.

(cherry picked from commit 5309164a96)
2025-06-27 02:48:54 +00:00
Connor Baker
589dde029e arrayUtilities: init
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 38a8232461)
2025-06-12 13:26:49 +00:00
nixpkgs-ci[bot]
9af3319f5f Merge master into staging-next 2025-05-11 12:06:00 +00:00
Jörg Thalheim
7fd771ee97 ci: allow running jobs locally (#404466) 2025-05-11 12:28:04 +02:00
Wolfgang Walther
8980c1f7fc various: fix parse errors for nix 2.3
Path interpolation syntax is not supported in the minimum nix version.
2025-05-11 12:14:58 +02:00
nixpkgs-ci[bot]
7b793f256a Merge master into staging-next 2025-05-08 18:05:13 +00:00
Jan Tojnar
e50f76c7d0 makeHardcodeGsettingsPatch: Add support for schemaExistsFunction
evolution-ews introduced a check for optional schemas, which would skip our hardcoded code paths.
a0c514bd34

Let’s update the semantic patch to also replace the invocations of specified `schemaExistsFunction` for known schemas with `true`.
2025-05-08 18:29:49 +02:00
Naïm Camille Favier
9c4a331e76 makeWrapper: --add-flag and --append-flag arguments (#400649) 2025-04-28 20:43:03 +02:00
K900
f96ac2dcd6 Merge remote-tracking branch 'origin/master' into staging-next 2025-04-26 09:07:48 +03:00
Fernando Rodrigues
05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
BirdeeHub
7b9c6346ff makeWrapper: --add-flag and --append-flag arguments
also:

manual: differences in makeWrapper implementations better explained

Update pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/build-support/setup-hooks/make-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/build-support/setup-hooks/make-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/build-support/setup-hooks/make-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/build-support/setup-hooks/make-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>

Update pkgs/build-support/setup-hooks/make-wrapper.sh

Co-authored-by: Naïm Camille Favier <n@monade.li>
2025-04-25 12:57:29 -07:00
sternenseemann
6eafb08399 Merge commit ee446f457b into haskell-updates 2025-04-19 20:48:13 +02:00
Pavol Rusnak
13dc729be7 tests.cuda.cudaPackages: add missing cuda versions 2025-04-18 12:28:28 +02:00
Wolfgang Walther
55a97cef20 tests.haskell.documentationTarball: switch to random
We only need *a* package, to test the "documentationTarball" function,
not specifically vector. I guess we should use a package that is rarely
broken itself... for which a *dependency* of vector should be a good
choice. I took a random one... "random"!
2025-04-14 21:12:31 +02: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
Wolfgang Walther
9e296dcf84 Merge commit '3b48b2eb41f0bcd2c0551cd1c2457fdae806c7a3' into haskell-updates-merge-nixfmt 2025-04-05 14:19:34 +02:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Wolfgang Walther
b660909f3c Merge commit '2a6f5e82097461c4adaa93b6e84672badbdd4460' into haskell-updates 2025-03-29 11:43:35 +01:00
Vincenzo Mantova
43d524e00e texlive: 2024-20241027 -> 2024-final (#390498) 2025-03-24 02:31:21 -04:00
Thomas Miedema
ff9e4bce32 haskell: fix shellFor test
In #296645, envFunc (and thus shellFor) was changed from
`mkDerivation {phases=[..]}` to `runCommand ..`. So since
then, the derivation of shellFor contains a `buildCommand`
("echo $nativeBuildInputs $buildInputs > $out"),
and as a result the custom phases defined in shellFor's
test were ignored.
2025-03-23 01:39:43 +01:00
Rhys-T
0f17943751 noBrokenSymlinks: apply lib.recurseIntoAttrs to set of tests
For consistency with the outer `tests.stdenv.hooks` attrset.
2025-03-05 15:49:22 -05:00
Rhys-T
0354b63bf9 noBrokenSymlinks: use lib.optionalAttrs instead of meta.badPlatforms
Having unbuildable tests in the attrset makes it difficult to ask Nix to
build all the working ones at once. See discussion in #380683. So
instead of flagging them, let's just remove them entirely.
2025-03-05 15:46:38 -05:00
Rhys-T
18d92cd065 noBrokenSymlinks: set meta.badPlatforms for tests
Some platforms implement permissions for symlinks, while others -
including Linux - ignore them. As a result, testing this hook's handling
of unreadable symlinks requires careful attention to which kind of
platform we're on. See the comments by `meta.badPlatforms` for details.
2025-03-05 15:46:38 -05:00
Rhys-T
0c4f6e939d noBrokenSymlinks: move hook to beginning of defaultNativeBuildInputs
This protects the rest of the standard setup hooks from unreadable and
other broken symlinks. (Otherwise, they can choke on the `readlink` step
and fail silently before `no-broken-symlinks.sh`` is even reached.)
2025-03-05 15:46:38 -05:00
Rhys-T
43178a462f noBrokenSymlinks: fix tests on Linux
`mkUnreadableSymlink` was exiting before the hook could print its
messages, meaning that the combined 'broken' test wasn't getting the
symlink counts.
2025-03-05 15:46:37 -05:00
Rhys-T
1a9fd7866b noBrokenSymlinks: use umask instead of chmod to make unreadable symlinks
The stage2 stdenv uses Coreutils 9.4, which doesn't have `chmod -h` yet.
2025-03-05 15:46:37 -05:00
Rhys-T
693c7b3dad noBrokenSymlinks: add test for unreadable symlinks; fix existing tests 2025-03-05 15:46:37 -05:00
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
nixpkgs-ci[bot]
97b9d455ea Merge master into staging-next 2025-02-12 12:05:57 +00:00
sternenseemann
f611c803e5 tests.haskell.upstreamStackhpackVersion: set descriptive user agent
GitHub apparently immediately terminates the connection for our previous
bogus curl user agent. Let's be more polite about this (default curl
user agent would work, too).
2025-02-11 22:48:14 +01:00
Wolfgang Walther
2e43b87c62 replaceVars: fail when exemption can't be found
This also changes stdenv's substitute --replace-fail to error out when
the replacement is the same as the search pattern, but can't be found.
This should not cause any problems in existing code, from what I can
tell from grepping nixpkgs.

The exception for pattern==replacement was previously introduced all the
way back in 5ff872aa24, but this was
apparently only used to make the check for the warning "simpler".
2025-02-10 19:19:59 +01:00
K900
13b8408f30 Merge remote-tracking branch 'origin/staging-next' into staging 2025-02-06 17:10:14 +03:00
Jörg Thalheim
63a327bd87 rust/hooks: move tests to hooks and add to passthru (#379269) 2025-02-06 05:28:37 +01:00
K900
56c60b2c97 Merge remote-tracking branch 'origin/master' into staging-next 2025-02-05 17:42:52 +03:00
Robert Hensing
692a57e61d Revert "Reapply "pkgs/top-level: make package sets composable""
This reverts commit d2faa1bbca.
2025-02-05 14:29:11 +01:00
DavHau
154f977ac6 rust/hooks: move tests to hooks and add to passthru 2025-02-04 12:02:15 +07:00
nixpkgs-ci[bot]
0acbe87d4f Merge staging-next into staging 2025-02-02 11:33:22 +00:00
nixpkgs-ci[bot]
e1353d0d8d Merge master into staging-next 2025-02-02 11:32:53 +00:00
Jörg Thalheim
c8b5329e7a rust: fix splicing for rust hooks (#369424) 2025-02-02 00:48:20 +07:00
Wolfgang Walther
d2faa1bbca Reapply "pkgs/top-level: make package sets composable"
This reverts commit 7c251e2b5f.

Left out eec21001b0, which changed
nixos/nixpkgs, doing it differently this time.
2025-02-01 12:04:59 +01:00
DavHau
db4cf6cb1d rust: fix splicing for rust hooks
This fixes a long standing issue where rust hooks behave differently when used inside buildRustPackage vs inside mkDerivation, which lead to surprising behavior, like for example the package being built for the wrong paltform or the linker not being found especially in cross compilation scenarios.

The reason for this inconsitency was, that buildRustPackage consumed the hooks in a non-spliced form, via [this inherit statement](4506ece030/pkgs/development/compilers/rust/make-rust-platform.nix (L60)), and therefore the usual platform shift on the hooks introduced by putting them in `nativeBuildInputs` was not applied here.

Thoug whenever the hook was used inside other builders like `mkDerivation` the platform shift did apply correctly as the hook was consumed via the spliced package set, introducing the inconsitecy.

Because of the wrong (non-spliced) use in buildRustPackage, most rust hooks have been designed with the wrong build/host/target shift in mind which is fixed by this change.

Due to the inconsitent behavior between different builders, workarounds like `rust.envVars`, which were previously introduced, likely become obsolete by this change.

This likely fixes a bunch of cross compilation issues for rust packages that are not based on `buildRustPackage` but instead consume the hooks directly.

Done:
- ensure that `buildRustPackage` consumes spliced hooks by using makeScopeWithSplicing' in make-rust-platform.nix.
- refactor hooks to make them refer to correct build/host/target packages.
- remove `rust.envVars` workaround from all rust hooks
- implement tests for most rust hooks in /pkgs/test/rut-hooks

The newly added tests can be executed for native as well as cross compilation via:
```
nix-build -A tests.rust-hooks -A pkgsCross.riscv64.tests.rust-hooks
```
2025-01-31 18:18:46 +07:00
K900
7c251e2b5f Revert "pkgs/top-level: make package sets composable" 2025-01-26 09:43:44 +03:00
Wolfgang Walther
2acca93bef pkgs/top-level: fix composing "native cross" package sets
When using pkgsCross with a system that ends up the same as the
localSystem, then modifications for package sets like pksgMusl need to
be done for **both** localSystem and crossSystem. Consider the following
on x86_64-linux:

  pkgsCross.gnu64.pkgsMusl

Before this change, this would result in a musl buildPlatform, but a gnu
hostPlatform. This breaks the promise of "stacking" package sets on top
of each other.

After this change, it results in a musl buildPlatform and a musl
hostPlatform. This works better.

One could expect this to result in the same as pkgsCross.musl64, i.e. a
gnu buildPlatform and a musl hostPlatform, however I couldn't get this
to work without increasing memory usage for ci/eval by many, many GB.
This is caused by usage of pkgsi686Linux inside the main package set,
which follows the same hybrid pattern.
2025-01-25 18:58:09 +01:00