Commit Graph

574 Commits

Author SHA1 Message Date
Silvan Mosberger
0f27917d9a tests.nixpkgs-check-by-name: Don't error for pkgs/by-name aliases
This was an oversight in https://github.com/NixOS/nixpkgs/pull/275539
not accounted for, which would've failed in CI
2024-01-16 21:18:37 +01:00
Silvan Mosberger
3ebd239cd5 tests.nixpkgs-check-by-name: Test on the current Nixpkgs
This test actually fails right now
2024-01-16 21:15:42 +01:00
Silvan Mosberger
91b754edff tests.nixpkgs-check-by-name: Minor Nix build refactor 2024-01-16 21:15:40 +01:00
Silvan Mosberger
f61d02708f
Merge pull request #275539 from tweag/by-name-enforce
[RFC 140 2a] `pkgs/by-name`: Enforce for new packages
2024-01-15 23:10:18 +01:00
Silvan Mosberger
aa7dd0b596 tests.nixpkgs-check-by-name: Improve lib path handling in tests
nix-build failed because the tests assume to run in a CWD equal to the
project root, which is not the case in the derivation build.

This commit fixes it by not using hacky `..` references to paths,
and instead uses NIX_PATH for all implicit Nix testing path
dependencies.

Also the root of the `lib` path gets passed in from the `default.nix`
file, so all the relative path handling is done by Nix during evaluation
already, and in the Nix store when possible.
2024-01-15 18:34:16 +01:00
Someone Serge
875e43dfd7
cudaPackages.cuda{,-library}-samples: move to cuda-modules/
cudaPackages are part of the package set and should not depend on pkgs/test
2024-01-12 20:24:50 +00:00
Someone Serge
27b277b63c
tests.cuda: inherit the ready cudaPackages_XX.cuda-samples
...fixing the broken eval
2024-01-12 20:24:50 +00:00
K900
e7b611e59d Merge remote-tracking branch 'origin/master' into staging-next 2024-01-12 13:59:54 +03:00
K900
8ef54ae956 pkgs/release: don't interpolate store paths unnecessarily
Avoids Nix 2.19 screaming about a path named ".version", also avoids creating
store paths of random subsets of nixpkgs.
2024-01-12 10:27:19 +03:00
Weijia Wang
2f9e98ccf3 Merge branch 'master' into staging-next 2024-01-10 23:12:44 +01:00
Weijia Wang
0373b68de5
Merge pull request #279581 from trofi/clang6Stdenv-and-co-removal
clang6Stdenv, clang-tools_6, clang_6, lld_6, lldb_6, llvm_6: remove
2024-01-10 23:11:42 +01:00
Silvan Mosberger
be26d74840 tests.nixpkgs-check-by-name: Add test for alternate callPackage's
Tests that alternate callPackage's don't give an error, so pkgs/by-name
is only required for pkgs.callPackage itself
2024-01-10 19:55:24 +01:00
Silvan Mosberger
d659d5f8ac tests.nixpkgs-check-by-name: Use real lib for tests
This way we can also detect regressions caused by lib
2024-01-10 19:43:17 +01:00
Silvan Mosberger
cbff02834f tests.nixpkgs-check-by-name: Sort the eval validation results
Not that important, but nice.
Also adds a nice test case show-casing the two current ratchet checks at
once.
2024-01-10 19:29:27 +01:00
Silvan Mosberger
57afdc545b tests.nixpkgs-check-by-name: Enforce pkgs/by-name for new packages 2024-01-10 19:29:26 +01:00
Silvan Mosberger
69fc71a82c tests.nixpkgs-check-by-name: Basic info for non-by-name attributes
In a future commit this will be extended
2024-01-10 19:28:19 +01:00
github-actions[bot]
122355be99
Merge master into staging-next 2024-01-10 00:02:18 +00:00
Silvan Mosberger
da3e72b915
Merge pull request #278805 from tweag/by-name-enforce-preparation
check-by-name: Refactor to prepare for enforcing `pkgs/by-name`, make `--base` required
2024-01-09 22:58:53 +01:00
Weijia Wang
927f9393c1 llvmPackages_6: remove
Remove as the last two users are gone.
2024-01-09 22:38:47 +01:00
Robert Hensing
098ffee102
Merge pull request #279487 from bryango/checkpoint-build-polish
checkpointBuildTools: mkCheckpointedBuild -> mkCheckpointBuild
2024-01-09 22:30:22 +01:00
Silvan Mosberger
a1db0cdf9b tests.nixpkgs-check-by-name: .context -> .with_context
Avoids allocation in the non-error case
2024-01-09 19:39:50 +01:00
Silvan Mosberger
4cd2e64db3 tests.nixpkgs-check-by-name: Minor improvements from feedback
- Typo
- Rename AttributeRatchet to ToNixpkgsProblem
- Make the compare trait method into a RatchetState method

