tests.nixpkgs-check-by-name: More consistent errors

This commit is contained in:
Silvan Mosberger 2024-02-23 01:53:45 +01:00
parent f5e9b88af4
commit eb1f01440a
6 changed files with 8 additions and 8 deletions

View File

@ -202,7 +202,7 @@ impl fmt::Display for NixpkgsProblem {
"
- Because {} exists, the attribute `pkgs.{package_name}` must be defined like
{package_name} = callPackage {} {{ /* ... */ }};
{package_name} = callPackage ./{} {{ /* ... */ }};
This is however not the case: A different `callPackage` is used.
It is defined in {}:{} as
@ -220,7 +220,7 @@ impl fmt::Display for NixpkgsProblem {
"
- Because {} exists, the attribute `pkgs.{package_name}` must be defined like
{package_name} = callPackage {} {{ /* ... */ }};
{package_name} = callPackage ./{} {{ /* ... */ }};
This is however not the case: The first callPackage argument is not right:
It is defined in {}:{} as
@ -255,7 +255,7 @@ impl fmt::Display for NixpkgsProblem {
"
- Because {} exists, the attribute `pkgs.{package_name}` must be defined like
{package_name} = callPackage {} {{ /* ... */ }};
{package_name} = callPackage ./{} {{ /* ... */ }};
This is however not the case.
It is defined in {}:{} as

View File

@ -1,6 +1,6 @@
- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like
foo = callPackage pkgs/by-name/fo/foo/package.nix { /* ... */ };
foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ };
This is however not the case: A different `callPackage` is used.
It is defined in all-packages.nix:5 as

View File

@ -1,6 +1,6 @@
- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like
foo = callPackage pkgs/by-name/fo/foo/package.nix { /* ... */ };
foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ };
This is however not the case.
It is defined in all-packages.nix:4 as

View File

@ -1,6 +1,6 @@
- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like
nonDerivation = callPackage pkgs/by-name/no/nonDerivation/package.nix { /* ... */ };
nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ };
This is however not the case.
It is defined in all-packages.nix:2 as

View File

@ -1,6 +1,6 @@
- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like
nonDerivation = callPackage pkgs/by-name/no/nonDerivation/package.nix { /* ... */ };
nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ };
This is however not the case: The first callPackage argument is not right:
It is defined in all-packages.nix:2 as

View File

@ -1,6 +1,6 @@
- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like
foo = callPackage pkgs/by-name/fo/foo/package.nix { /* ... */ };
foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ };
This is however not the case: The first callPackage argument is not right:
It is defined in all-packages.nix:3 as