Commit Graph

781 Commits

Author SHA1 Message Date
Silvan Mosberger
ebbe86306f tests.nixpkgs-check-by-name: More tests
For some previously untested cases. In a future commit, those tests will
also be adjusted slightly
2024-02-08 00:02:45 +01:00
github-actions[bot]
0e09aea96c
Merge master into haskell-updates 2024-02-06 00:12:25 +00:00
Silvan Mosberger
70f9d315a1
Merge pull request #285089 from tweag/by-name-syntactic-callPackage
tests.nixpkgs-check-by-name: Syntactic `callPackage` detection and allow new package variants
2024-02-05 20:47:09 +01:00
Silvan Mosberger
474e7e7040 tests.nixpkgs-check-by-name: Refactor eval.rs
There was too much indentation!
2024-02-05 01:37:09 +01:00
Silvan Mosberger
37a54e3ad5 tests.nixpkgs-check-by-name: Apply feedback from review
https://github.com/NixOS/nixpkgs/pull/285089#pullrequestreview-1861099233

Many thanks, Philip Taron!
2024-02-05 01:35:52 +01:00
github-actions[bot]
05ce1c8cd3
Merge master into haskell-updates 2024-02-01 00:13:01 +00:00
Atemu
52418a5183
Merge pull request #279844 from doronbehar/tests/buildFHSEnv
tests.buildFHSEnv.libtinfo: init
2024-01-31 16:09:16 +01:00
github-actions[bot]
99d08bb877
Merge master into haskell-updates 2024-01-31 00:12:49 +00:00
Silvan Mosberger
7d1f0a4cd4 tests.nixpkgs-check-by-name: Allow new package variants 2024-01-30 22:45:18 +01:00
Silvan Mosberger
46da6c5c1f tests.nixpkgs-check-by-name: Format
With `cargo fmt`

Explicitly didn't do that for previous commits in order to keep the diff
more easily reviewable
2024-01-30 21:54:04 +01:00
Silvan Mosberger
db435ae516 tests.nixpkgs-check-by-name: Re-use nixFileCache more
Makes the reference check use the nixFileCache instead of separately
parsing and resolving paths
2024-01-30 21:54:04 +01:00
Silvan Mosberger
0bcb052284 tests.nixpkgs-check-by-name: Syntactic callPackage detection
This makes the callPackage detection stronger by syntactically detecting
whether an attribute is using callPackage

See the added test case for why this is needed.
2024-01-30 21:53:59 +01:00
Silvan Mosberger
ed892915b8 tests.nixpkgs-check-by-name: LineIndex functionality, semantics, tests
- `fromlinecolumn` is added to be almost the reverse of `line`.
  This is needed in the future to get from `builtins.unsafeGetAttrPos`
  locations to the index for rnix
- Previously the semantics for newline indices were not really defined,
  now they are, and make more sense.
- Now there's a unit test for these functions
2024-01-30 21:19:05 +01:00
annalee
9e5b7b2ceb
treewide: drop LLVM10 2024-01-30 06:30:28 +00:00
a-n-n-a-l-e-e
425588f207
Merge pull request #283551 from a-n-n-a-l-e-e/llvmPackages_8-drop
treewide: drop LLVM8
2024-01-29 22:25:38 -08:00
github-actions[bot]
b0233d387c
Merge master into haskell-updates 2024-01-30 00:12:10 +00:00
Silvan Mosberger
142922295d check-by-name: Don't use -I in shebang
Original commit from https://github.com/NixOS/nixpkgs/pull/282226,
message:

Running CI locally is broken becauses the `-I` argument:

- Clobbers $NIX_PATH
- Is wrong for two reasons:
  - Has too many `..` elements, relative to the script's location
  - Isn't relative to the script's location (as with *.nix files),
    since shell scripts and POSIX in general interpret paths
    relative to the current working directory, not the canonical
    path of argv[0]
- Is inconsistent, since this script has symlinks pointing at it
  from different depths in the repository

There is no way to set this flag statically in a way that will work
everywhere.  The caller needs to use $NIX_PATH, or the script needs
to take the `-I` value as an argument.