Co-Authored-By: Philip Taron <philip.taron@gmail.com>
2024-01-09 19:35:11 +01:00
K900
bff9ee8862 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-09 13:03:34 +03:00
Silvan Mosberger
d79d3de85f cudaPackages.cuda-library-samples: Only enable on Linux, fix channel
This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1

It appears that this attribute is only evaluated by Hydra, _not_ by
ofborg. So this wouldn't have been detected by CI anyways in the PR that
introduced the problem: https://github.com/NixOS/nixpkgs/pull/276800.

However, due to https://github.com/NixOS/nixpkgs/pull/271123#discussion_r1442134594,
the channel only broke once that was fixed with https://github.com/NixOS/nixpkgs/pull/278777

Whether the fix is good, I don't know, but the failing-on-darwin attribute
doesn't exist anymore with this commit, making the tarball build succeed
again:

    nix-build pkgs/top-level/release.nix -A tarball
2024-01-08 22:03:40 +01:00
Bryan Lai
df62c3c87f checkpointBuildTools: mkCheckpointedBuild -> mkCheckpointBuild
All other functions are in the form of `*{c,C}heckpointBuild*`, so we
deprecate the `mkCheckpointedBuild` function in favor of `mkCheckpointBuild`.

Also address some inconsistencies in the docs: some `buildOutput` should
actually be `incrementalBuildArtifacts`.
2024-01-08 19:42:16 +08:00
github-actions[bot]
a86f721682
Merge master into staging-next 2024-01-08 06:00:59 +00:00
Silvan Mosberger
6946071175 tests.checkpoint-build: Fix evaluation with allowAliases false
Was broken since introduced, but not caught due to
https://github.com/NixOS/nixpkgs/pull/271123#discussion_r1442134594
2024-01-07 23:25:41 +01:00
Silvan Mosberger
54b05324f4 tests.nixpkgs-check-by-name: Internal strip nixpkgs prefix
Strips the Nixpkgs prefix from the callPackage paths,
makes future error messages using this path be deterministic.
2024-01-05 02:01:55 +01:00
Silvan Mosberger
27c873af99 tests.nixpkgs-check-by-name: Deterministic ordering
Makes errors for attributes deterministic so it's easier to test (also,
reproducibility is always nice)
2024-01-05 02:01:55 +01:00
Silvan Mosberger
2a8f469348 tests.nixpkgs-check-by-name: Re-usable ratchet logic
This makes the attribute ratchet check logic more re-usable, which will
be used in a future commit.

