diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-10-10 00:21:57 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-10-10 00:27:41 +0300 |
commit | 1357c3d5336de886452f957dc4841f50b59af3db (patch) | |
tree | 2f85d4720b6f3fa65ca4f8da53cfaffdf6fa5775 /pkgs/top-level/make-tarball.nix | |
parent | e8ca6b7a62428107d15810981efdef7cbe77c703 (diff) |
make-tarball.nix: Fail if nixpkgs doesn't evaluate without warnings
Commit 3d6110d2217f40225debc2f1902b0f22142e6f66 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.
Diffstat (limited to 'pkgs/top-level/make-tarball.nix')
-rw-r--r-- | pkgs/top-level/make-tarball.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index cc6e871033506..082262077a849 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -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 |