git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit1357c3d5336de886452f957dc4841f50b59af3db authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi> dateSat 10 Oct 2015, 00:21 (11 years ago) parente8ca6b7
1 file changed+10−2
pkgs/top-level/make-tarball.nix+10−2
pkgs/top-level/make-tarball.nix+10−2
@@ -49,12 +49,20 @@ releaseTools.sourceTarball rec {
4949 exit 1
5050 fi
5151
52− # Check that all-packages.nix evaluates on a number of platforms.
52+ # Check that all-packages.nix evaluates on a number of platforms without any warnings.
5353 for platform in i686-linux x86_64-linux x86_64-darwin; do
5454 header "checking pkgs/top-level/all-packages.nix on $platform"
55+
5556 NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
5657 --show-trace --argstr system "$platform" \
57− -qa --drv-path --system-filter \* --system > /dev/null
58+ -qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
59+
60+ if [ -s eval-warnings.log ]; then
61+ echo "pkgs/top-level/all-packages.nix on $platform evaluated with warnings, aborting"
62+ exit 1
63+ fi
64+ rm eval-warnings.log
65+
5866 NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
5967 --show-trace --argstr system "$platform" \
6068 -qa --drv-path --system-filter \* --system --meta --xml > /dev/null