This commit deletes the static `-I` flag.
2024-01-29 13:39:26 +01:00
Silvan Mosberger
9c149d289e check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/283017
2024-01-29 13:38:55 +01:00
github-actions[bot]
bc838f6bd7
Merge master into haskell-updates 2024-01-28 00:13:47 +00:00
Vincenzo Mantova
253025b370 texlive: 2022-final -> 2023.20240114
Co-authored-by: apfelkuchen06 <apfelkuchen@hrnz.li>
2024-01-27 09:32:22 +00:00
apfelkuchen06
2e2b6d13e2 tests/texlive: add a context test
Since context now uses the luametatex engine, which is not distributed with
texlive, the probability of breaking it when updating increases. Let's add a
simple test just in case.

Co-authored-by: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com>
2024-01-27 09:32:20 +00:00
github-actions[bot]
acd0181532
Merge master into haskell-updates 2024-01-26 00:12:48 +00:00
annalee
7a0dc7c7e8
treewide: drop LLVM8 2024-01-25 12:24:51 +00:00
Sergei Trofimovich
9b5c93da36 tests.cross.sanity: fix eval by fixing qt5.qutebrowser reference
Without the change the eval fails as:

    $ nix build --no-link -f. tests.cross.sanity

       error: attribute 'qutebrowser' missing

       at pkgs/test/cross/default.nix:157:5:

          156|     # Two web browsers -- exercises almost the entire packageset
          157|     pkgs.pkgsCross.aarch64-multiplatform.qt5.qutebrowser
             |     ^
          158|     pkgs.pkgsCross.aarch64-multiplatform.firefox
2024-01-25 10:51:29 +00:00
github-actions[bot]
395b0f9a10
Merge master into haskell-updates 2024-01-25 00:13:22 +00:00
Weijia Wang
cdb02f1ec6
Merge pull request #283598 from Artturin/fixerr1
tests.cc-wrapper: fix error
2024-01-25 00:19:51 +01:00
Artturin
1d1d938bf0 tests.cc-wrapper: fix error
`error: llvmPackages_{6,7} has been removed from nixpkgs`
2024-01-24 22:50:16 +02:00
Silvan Mosberger
553b1ab654 tests.nixpkgs-check-by-name: Don't enforce for fixed evals
Stops enforcing that packages whose evaluation gets fixed have to be
moved to `pkgs/by-name`.

This didn't really cause problems before, but I don't think it's great
behavior, and now that NonApplicable is a thing, we can easily make this
work, whereas before it would've been a larger change.
2024-01-22 23:16:46 +01:00
Silvan Mosberger
4245e618e7 tests.nixpkgs-check-by-name: Introduce a non-applicable ratchet state
Introduces NonApplicable as a state of a ratchet, to be used when the
ratchet doesn't make sense to have.

This fixes an odd problem where before, changing an attribute to use
e.g. `callPackage` suddenly requires moving it to `pkgs/by-name`, when that
shouldn't have been required.
2024-01-22 23:13:58 +01:00
Silvan Mosberger
5e173ab0f4 tests.nixpkgs-check-by-name: Minorly more minimal test files 2024-01-22 22:58:33 +01:00
Silvan Mosberger
a48038d309 tests.nixpkgs-check-by-name: Minor code improvements
- Renames EmptyNonAutoCalled to ManualDefinition and add some docs to
  better explain what it's for
- Don't conflate the Ratchet type with the Context type, keep them
  apart, making the code a bit cleaner, but also allows adding
  additional context for a Tight ratchet in the future
- Change the signature of to_nixpkgs_problem to align with the other
  ratchet function signatures
