about summary refs log tree commit diff
path: root/pkgs/test
Commit message (Collapse)AuthorAge
* check-by-name: Update pinned toolingSilvan Mosberger2024-03-06
| | | | Includes https://github.com/NixOS/nixpkgs/pull/290743
* Merge pull request #290743 from tweag/by-name-better-errorsSilvan Mosberger2024-03-02
|\
| * tests.nixpkgs-check-by-name: More inline format! argumentsSilvan Mosberger2024-03-01
| | | | | | | | | | | | 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
| * tests.nixpkgs-check-by-name: Use RelativePath for relative pathsSilvan Mosberger2024-03-01
| | | | | | | | Makes the code easier to understand and less error-prone
| * tests.nixpkgs-check-by-name: Better empty argument errorSilvan Mosberger2024-03-01
| |
| * tests.nixpkgs-check-by-name: Fix absolute path in errorsSilvan Mosberger2024-03-01
| |
| * tests.nixpkgs-check-by-name: Various minor improvementsSilvan Mosberger2024-03-01
| | | | | | | | Co-Authored-By: Philip Taron <philip.taron@gmail.com>
| * tests.nixpkgs-check-by-name: Fix internal docsSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Improve errors for new packagesSilvan Mosberger2024-02-23
| | | | | | | | Or rather, make it more consistent
| * tests.nixpkgs-check-by-name: More spaces in errorsSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Better error for empty second argSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: More consistent errorsSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Evaluate base and main branch in parallelSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Improve errors relating to the base branchSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Improve more errorsSilvan Mosberger2024-02-23
| |
| * tests.nixpkgs-check-by-name: Improve non-syntactic callPackage error moreSilvan Mosberger2024-02-22
| |
| * tests.nixpkgs-check-by-name: Improve error for wrong package fileSilvan Mosberger2024-02-22
| |
| * tests.nixpkgs-check-by-name: Better error for non-syntactic callPackageSilvan Mosberger2024-02-19
| |
| * tests.nixpkgs-check-by-name: Fix allowing non-path overridesSilvan Mosberger2024-02-19
| | | | | | | | | | | | | | | | | | 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.
| * tests.nixpkgs-check-by-name: Improve inherit detectionSilvan Mosberger2024-02-19
| | | | | | | | | | Detect inherit's better, such that a future commit can use this information in an error message
* | substitute: Deprecate `replacements`, introduce `replacementsList`Silvan Mosberger2024-02-29
| | | | | | | | | | | | | | Also: - Add tests - Treewide update - Improve docs
* | Merge pull request #290946 from ju1m/systemd-option-listWill Fancher2024-02-27
|\ \ | | | | | | nixos/systemd: merge unit options as lists when at least one value is a list
| * | nixos/systemd: merge unit options as lists when at least one value is a listJulien Moutinho2024-02-25
| | |
* | | Merge staging-next into staginggithub-actions[bot]2024-02-17
|\ \ \ | | |/ | |/|
| * | fetchPypiLegacy: add testDavHau2024-02-17
| |/
* | Merge pull request #255463 from ↵Rick van Schijndel2024-02-16
|\ \ | |/ |/| | | | | emilylange/stdenv/patch-shebangs-trailing-newline patch-shebangs: fix crash with shebang without trailing newline
| * patch-shebangs: fix crash with shebang without trailing newlineemilylange2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where `patchShebangs` crashes when trying to patch files that contain only a shebang (e.g. `#!/bin/bash`) (and nothing else) and do not end with a newline. Such file can be produced using `printf "#!/bin/bash" > example` or `echo -n "#!/bin/bash" > example`. I don't understand why one would want to create such files, as they do literally nothing, but the chromium tarball we are using started shipping some 🫠 Full reproducer: ```nix with import <nixpkgs> { }; stdenv.mkDerivation { dontUnpack = true; name = "patch-shebangs-no-trailing-newline-reproducer"; postPatch = '' printf "#!/bin/bash" > reproducer chmod +x reproducer patchShebangs reproducer ''; } ``` ``` ❯ nix-build reproducer.nix this derivation will be built: /nix/store/vmbshdkdk4a0bayw3wi21wvxyhzpcsy2-patch-shebangs-no-trailing-newline-reproducer.drv building '/nix/store/vmbshdkdk4a0bayw3wi21wvxyhzpcsy2-patch-shebangs-no-trailing-newline-reproducer.drv'... patching sources patching script interpreter paths in reproducer /nix/store/vr6wwdxkmyy44sg0gwxi10b8fc5zhwz0-stdenv-linux/setup: line 144: pop_var_context: head of shell_variables not a function context error: builder for '/nix/store/vmbshdkdk4a0bayw3wi21wvxyhzpcsy2-patch-shebangs-no-trailing-newline-reproducer.drv' failed with exit code 1; last 3 log lines: > patching sources > patching script interpreter paths in reproducer > /nix/store/vr6wwdxkmyy44sg0gwxi10b8fc5zhwz0-stdenv-linux/setup: line 144: pop_var_context: head of shell_variables not a function context For full logs, run 'nix log /nix/store/vmbshdkdk4a0bayw3wi21wvxyhzpcsy2-patch-shebangs-no-trailing-newline-reproducer.drv'. ```
* | check-by-name: Update pinned toolingSilvan Mosberger2024-02-12
| | | | | | | | Includes https://github.com/NixOS/nixpkgs/pull/287083
* | check-by-name: Update pinned toolSilvan Mosberger2024-02-09
| | | | | | | | Includes https://github.com/NixOS/nixpkgs/pull/285089
* | tests.nixpkgs-check-by-name: Test against sbcl-like regressionSilvan Mosberger2024-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a test to check that a commit like 0a3dab4af34e4d086931d82827bfc8760c3e3150 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
* | tests.nixpkgs-check-by-name: Improve codeSilvan Mosberger2024-02-08
| | | | | | | | | | | | | | | | | | | | - 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
* | tests.nixpkgs-check-by-name: More testsSilvan Mosberger2024-02-08
| | | | | | | | | | For some previously untested cases. In a future commit, those tests will also be adjusted slightly
* | Merge pull request #285089 from tweag/by-name-syntactic-callPackageSilvan Mosberger2024-02-05
|\ \ | | | | | | tests.nixpkgs-check-by-name: Syntactic `callPackage` detection and allow new package variants
| * | tests.nixpkgs-check-by-name: Refactor eval.rsSilvan Mosberger2024-02-05
| | | | | | | | | | | | There was too much indentation!
| * | tests.nixpkgs-check-by-name: Apply feedback from reviewSilvan Mosberger2024-02-05
| | | | | | | | | | | | | | | | | | https://github.com/NixOS/nixpkgs/pull/285089#pullrequestreview-1861099233 Many thanks, Philip Taron!
| * | tests.nixpkgs-check-by-name: Allow new package variantsSilvan Mosberger2024-01-30
| | |
| * | tests.nixpkgs-check-by-name: FormatSilvan Mosberger2024-01-30
| | | | | | | | | | | | | | | | | | | | | With `cargo fmt` Explicitly didn't do that for previous commits in order to keep the diff more easily reviewable
| * | tests.nixpkgs-check-by-name: Re-use nixFileCache moreSilvan Mosberger2024-01-30
| | | | | | | | | | | | | | | Makes the reference check use the nixFileCache instead of separately parsing and resolving paths
| * | tests.nixpkgs-check-by-name: Syntactic callPackage detectionSilvan Mosberger2024-01-30
| | | | | | | | | | | | | | | | | | | | | 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.
| * | tests.nixpkgs-check-by-name: LineIndex functionality, semantics, testsSilvan Mosberger2024-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | - `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
* | | Merge pull request #279844 from doronbehar/tests/buildFHSEnvAtemu2024-01-31
|\ \ \ | | | | | | | | tests.buildFHSEnv.libtinfo: init
| * | | tests.buildFHSEnv.libtinfo: fix by using overriden ncursesDoron Behar2024-01-16
| | | |
| * | | tests.buildFHSEnv.libtinfo: initDoron Behar2024-01-10
| | | |
| * | | tests.buildFHSEnv.liblzma: initDoron Behar2024-01-10
| | | | | | | | | | | | | | | | Do so in a generalized manner.
* | | | treewide: drop LLVM10annalee2024-01-30
| | | |
* | | | Merge pull request #283551 from a-n-n-a-l-e-e/llvmPackages_8-dropa-n-n-a-l-e-e2024-01-29
|\ \ \ \ | | | | | | | | | | treewide: drop LLVM8
| * | | | treewide: drop LLVM8annalee2024-01-25
| | |/ / | |/| |
* | | | check-by-name: Don't use -I in shebangSilvan Mosberger2024-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | check-by-name: Update pinned toolingSilvan Mosberger2024-01-29
| | | | | | | | | | | | | | | | Includes https://github.com/NixOS/nixpkgs/pull/283017
* | | | texlive: 2022-final -> 2023.20240114Vincenzo Mantova2024-01-27
| | | | | | | | | | | | | | | | Co-authored-by: apfelkuchen06 <apfelkuchen@hrnz.li>