1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
Commit graph

739 commits

Author SHA1 Message Date
David McFarland a7a6356c14 tests.dotnet.project-references: use dir instead of file output
This fixes an error in nixpkgs-review when it tries to pass this to
buildEnv:

error: The store path [...]project-references-test is a file and can't
be merged into an environment using pkgs.buildEnv! at [...]-builder.pl
line 122.
2024-06-02 16:53:42 -03:00
Weijia Wang d95b1060ca
Release NixOS 24.05 2024-05-31 20:17:44 +02:00
isabel 63aceac766 treewide: remove unused occurence of fetchFromGitHub argument 2024-05-30 05:56:07 +00:00
Ivan Trubach f7d8046fb8 buildDotnetModule: fix structured attributes support
This change refactors internal hooks used by buildDotnetModule to
support derivations with structured attributes. Note that this changes
variable names that the internal hooks expect.
2024-05-29 08:45:25 +03:00
github-actions[bot] 0184a255d7
Merge staging-next into staging 2024-05-13 18:01:35 +00:00
Gaetan Lepage 9c9f01b670 cudaPackagesGoogle: deprecate as only used by tensorflow 2024-05-12 17:23:53 +02:00
Peter Waller 3c03811683 llvmPackages_*.libcxx: include libcxxabi within libcxx
Key test case: nixpkgs#pkgsStatic.pkgsLLVM.ncurses

Prior to this patch, this fails with errors such as:

```
error: undefined symbol: __cxa_throw
```

I think this is a reasonable solution because in #292043, libcxxabi was
'merged into libcxx', however, the commit message suggests that only
dynamic linking was accounted for, because it says:

```
* linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
```

Whereas, I found that if I tried linking a "hello world" C++ program
with a static hostPlatform, it failed unless -lc++abi was passed.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-05-10 17:22:20 +02:00
Robert Hensing 837966790c tests.config: Simplify example
authy was about to be removed, so this test had to be updated.
2024-04-24 12:46:23 +02:00
Jade Lovelace 78945a827c stdenv: make inputDerivation never fixed-output
This fixes using inputDerivation on derivations that are fixed-output.

Previously:

```
nix-repl> drv = runCommand "huh" { outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; outputHashAlgo = "sha256"; outputHashType = "flat"; } "touch $out"

nix-repl> drv.inputDerivation
«derivation /nix/store/d8mjs6cmmvsr1fv7psm6imis5pmh9bcs-huh.drv»

nix-repl> :b drv.inputDerivation
error: fixed output derivation 'huh' is not allowed to refer to other store paths.
       You may need to use the 'unsafeDiscardReferences' derivation attribute, see the manual for more details.
```

