git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #10297 from dezgeg/pr-verify-tarball-warning-free

make-tarball.nix: Fail if nixpkgs doesn't evaluate without warnings

commit310d90085b05300f0262fcc1d35c4e3fe406fa69 authorPeter Simons <simons@cryp.to> dateTue 13 Oct 2015, 16:55 (11 years ago) parentf82603b1357c3d
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