make-tarball.nix: Fix <nixpkgs> check

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).

+3 -1
+3 -1
pkgs/top-level/make-tarball.nix
··· 43 43 echo 'abort "Illegal use of <nixpkgs> in Nixpkgs."' > $TMPDIR/barf.nix 44 44 45 45 # Make sure that Nixpkgs does not use <nixpkgs> 46 - if (find pkgs -type f -name '*.nix' -print | xargs grep '<nixpkgs\/'); then 46 + badFiles=$(find pkgs -type f -name '*.nix' -print | xargs grep -l '^[^#]*<nixpkgs\/' || true) 47 + if [[ -n $badFiles ]]; then 47 48 echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself." 49 + echo "The offending files: $badFiles" 48 50 exit 1 49 51 fi 50 52