Fixes: https://github.com/NixOS/nixpkgs/issues/304209
2024-04-15 00:52:28 -07:00
infinixbot af887c78d2 nixpkgs-check-by-name: 0.1.0 -> 0.1.1
https://github.com/NixOS/nixpkgs-check-by-name/releases/tag/0.1.1
2024-04-10 15:11:05 +00:00
Tristan Ross b1ef46706f
llvmPackages_9: remove due to age 2024-04-08 22:39:53 -07:00
Dmitry Kalinkin ce426df9bb
Merge pull request #294826 from xworld21/texlive-install-tl
texlive.withPackages: replace postBuild with install-tl like script
2024-03-31 16:43:12 -04:00
Vincenzo Mantova 87216540ef tests.texlive.context: check that the PDF has been created 2024-03-29 13:04:00 +00:00
Vincenzo Mantova 7ab4733846 tests.texlive.fmtutilCnf: remove
The fmtutilCnf test does not fit the new way of generating fmtutil.cnf.
2024-03-29 13:04:00 +00:00
Silvan Mosberger 56837f26e2 tests.nixpkgs-check-by-name: Remove now that a separate repo is used
Since https://github.com/NixOS/nixpkgs/pull/297901, the tool is fetched
from https://github.com/NixOS/nixpkgs-check-by-name, so there's no need
to keep it around in Nixpkgs anymore
2024-03-26 21:37:07 +01:00
Silvan Mosberger b42fbdd7ea check-by-name: Remove now-unnecessary scripts/pinned-tool.json
It was not removed in https://github.com/NixOS/nixpkgs/pull/297901 so
that CI for that PR itself would not fail since CI runs from the base
branch.
2024-03-26 21:36:43 +01:00
Silvan Mosberger f7ea336cb2 workflows/check-by-name.yml: Switch to new separate repo
The nixpkgs-check-by-name tooling is [being moved](https://github.com/NixOS/nixpkgs/issues/286559#issuecomment-2000466124)
to a [separate repo](https://github.com/NixOS/nixpkgs-check-by-name).

This commit updates Nixpkgs CI to use it instead of the tree inside
Nixpkgs

No changes have been made to the tooling locally since it was moved:
- [Exported history](55bf02190e/pkgs/test/nixpkgs-check-by-name)
- [Imported history](d579e1821d/)
2024-03-26 21:24:48 +01:00
annalee ca5e01c3f4
treewide: drop LLVM11 2024-03-19 14:54:23 +00:00
Silvan Mosberger 1f75612fd5
Merge pull request #296324 from willbush/by-name-update-envc
check-by-name: Update .envrc to avoid using deprecated command
2024-03-18 02:35:14 +01:00
Will Bush d7750c43b2
check-by-name: Update .envrc to remove deprecated command
Noticed the following warning:

```
direnv: `nix_direnv_watch_file` is deprecated - use `watch_file`
```

Which seems to come from here:

6455f38a8d/direnvrc (L207)

Seems this check is no longer needed

check-by-name: Remove check from .envrc

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-03-16 20:45:09 -05:00
github-actions[bot] 87dfdf055e
Merge master into haskell-updates 2024-03-12 00:12:17 +00:00
Silvan Mosberger ec758e1f6f check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/290743
2024-03-06 05:33:01 +01:00
github-actions[bot] b74f04cf79
Merge master into haskell-updates 2024-03-03 00:13:21 +00:00
Silvan Mosberger 4b8265ab7f
Merge pull request #290743 from tweag/by-name-better-errors 2024-03-02 02:28:37 +01:00
Silvan Mosberger fb0a07229f tests.nixpkgs-check-by-name: More inline format! arguments
Now that the previous commit removed all the .display()'s that were
previously necessary for PathBuf's, but now aren't for RelativePathBuf,
we can also inline the format! arguments
2024-03-01 23:07:37 +01:00
Silvan Mosberger 5981aff212 tests.nixpkgs-check-by-name: Use RelativePath for relative paths
Makes the code easier to understand and less error-prone
2024-03-01 23:07:34 +01:00
Silvan Mosberger 7858f06288 tests.nixpkgs-check-by-name: Better empty argument error 2024-03-01 01:50:05 +01:00
Silvan Mosberger f056449c46 tests.nixpkgs-check-by-name: Fix absolute path in errors 2024-03-01 01:42:28 +01:00
Silvan Mosberger 2e8d778994 tests.nixpkgs-check-by-name: Various minor improvements
Co-Authored-By: Philip Taron <philip.taron@gmail.com>
2024-03-01 01:12:11 +01:00
github-actions[bot] 47e7b83fd1
Merge master into haskell-updates 2024-02-29 00:12:06 +00:00
Silvan Mosberger cd5dc76d83 substitute: Deprecate replacements, introduce replacementsList
Also:
- Add tests
- Treewide update
- Improve docs
2024-02-29 00:35:27 +01:00
Will Fancher f5622df470
Merge pull request #290946 from ju1m/systemd-option-list
nixos/systemd: merge unit options as lists when at least one value is a list
2024-02-27 20:49:39 -05:00
Julien Moutinho 7d0c812963 nixos/systemd: merge unit options as lists when at least one value is a list 2024-02-25 01:20:29 +01:00
github-actions[bot] 257171f024
Merge master into haskell-updates 2024-02-25 00:13:49 +00:00
Silvan Mosberger 64da6178bf tests.nixpkgs-check-by-name: Fix internal docs 2024-02-23 02:32:27 +01:00
Silvan Mosberger d2fa5bafa9 tests.nixpkgs-check-by-name: Improve errors for new packages
Or rather, make it more consistent
2024-02-23 02:17:47 +01:00
Silvan Mosberger ce271786de tests.nixpkgs-check-by-name: More spaces in errors 2024-02-23 02:16:49 +01:00
Silvan Mosberger 1c4308c352 tests.nixpkgs-check-by-name: Better error for empty second arg 2024-02-23 01:54:05 +01:00
Silvan Mosberger eb1f01440a tests.nixpkgs-check-by-name: More consistent errors 2024-02-23 01:53:45 +01:00
Silvan Mosberger f5e9b88af4 tests.nixpkgs-check-by-name: Evaluate base and main branch in parallel 2024-02-23 01:25:34 +01:00
Silvan Mosberger db7562e886 tests.nixpkgs-check-by-name: Improve errors relating to the base branch 2024-02-23 01:05:26 +01:00
Silvan Mosberger 75cdccd6c4 tests.nixpkgs-check-by-name: Improve more errors 2024-02-23 00:10:20 +01:00
Silvan Mosberger 7258d472bc tests.nixpkgs-check-by-name: Improve non-syntactic callPackage error more 2024-02-22 23:43:02 +01:00
Silvan Mosberger a53b07e252 tests.nixpkgs-check-by-name: Improve error for wrong package file 2024-02-22 23:04:40 +01:00
Silvan Mosberger 24069b982d tests.nixpkgs-check-by-name: Better error for non-syntactic callPackage 2024-02-19 23:42:34 +01:00
Silvan Mosberger a61c8c9f5c tests.nixpkgs-check-by-name: Fix allowing non-path overrides
An edge case was allowed when it shouldn't be: A package defined in
`pkgs/by-name` could be overridden in `all-packages.nix` if it was of
the form `callPackage (<expr>) { <non-empty> }`.

This is not right, it's required that the first argument be the path
matching the package to be overridden.
2024-02-19 23:41:59 +01:00
Silvan Mosberger 712ac796e5 tests.nixpkgs-check-by-name: Improve inherit detection
Detect inherit's better, such that a future commit can use this
information in an error message
2024-02-19 22:02:27 +01:00
github-actions[bot] 743ad436a7
Merge master into haskell-updates 2024-02-18 00:13:34 +00:00
github-actions[bot] e662338182
Merge staging-next into staging 2024-02-17 12:01:31 +00:00
DavHau 81d43b9b83 fetchPypiLegacy: add test 2024-02-17 17:11:59 +13:00
Rick van Schijndel b728d76d0e
Merge pull request #255463 from emilylange/stdenv/patch-shebangs-trailing-newline
patch-shebangs: fix crash with shebang without trailing newline
2024-02-16 18:33:27 +01:00
github-actions[bot] ed9046f8aa
Merge master into haskell-updates 2024-02-13 00:13:09 +00:00
Silvan Mosberger ea4cd5c63d check-by-name: Update pinned tooling
Includes https://github.com/NixOS/nixpkgs/pull/287083
2024-02-12 02:23:40 +01:00
github-actions[bot] 63f3a9268c
Merge master into haskell-updates 2024-02-10 00:12:04 +00:00
Silvan Mosberger 50fcc65142 check-by-name: Update pinned tool
Includes https://github.com/NixOS/nixpkgs/pull/285089
2024-02-09 03:06:05 +01:00
github-actions[bot] ae051d93c2
Merge master into haskell-updates 2024-02-09 00:12:19 +00:00
Silvan Mosberger 92284634ec tests.nixpkgs-check-by-name: Test against sbcl-like regression
This adds a test to check that a commit like 0a3dab4af3 would fail CI

After doing some improvements to the `pkgs/by-name` check I discovered
that sbcl shouldn't have been allowed in `pkgs/by-name` after all as is.

Specifically, the requirement is that if `pkgs/by-name/sb/sbcl` exists,
the definition of the `sbcl` attribute must look like

    sbcl = callPackage ../by-name/sb/sbcl/package.nix { ... };

However it currently is an alias like

    sbcl = sbcl_2_4_1;

This wasn't detected before because `sbcl_2_4_1` was semantically
defined using `callPackage`:

    sbcl_2_4_1 = wrapLisp {
      pkg = callPackage ../development/compilers/sbcl { version = "2.4.1"; };
      faslExt = "fasl";
      flags = [ "--dynamic-space-size" "3000" ];
    };

However this doesn't syntactically match what is required.

In https://github.com/NixOS/nixpkgs/pull/285089 I introduced syntactic
checks for exactly this, but they were only used for packages not
already in `pkgs/by-name`.

Only now that I'm doing the refactoring to also use this check for
`pkgs/by-name` packages this problem is noticed.

While introducing this new check is technically an increase in
strictness, and therefore would justify adding a new ratchet, I consider
this case to be rare enough that we don't need to do that.

This commit introduces a test to prevent such regressions in the
future

Moving sbcl back out of `pkgs/by-name` will be done when the pinned CI is updated
2024-02-08 02:38:11 +01:00
Silvan Mosberger 89a7afabf8 tests.nixpkgs-check-by-name: Improve code
- Detect manual use of _internalCallByNamePackageFile for packages in
  `pkgs/by-name` (can't be done for others though)
- Separate error message for when attribute locations can't be
  determined for `pkgs/by-name` attributes
- Much better structure of the code in eval.rs, representing more
  closely what is being checked
- Much more extensive comments
2024-02-08 02:38:08 +01:00
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