It also renames the ratchet states to something more intuitive
2024-01-05 02:01:50 +01:00
Silvan Mosberger
ba6faf428f tests.nixpkgs-check-by-name: Make --base required
CI now passes the flag, so it doesn't have to be optional anymore
2024-01-05 01:05:50 +01:00
Silvan Mosberger
66f29590c0 tests.nixpkgs-check-by-name: Set evaluation system to x86_64-linux
This was previously a checking impurity that could produce different
results when run on different systems.
2024-01-05 01:05:44 +01:00
Silvan Mosberger
5b7ae79ef0 tests.nixpkgs-check-by-name: Refactor eval code and improve comments
Does a bunch of cleanups to the eval.{rs,nix} code to make future
changes easier, no functionality is changed.
2024-01-03 19:56:54 +01:00
K900
887e96e875 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-02 10:55:23 +03:00
maralorn
5518af0a55 haskellPackages: Fix eval errors 2024-01-01 19:16:21 +01:00
maralorn
7b4156edda haskellPackages: Fix eval errors 2024-01-01 18:28:31 +01:00
Connor Baker
dd4723bad7
Merge pull request #272752 from ConnorBaker/feat/autoPatchelf-support-structuredAttrs
auto-patchelf: add support for __structuredAttrs
2023-12-21 19:09:56 -05:00
Silvan Mosberger
02b3c06b1c
Merge pull request #274591 from tweag/by-name-reproducible
`pkgs/by-name`: Enable gradual migration checks and add `run-local.sh`
2023-12-22 00:17:37 +01:00
Silvan Mosberger
e130ee33a1 pkgs/test/nixpkgs-check-by-name/scripts: Various improvements
- trace function, avoids littering `echo >&2` all throughout
- Avoid `eval`, remove unneeded shellcheck

Co-Authored-By: Victor Engmark <victor@engmark.name>
2023-12-22 00:04:16 +01:00
Yann Hamdaoui
00d0418804
Test __structuredAttrs support in autoPatchelf
This commit adds a test for the newly added support for
__structuredAttrs in autoPatchelf(hook). It copied a reasonably
small-closure binary derivation that makes use of autoPatchelf, stripped
it down for the purpose of the test, and check that autoPatchelf
correctly set the interpreter and runpath whether __structuredAttrs is
set to true or not.
2023-12-21 15:42:20 +01:00
Silvan Mosberger
1968beeabd check-by-name: Pass --base in CI and local running script
This enables the ratchet checks for pkgs/by-name, allowing gradual
migrations!
2023-12-20 17:38:06 +01:00
Silvan Mosberger
9e03178865 tests.nixpkgs-check-by-name: Add documentation for scripts 2023-12-20 17:38:05 +01:00
Silvan Mosberger
92238ac52d tests.nixpkgs-check-by-name: Create script to run locally
Due to the check soon depending on the base branch (see `--base`),
the CI check can't reasonably share all code with a local check.
We can still make a script to run it locally, just not sharing all code.
2023-12-20 17:38:03 +01:00
Silvan Mosberger
3869ba4127 workflows/check-by-name: Move tool fetching into script
This part of the CI can also be reproduced locally
2023-12-19 23:15:01 +01:00
Janne Heß
5eed5416ff
Merge pull request #167670 from messemar/incremental-builds
incremental builds: add derivation override functions
2023-12-19 11:37:15 +01:00
Silvan Mosberger
2a107bc64b
Merge pull request #272395 from tweag/by-name-migrate-empty-arg
tests.nixpkgs-check-by-name: Implement gradual empty arg check migration
2023-12-15 19:08:11 +01:00
Silvan Mosberger
fc2d26939d tests.nixpkgs-check-by-name: Improve check clarity 2023-12-15 17:27:26 +01:00
Adam Joseph
2d036511f6 pkgs/test/release/default.nix: init
This derivation verifies that all jobset attributes can be evaluated
under tryEval without producing any non-catchable errors or causing
infinite recursion.
2023-12-15 05:13:50 -08:00
Adam Joseph
80472e3754 treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs 2023-12-15 05:13:46 -08:00
Silvan Mosberger
74e8b38dbe tests.nixpkgs-check-by-name: Move interface description into code
This would be duplicated otherwise
2023-12-15 02:28:55 +01:00