From eb1f01440af0f73fdc8e4e214a9a8b70358df971 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 23 Feb 2024 01:53:45 +0100 Subject: [PATCH] tests.nixpkgs-check-by-name: More consistent errors --- pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs | 6 +++--- .../nixpkgs-check-by-name/tests/alt-callPackage/expected | 2 +- .../tests/non-syntactical-callPackage-by-name/expected | 2 +- .../tests/override-no-call-package/expected | 2 +- .../nixpkgs-check-by-name/tests/override-no-file/expected | 2 +- .../nixpkgs-check-by-name/tests/override-non-path/expected | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs b/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs index 54976306df32..808cda47cc1a 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs @@ -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 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected index 3abb613de096..80d79ecaba12 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected @@ -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 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected index d1a31336504a..5f914d1fce96 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected @@ -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 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected index 54d1eb51be34..f1fc4892b2ab 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected @@ -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 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected index a1980fdc08da..040d7c635f7a 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected @@ -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 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected index c8cb5be6d8ee..1f15c6473b4a 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected @@ -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