nixpkgs/pkgs/test/nixpkgs-check-by-name/tests
Silvan Mosberger 92284634ec tests.nixpkgs-check-by-name: Test against sbcl-like regression
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
2024-02-08 02:38:11 +01:00
..
aliases tests.nixpkgs-check-by-name: Don't error for pkgs/by-name aliases 2024-01-16 21:18:37 +01:00
broken-autocall tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
callPackage-syntax tests.nixpkgs-check-by-name: Syntactic callPackage detection 2024-01-30 21:53:59 +01:00
empty-base tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
incorrect-shard tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
internalCallPackage tests.nixpkgs-check-by-name: Improve code 2024-02-08 02:38:08 +01:00
invalid-package-name tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
invalid-shard-name tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
manual-definition tests.nixpkgs-check-by-name: Introduce a non-applicable ratchet state 2024-01-22 23:13:58 +01:00
missing-package-nix tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
move-to-non-by-name tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
multiple-failures tests.nixpkgs-check-by-name: Test non-Nix invalid symlinks instead 2024-01-17 15:50:24 +01:00
new-package-non-by-name tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
no-by-name tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
no-eval tests.nixpkgs-check-by-name: Don't enforce for fixed evals 2024-01-22 23:16:46 +01:00
non-attrs tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
non-derivation tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
non-syntactical-callPackage-by-name tests.nixpkgs-check-by-name: Test against sbcl-like regression 2024-02-08 02:38:11 +01:00
one-letter tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
only-callPackage-derivations tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
override-different-file tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
override-empty-arg tests.nixpkgs-check-by-name: Minorly more minimal test files 2024-01-22 22:58:33 +01:00
override-empty-arg-gradual tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
override-no-call-package tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
override-no-file tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
override-success tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
package-dir-is-file tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
package-nix-dir tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
package-variants tests.nixpkgs-check-by-name: Allow new package variants 2024-01-30 22:45:18 +01:00
ref-absolute tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
ref-escape tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
ref-nix-path tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
ref-path-subexpr tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
ref-success tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
shard-file tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
sorted-order tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
success tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
symlink-escape tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
symlink-invalid tests.nixpkgs-check-by-name: Test non-Nix invalid symlinks instead 2024-01-17 15:50:24 +01:00
unknown-location tests.nixpkgs-check-by-name: Improve code 2024-02-08 02:38:08 +01:00
uppercase tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
with-readme tests.nixpkgs-check-by-name: Improve lib path handling in tests 2024-01-15 18:34:16 +01:00
mock-nixpkgs.nix tests.nixpkgs-check-by-name: Don't error for pkgs/by-name aliases 2024-01-16 21:18:37 +01:00