2024-01-22 22:56:21 +01:00
github-actions[bot]
fc9b80e7a3
Merge master into haskell-updates 2024-01-20 00:12:49 +00:00
Silvan Mosberger
bfe48c9a44 check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/275539
2024-01-18 18:42:03 +01:00
Silvan Mosberger
0259a8b94d nixpkgs-check-by-name/scripts: Use local Nixpkgs for dependencies
Especially needed because NIX_PATH is set to something custom in the
nix-shell of nixpkgs-check-by-name
2024-01-18 18:41:27 +01:00
github-actions[bot]
393ca0ec36
Merge master into haskell-updates 2024-01-18 00:13:11 +00:00
Silvan Mosberger
a64d9bf4fd
Merge pull request #278687 from keanuk/check-by-name-multiple-failures
nixpkgs-check-by-name test that fails multiple validity checks
2024-01-17 21:39:37 +01:00
Silvan Mosberger
800a6d3031
Merge pull request #281399 from tweag/by-name-minor-improvements
tests.nixpkgs-check-by-name: Minor improvements
2024-01-17 21:36:27 +01:00
Silvan Mosberger
1516b35afa check-by-name: Remove legacy CI script
See the removed comment for why it can be removed now
2024-01-17 21:26:39 +01:00
Silvan Mosberger
8cf3cd91b2 check-by-name: Update contributor docs
Now that the tooling is pinned instead of being fetched indirectly from
the channel, the docs need some updating
2024-01-17 21:26:39 +01:00
Silvan Mosberger
9997190a61
Merge pull request #281407 from tweag/by-name-local-run-platforms
check-by-name/run-local.sh: Make it usable for non-CI platforms
2024-01-17 21:21:12 +01:00
Silvan Mosberger
30af0cdab6 tests.nixpkgs-check-by-name: Test non-Nix invalid symlinks instead
Nix symlinks that are invalid don't pass the new CI check from
https://github.com/NixOS/nixpkgs/pull/279892, so let's instead use
non-Nix symlinks.
2024-01-17 15:50:24 +01:00
Silvan Mosberger
cf90aa9a86 tests.nixpkgs-check-by-name: Don't test invalid Nix files
Since https://github.com/NixOS/nixpkgs/pull/279892, there's a separate
check that makes sure all changed Nix files evaluate. To not trigger
that, we need to remove all invalid Nix expressions from the tests.
2024-01-17 15:50:21 +01:00
Silvan Mosberger
aba7e02e1c tests.nixpkgs-check-by-name: Minor README.md update 2024-01-17 11:10:54 +01:00
Keanu Kerr
28c4666e8b tests.nixpkgs-check-by-name: added test that fails multiple validity checks 2024-01-17 11:10:28 +01:00
Silvan Mosberger
9da57b5bd3 check-by-name/run-local.sh: Make it usable for non-CI platforms
Since https://github.com/NixOS/nixpkgs/pull/281374, the
nixpkgs-check-by-name tooling is pinned to a specific /nix/store path to
avoid having to evaluate Nixpkgs in CI.

The same path is used for local runs, but that doesn't actually work
when you're trying to run it on a platform different from CI.

This commit makes it work by being clearer about platforms and making
local runs check out the correct Nixpkgs to evaluate the tool from.
2024-01-17 10:45:23 +01:00
Silvan Mosberger
2dd7f0e8b9 tests.nixpkgs-check-by-name: Use NIX_PATH for extra test files
This avoids the need for a bunch of Rust code, but also enables us to
fairly easily make all the Nixpkgs tests evaluatable within the
nix-shell
2024-01-17 10:43:12 +01:00
Silvan Mosberger
64ad8b6836 tests.nixpkgs-check-by-name: Limit source files
To prevent more rebuilds than necessary
2024-01-17 10:40:03 +01:00
Silvan Mosberger
a48d8eafc6
Merge pull request #281390 from tweag/by-name-alias-fix
tests.nixpkgs-check-by-name: Fix for aliases to packages in `pkgs/by-name` and better testing
2024-01-17 10:37:42 +01:00
github-actions[bot]
a197d50282
Merge master into haskell-updates 2024-01-17 00:13:05 +00:00
Silvan Mosberger
6d5f575fd0 check-by-name: Remove legacy script
fetch-tool.sh was decommissioned in
https://github.com/NixOS/nixpkgs/pull/281374, see the removed comment
for why it can only be removed now
2024-01-16 21:50:34 +01:00
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
cc422e321e workflows/check-by-name: Pin nixpkgs-check-by-name tool
Before this, the tool for CI would update when nixos-unstable updated,
which is kind of terrible because you don't know when it happens, and it
might break master.

In fact, the tooling _right now_ has a serious bug and shouldn't be used!

This PR addresses this by _pinning_ the tooling in Nixpkgs itself.

