You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in pkgs/by-name/sw/switch-to-configuration-ng, I get:
if result/bin/nixpkgs-vet --base "$base" .; then
exit 0
else
exitCode=$?
echo "To run locally: ./ci/nixpkgs-vet.sh $GITHUB_BASE_REF https://github.com/$GITHUB_REPOSITORY.git"
echo "If you're having trouble, ping @NixOS/nixpkgs-vet"
exit "$exitCode"
fi
shell: /usr/bin/bash -e {0}
env:
mergedSha: ed7535a632177a6c51f0011a40445af80c0c1d2e
base: /tmp/tmp.oS66tb8QYG
TMPDIR: /home/runner/work/_temp
CLICOLOR_FORCE: 1
- pkgs/by-name/sw/switch-to-configuration-ng: File shell.nix at line 2 contains the path expression "../../../.." which may point outside the directory of that package.
This is undesirable because it creates dependencies between internal paths, making it harder to reorganise Nixpkgs in the future.
Alternatives include:
- If you are creating a new version of a package with a common file between versions, consider following the recommendation in https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name#recommendation-for-new-packages-with-multiple-versions.
- If the path being referenced could be considered a stable interface with multiple uses, consider exposing it via a `pkgs` attribute, then taking it as a attribute argument in package.nix.
- If the path being referenced is internal and has multiple uses, consider passing the file as an explicit `callPackage` argument in `pkgs/top-level/all-packages.nix`.
- If the path being referenced is internal and will need to be modified independently of the original, consider copying it into the pkgs/by-name/sw/switch-to-configuration-ng directory.
The nix-shell points to the toplevel of nixpkgs, so it should not produce this error.
The text was updated successfully, but these errors were encountered:
Mic92
changed the title
Incorrect warning for contains the path expression "../../../.." which may point outside the directory of that package.
Incorrect warning for "contains the path expression ... which may point outside the directory of that package"
Sep 24, 2024
In this pull request: NixOS/nixpkgs#344127
With the following nix-shell:
in
pkgs/by-name/sw/switch-to-configuration-ng
, I get:The nix-shell points to the toplevel of nixpkgs, so it should not produce this error.
The text was updated successfully, but these errors were encountered: