Skip to content

Commit

Permalink
make-tarball.nix: Fail if nixpkgs doesn't evaluate without warnings
Browse files Browse the repository at this point in the history
Commit 3d6110d added a well-meaning
warning message, which unfortunately would also show up each time
`nix-env -qa` was run. It has been since fixed, but let's add a check
to prevent such errors from reaching the nixpkgs channel in the future.
  • Loading branch information
dezgeg committed Oct 9, 2015
1 parent e8ca6b7 commit 1357c3d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkgs/top-level/make-tarball.nix
Expand Up @@ -49,12 +49,20 @@ releaseTools.sourceTarball rec {
exit 1
fi
# Check that all-packages.nix evaluates on a number of platforms.
# Check that all-packages.nix evaluates on a number of platforms without any warnings.
for platform in i686-linux x86_64-linux x86_64-darwin; do
header "checking pkgs/top-level/all-packages.nix on $platform"
NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system > /dev/null
-qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
if [ -s eval-warnings.log ]; then
echo "pkgs/top-level/all-packages.nix on $platform evaluated with warnings, aborting"
exit 1
fi
rm eval-warnings.log
NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system --meta --xml > /dev/null
Expand Down

0 comments on commit 1357c3d

Please sign in to comment.