This was broken by 6bcf1944494973029071411bb378d4262ce2a678, which caused the result of the check to be ignored (since xargs will return a non-zero exit status if *any* grep doesn't find a match).
···43 echo 'abort "Illegal use of <nixpkgs> in Nixpkgs."' > $TMPDIR/barf.nix
4445 # Make sure that Nixpkgs does not use <nixpkgs>
46- if (find pkgs -type f -name '*.nix' -print | xargs grep '<nixpkgs\/'); then
047 echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself."
048 exit 1
49 fi
50
···43 echo 'abort "Illegal use of <nixpkgs> in Nixpkgs."' > $TMPDIR/barf.nix
4445 # Make sure that Nixpkgs does not use <nixpkgs>
46+ badFiles=$(find pkgs -type f -name '*.nix' -print | xargs grep -l '^[^#]*<nixpkgs\/' || true)
47+ if [[ -n $badFiles ]]; then
48 echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself."
49+ echo "The offending files: $badFiles"
50 exit 1
51 fi
52