Updating the tooling now requires two PRs:
- The first PR to update the tooling source
- (wait for Hydra to build and publish it in nixos-unstable)
- The second PR to update the pinned tooling

In turn you know exactly when the changes are going to take effect.

This change however has additional benefits:
- It makes CI more reproducible, because it doesn't depend on the state
  of nixos-unstable anymore
- Updates to the tooling can be tested with the workflow itself,
  because PRs that update the pinned tool will be tested on the updated
  version
- CI gets a sizable speed boost, because there's no need to download and
  evaluate a channel anymore
- It makes it more realistic to move the source of the tool into a
  separate repository
- It removes the brittle branch-specific logic that was previously
  needed to ensure that release branches use their own version of the
  tooling.
2024-01-16 19:58:19 +01:00
Doron Behar
3b6e224d12 tests.buildFHSEnv.libtinfo: fix by using overriden ncurses 2024-01-16 10:19:46 +02:00
github-actions[bot]
e0c9a6db2a
Merge master into haskell-updates 2024-01-16 00:13:07 +00: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
Dennis Gosnell
9cc4b19ee6
tests.haskell.shellFor: change from using linear to cereal
The current version of linear (1.22) has incorrect constraints in its
cabal file (which has been corrected in a revision), so it is causing
this test to fail.

This commit just switches to another arbitrary package (cereal) for the
tests.
2024-01-15 18:25:53 +09: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
Doron Behar
92a0043ecf tests.buildFHSEnv.libtinfo: init 2024-01-10 08:17:07 +02:00
Doron Behar
d3332be38c tests.buildFHSEnv.liblzma: init
Do so in a generalized manner.
2024-01-10 08:17:07 +02: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
Silvan Mosberger
79618ff8cb tests.nixpkgs-check-by-name: Improve docs, introduce "ratchet" term 2023-12-15 02:14:48 +01:00
Silvan Mosberger
413dd9c03e tests.nixpkgs-check-by-name: Minor improvements from review 2023-12-15 01:02:49 +01:00
Silvan Mosberger
53b43ce0e3 tests.nixpkgs-check-by-name: Fix and document behavior without --base
Previously, not passing `--base` would enforce the most strict checks.
While there's currently no actual violation of these stricter checks,
this does not match the previous behavior.

This won't matter once CI passes `--base`, the code handling the
optionality can be removed then.
2023-12-15 01:01:14 +01:00
Silvan Mosberger
bb08bfc2d3 tests.nixpkgs-check-by-name: Test for gradual transition
This implements the ability to test gradual transitions in check
strictness, and adds one such test for the empty non-auto-called
arguments check.
2023-12-14 04:05:03 +01:00
Silvan Mosberger
d487a975cc tests.nixpkgs-check-by-name: Gradual migration from base Nixpkgs
This implements the option for a gradual migration to stricter checks.
For now this is only done for the check against empty non-auto-called
callPackage arguments, but in the future this can be used to ensure all
new packages make use of `pkgs/by-name`.

This is implemented by adding a `--base <BASE_NIXPKGS>` flag, which then
compares the base nixpkgs against the main nixpkgs version, making sure
that there are no regressions.

The `--version` flag is removed. While it was implemented, it was never
used in CI, so this is fine.
2023-12-14 03:51:10 +01:00
Silvan Mosberger
a6ba4cae31 tests.nixpkgs-check-by-name: Intermediate refactor
This prepares the code base for the removal of the `--version` flag, to
be replaced with a flag that can specify a base version to compare the
main Nixpkgs against, in order to have gradual transitions to stricter
checks.

This refactoring does:
- Introduce the `version` module that can house the logic to increase
  strictness, with a `version::Nixpkgs` struct that contains the
  strictness conformity of a single Nixpkgs version
- Make the check return `version::Nixpkgs`
- Handle the behavior of the still-existing `--version` flag with `version::Nixpkgs`
- Introduce an intermediate `process` function to handle the top-level
  logic, especially useful in the next commit
2023-12-14 03:40:49 +01:00
Silvan Mosberger
e98d22851b tests.nixpkgs-check-by-name: Introduce result_map
Convenience function to run another validation over a successful validation result.

