diff options
author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-02-08 00:02:45 +0100 |
---|---|---|
committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-02-08 00:02:45 +0100 |
commit | ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd (patch) | |
tree | d5c10f321477f1b3aba0eca8a88f814b307f0c32 /pkgs/test/nixpkgs-check-by-name | |
parent | 3b01c53180e241ddad92f000b3d2c77f323c7aa4 (diff) | |
download | nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar.gz nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar.bz2 nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar.lz nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar.xz nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.tar.zst nixlib-ebbe86306f2b3232c13e3cb0fce8c11ace55b6fd.zip |
tests.nixpkgs-check-by-name: More tests
For some previously untested cases. In a future commit, those tests will also be adjusted slightly
Diffstat (limited to 'pkgs/test/nixpkgs-check-by-name')
6 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/all-packages.nix b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/all-packages.nix index 95478a87fb32..3fbe2d5e51dc 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/all-packages.nix +++ b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/all-packages.nix @@ -1,3 +1,4 @@ self: super: { foo = self._internalCallByNamePackageFile ./foo.nix; + bar = self._internalCallByNamePackageFile ./foo.nix; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/pkgs/by-name/fo/foo/package.nix b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/pkgs/by-name/fo/foo/package.nix new file mode 100644 index 000000000000..a1b92efbbadb --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/pkgs/by-name/fo/foo/package.nix @@ -0,0 +1 @@ +{ someDrv }: someDrv diff --git a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/all-packages.nix b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/all-packages.nix new file mode 100644 index 000000000000..3398e974cb6b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/all-packages.nix @@ -0,0 +1,3 @@ +self: super: builtins.mapAttrs (name: value: value) { + foo = self.someDrv; +} diff --git a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/default.nix @@ -0,0 +1 @@ +import <test-nixpkgs> { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected new file mode 100644 index 000000000000..9df788191ece --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected @@ -0,0 +1 @@ +pkgs.foo: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/fo/foo/package.nix { ... }` with a non-empty second argument. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/pkgs/by-name/fo/foo/package.nix b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/pkgs/by-name/fo/foo/package.nix new file mode 100644 index 000000000000..a1b92efbbadb --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/pkgs/by-name/fo/foo/package.nix @@ -0,0 +1 @@ +{ someDrv }: someDrv |