diff options
Diffstat (limited to 'pkgs/top-level/make-tarball.nix')
-rw-r--r-- | pkgs/top-level/make-tarball.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index 16940761e6dcf..ccd7b89fc12d3 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -43,8 +43,10 @@ releaseTools.sourceTarball rec { echo 'abort "Illegal use of <nixpkgs> in Nixpkgs."' > $TMPDIR/barf.nix # Make sure that Nixpkgs does not use <nixpkgs> - if (find pkgs -type f -name '*.nix' -print | xargs grep '<nixpkgs\/'); then + badFiles=$(find pkgs -type f -name '*.nix' -print | xargs grep -l '^[^#]*<nixpkgs\/' || true) + if [[ -n $badFiles ]]; then echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself." + echo "The offending files: $badFiles" exit 1 fi |