This will be usable in more locations in future commits, making the code
nicer.
2023-12-14 03:21:41 +01:00
Silvan Mosberger
b8e4d555b4 tests.nixpkgs-check-by-name: Minor refactor, allow more simultaneous problems
This makes it such that these two errors can both be thrown for a single
package:
- The attribute value not being a derivation
- The attribute not being a proper callPackage

The tests had to be adjusted to only throw the error they were testing
for
2023-12-14 03:13:36 +01:00
Connor Baker
8e800cedaf cudaPackages: move derivations to cuda-modules & support aarch64
cudaPackages.cuda_compat: ignore missing libs provided at runtime

cudaPackages.gpus: Jetson should never build by default

cudaPackages.flags: don't build Jetson capabilities by default

cudaPackages: re-introduce filter for pre-existing CUDA redist packages in overrides

cudaPackages: only recurseIntoAttrs for the latest of each major version

cudaPackages.nvccCompatabilities: use GCC 10 through CUDA 11.5 to avoid a GLIBC incompatability

cudaPackages.cutensor: acquire libcublas through cudatoolkit prior to 11.4

cudaPackages.cuda_compat: mark as broken on aarch64-linux if not targeting Jetson

cudaPackages.cutensor_1_4: fix build

cudaPackages: adjust use of autoPatchelfIgnoreMissingDeps

cudaPackages.cuda_nvprof: remove unecessary override to add addOpenGLRunpath

cudaPackages: use getExe' to avoid patchelf warning about missing meta.mainProgram

cudaPackages: fix evaluation with Nix 2.3

cudaPackages: fix platform detection for Jetson/non-Jetson aarch64-linux

python3Packages.tensorrt: mark as broken if required packages are missing

Note: evaluating the name of the derivation will fail if tensorrt is not present,
which is why we wrap the value in `lib.optionalString`.

cudaPackages.flags.getNixSystem: add guard based on jetsonTargets

cudaPackages.cudnn: use explicit path to patchelf

cudaPackages.tensorrt: use explicit path to patchelf
2023-12-07 16:45:54 +00:00
Martin Messer
6db9612204 rename: incremental -> checkpointed builds 2023-12-07 16:56:16 +01:00
Martin Messer
fc2e3fac61 doc: add section about checkpointed build 2023-12-07 16:55:36 +01:00
Martin Messer
c8afee88bf checkpointedBuild: fix tests for checkpointedBuild functions 2023-12-07 16:38:48 +01:00
Martin Messer
17e88c2890 checkpointedBuild: add checkpointed build test based on pkgs hello 2023-12-07 16:38:48 +01:00
sternenseemann
ae29d067ff llvmPackages_7: remove at 7.1.0 2023-12-04 19:42:57 +01:00
Adam Joseph
bffbf8bb53 test.cuda: fix broken eval 2023-11-30 09:36:05 +01:00
Jan Tojnar
bc41b2db3d makeHardcodeGsettingsPatch: Support applying patches
This is useful for replacing code that cannot be easily handled by the generator,
such as the tentative settings constructor in e-d-s.
2023-11-21 08:42:47 +01:00
Silvan Mosberger
6361b22370
Merge pull request #267048 from narang99/hariom/257748/check-by-name-msg
fix long error messages in nix-instantiate
2023-11-21 01:35:11 +01:00
Hariom Narang
ca97497bfd made EXPR_PATH point to local instead of store
- we need this behavior in dev shell
- the main build still uses the store file
2023-11-21 01:11:06 +05:30
Silvan Mosberger
809505b140
Merge pull request #268224 from tweag/by-name-reload
tests.nixpkgs-check-by-name: More reliable .envrc reloading
2023-11-19 16:10:40 +01:00
Artturi
0192fcc944
Merge pull request #268018 from amjoseph-nixpkgs/pr/testcase/267859 2023-11-19 02:28:42 +02:00
Silvan Mosberger
def5df923f tests.nixpkgs-check-by-name: More reliable .envrc reloading
See also https://github.com/nix-community/nix-direnv/issues/408 and https://github.com/nix-community/nix-direnv/pull/407
2023-11-18 04:54:05 +01:00
Raito Bezarius
9866a5be7e llvmPackages_5: drop
While using very old compilers is a fair usecase, it induces a maintenance churn as
we collect more and more LLVM versions for the LLVM maintainers.

Especially when we need to backport uniform changes to the whole tree,
furthermore, it consumes and waste CI resources.
2023-11-17 16:12:32 +01:00
Adam Joseph
7cb550b6fe tests.cross.sanity: add test case for #267859
This commit adds pkgs.spike, which internally uses
pkgsCross.riscv64-embedded.stdenv.cc, as a test case for the issue
reported in https://github.com/NixOS/nixpkgs/issues/267859
2023-11-16 20:01:40 -08:00
Vladimír Čunát
0fe5300699
Merge branch 'master' into staging-next 2023-11-16 09:49:24 +01:00
Artturin
a192137522 tests.cc-wrapper.supported: make it actually build the tests
it was building the stdenv only
2023-11-16 00:23:56 +02:00
Artturin
dabfaef444 tests.cc-wrapper: add atomics test
`-std=c++17` is for clang 5
2023-11-16 00:23:56 +02:00
Hariom Narang
437b2054f4 pass eval.nix as a file instead of expression
- passing it as expression gives large error messages
  which are not very readable
- this commits puts the file in nix-store
  and patches the final program to have access to
  the path to the file as env.
- We simply pass this file to nix-instantiate
2023-11-14 15:05:45 +05:30
github-actions[bot]
e112f9b8bb
Merge master into staging-next 2023-11-09 18:00:56 +00:00
Connor Baker
83d5298d37 cudaPackages.cuda-samples: alphabetize arguments 2023-11-09 14:48:17 +00:00
Connor Baker
b807a32c2c cudaPackages.cuda-samples: fix CMake build error on 12.2+ 2023-11-07 20:22:58 +00:00
Connor Baker
30be50b080 cudaPackages.cuda-samples: don't list package for unsupported CUDA version 2023-11-07 20:17:01 +00:00
Connor Baker
3441e3d32e cudaPackages_12_2.cuda-samples: init at 12.2 2023-11-07 20:03:14 +00:00
Connor Baker
98d0da512a cudaPackages_12_1.cuda-samples: init at 12.1 2023-11-07 20:02:57 +00:00
Connor Baker
3543eaf4ff cudaPackages.cuda-samples: use packages from cudaPackages scope; not top-level 2023-11-07 19:59:11 +00:00
Connor Baker
4eae7523f0 cudaPackages.cuda-samples: switch to autoAddOpenGLRunpathHook from manual addOpenGLRunpath 2023-11-07 19:56:47 +00:00
Connor Baker
25fa662d3e cudaPackages.cuda-samples: add CUDA team as maintainers 2023-11-07 19:55:50 +00:00
Connor Baker
0f414caa8f cudaPackages.cuda-samples: use finalAttrs instead of rec 2023-11-07 19:55:19 +00:00
github-actions[bot]
38bc2a577e
Merge master into staging-next 2023-11-07 00:02:31 +00:00
Dmitry Kalinkin
93b63a2cab
Merge pull request #265514 from xworld21/treewide-texlive-with-packages
treewide: switch to texlive.withPackages
2023-11-06 16:47:04 -05:00
Vincenzo Mantova
f5edeac421 tests.texlive.fixedHashes: ignore .tex attribute sets that are not derivations 2023-11-05 13:43:31 +00:00
Vincenzo Mantova
13cb90b5be tests.texlive: use texlive.pkgs.PKGNAME attribute set instead of texlive.PKGNAME.pkgs list 2023-11-05 11:54:55 +00:00
Vincenzo Mantova
9a5095a537 tests.texlive: replace texlive.combine with texlive.withPackages 2023-11-05 11:54:55 +00:00
github-actions[bot]
da4d99e016
Merge master into staging-next 2023-11-05 06:00:55 +00:00
Adam Joseph
510397a8fe test.cross.sanity: add qt5.qutebrowser, firefox 2023-11-05 00:55:16 +00:00
Vincenzo Mantova
80cd75f4cb texlive: export schemes at top level 2023-11-04 20:02:25 +00:00
github-actions[bot]
10d3ba75f0
Merge master into staging-next 2023-11-04 06:01:18 +00:00
Adam Joseph
72c279f477 lib.systems, test.cross.sanity: add test case for #264989
We have several cross-compilation bugs that show up if
hostPlatform!=buildPlatform yet
hostPlatform.config==buildPlatform.config.

These bugs have appeared and disappeared as we've fiddled with the
definition of equality for platform objects.  This commit adds a
clear-cut case where they are *not* equal and never will be, so we
can test it.
2023-11-04 05:57:34 +00:00
Artturin
70902269fd tests: fix eval failures 2023-11-04 00:52:15 +02:00
github-actions[bot]
41ef1f3277
Merge master into staging-next 2023-11-03 06:01:08 +00:00
Adam Joseph
297a971a16
tests.cross.sanity: add pkgs.pkgsMusl.pkgsCross.gnu64.hello (#262876) 2023-11-03 06:29:09 +02:00
github-actions[bot]
cd7af6170b
Merge master into staging-next 2023-11-01 18:01:01 +00:00
Dmitry Kalinkin
ec2e217c52
Merge pull request #250805 from xworld21/texlive-buildenv-minimal
texlive: overrideTeXConfig/withPackages
2023-11-01 13:29:10 -04:00
github-actions[bot]
7f11b9b46b
Merge master into staging-next 2023-10-30 12:01:05 +00:00
Silvan Mosberger
4651ac9bcd
Merge pull request #261939 from tweag/check-by-name-intermediate
`nixpkgs-check-by-name`: Intermediate error representation refactor
2023-10-30 12:49:04 +01:00
github-actions[bot]
519b7ea0c3
Merge master into staging-next 2023-10-28 12:01:19 +00:00
Eirik Wittersø
2fd6af1929 fetchFromBittorrent: Rename to fetchtorrent 2023-10-28 11:32:10 +01:00
github-actions[bot]
96132a216a
Merge master into staging-next 2023-10-26 18:01:02 +00:00
Vladimír Čunát
d811555465
Merge branch 'staging' into staging-next 2023-10-26 10:36:50 +02:00
nicoo
1cabb1c445 tests/stdenv: Check derivations with an MD5 outputHash fail to evaluate 2023-10-25 23:14:16 +00:00
Adam Joseph
425cac96bf gcc: create dummy crtstuff on S390 as well
This commit replicates the fix in
https://github.com/NixOS/nixpkgs/pull/258032 for S390 as well.

Co-authored-by: Artturi <Artturin@artturin.com>
2023-10-25 08:36:22 +00:00
Silvan Mosberger
7753969628 tests.nixpkgs-check-by-name: Remove PackageContext helper
Was not really necessary anymore
2023-10-24 20:02:15 +02:00
Silvan Mosberger
82e708c192 tests.nixpkgs-check-by-name: Custom Validation type and improvements
Co-authored-by: Wanja Hentze
2023-10-24 19:58:52 +02:00
Silvan Mosberger
03c58ad1d6 tests.nixpkgs-check-by-name: Minor doc updates 2023-10-24 01:18:46 +02:00
Silvan Mosberger
8be41ace99 tests.nixpkgs-check-by-name: Separate file for all problems
And introduce a function for some smaller indentation
2023-10-24 01:18:46 +02:00
Silvan Mosberger
eac0b69063 tests.nixpkgs-check-by-name: Redesign and document check_result functions 2023-10-24 01:18:44 +02:00
Silvan Mosberger
3d60440799 tests.nixpkgs-check-by-name: Remove error writer 2023-10-24 01:18:13 +02:00
Silvan Mosberger
e58bc75444 tests.nixpkgs-check-by-name: Remove Nixpkgs struct
Isn't necessary anymore with the refactoring
2023-10-24 01:18:13 +02:00
Silvan Mosberger
d65f3ddb89 tests.nixpkgs-check-by-name: Make reference check part of structural check 2023-10-24 01:18:13 +02:00
Silvan Mosberger
0475238ec0 tests.nixpkgs-check-by-name: Make structural check a global function 2023-10-24 01:18:12 +02:00
Silvan Mosberger
83b887504c tests.nixpkgs-check-by-name: Support for combining check results 2023-10-24 01:18:09 +02:00
Silvan Mosberger
bb89ca72df tests.nixpkgs-check-by-name: Refactor 2023-10-24 01:15:58 +02:00
Silvan Mosberger
571eaed155 tests.nixpkgs-check-by-name: Intermediate ShardNonDir error 2023-10-24 01:15:58 +02:00
Silvan Mosberger
b7ace0198c tests.nixpkgs-check-by-name: Intermediate InvalidShardName error 2023-10-24 01:15:58 +02:00
Silvan Mosberger
143e267ad2 tests.nixpkgs-check-by-name: Intermediate PackageNonDir error 2023-10-24 01:15:58 +02:00
Silvan Mosberger
935f82267a tests.nixpkgs-check-by-name: Intermediate CaseSensitiveDuplicate error 2023-10-24 01:15:58 +02:00
Silvan Mosberger
e7d9cc96ed tests.nixpkgs-check-by-name: Intermediate InvalidPackageName error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
b011d53bda tests.nixpkgs-check-by-name: Intermediate IncorrectShard error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
64f5eb616e tests.nixpkgs-check-by-name: Intermediate PackageNixNonExistent error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
e3979d14cd tests.nixpkgs-check-by-name: Intermediate PackageNixDir error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
4f17b9367d tests.nixpkgs-check-by-name: Intermediate UndefinedAttr error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
b688da8189 tests.nixpkgs-check-by-name: Intermediate WrongCallPackage error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
9a0ef88623 tests.nixpkgs-check-by-name: Intermediate NonDerivation error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
4897b63ae6 tests.nixpkgs-check-by-name: Intermediate Symlink errors 2023-10-24 01:15:57 +02:00
Silvan Mosberger
9a3abc4383 tests.nixpkgs-check-by-name: Intermediate CouldNotParseNix error 2023-10-24 01:15:57 +02:00
Silvan Mosberger
96f6a350fa tests.nixpkgs-check-by-name: Intermediate PathInterpolation error 2023-10-24 01:15:56 +02:00
Silvan Mosberger
a755aa7d02 tests.nixpkgs-check-by-name: Intermediate SearchPath error 2023-10-24 01:15:56 +02:00
Silvan Mosberger
ed56d74c08 tests.nixpkgs-check-by-name: Intermediate path reference errors 2023-10-24 01:15:56 +02:00
Silvan Mosberger
37f8f6681c tests.nixpkgs-check-by-name: Intermediate error type refactoring prep
Currently the tool prints problems right as it is checking the code
without an intermediate error representation. However for various reasons
it would be beneficial to have an intermediate error type:
- It makes the code cleaner, having all errors in one place
- It allows printing the error in different ways, e.g. for a future
  --json mode

This commit prepares for an incremental refactoring for an intermediate
error/problem representation. Most notable is that we want to be able to collect
multiple errors/problems and not just exit on the first one.

We introduce the type alias CheckResult and CheckError (later renamed to
NixpkgsProblem), where CheckError allows collecting multiple
CheckErrors using the utility function flatten_check_results (later
renamed to check_result::sequence)

The write_check_result function is only temporarily introduced to help
refactoring, it's removed again in later commits.
2023-10-24 01:11:57 +02:00
Vincenzo Mantova
7620b617e5 texlive: implement __overrideTeXConfig and withPackage
Implement new 'buildTeXEnv' to leverage multi-output packages and provide
__overrideTeXConfig/withPackages for modifying the configuration or adding
packages. The override mechanism is prefixed until stabilized.
2023-10-22 19:39:19 +01:00
github-actions[bot]
0fa884ae1f
Merge staging-next into staging 2023-10-22 06:01:35 +00:00
Martin Weinelt
8dfad60324
Merge pull request #257792 from NixOS/staging-next
staging-next 2023-09-28
2023-10-22 02:42:33 +02:00
github-actions[bot]
03248bf8af
Merge master into haskell-updates 2023-10-19 00:12:13 +00:00
github-actions[bot]
c12ce83e4e
Merge staging-next into staging 2023-10-18 18:01:38 +00:00
github-actions[bot]
de8dd334ab
Merge master into staging-next 2023-10-18 18:01:05 +00:00