Check that nix-env output doesn't depend on the Nixpkgs location
This commit is contained in:
parent
e84e966bbd
commit
cb2f8a87d5
|
@ -19,15 +19,8 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure that derivation paths do not depend on the Nixpkgs path.
|
src2=$TMPDIR/foo
|
||||||
mkdir $TMPDIR/foo
|
cp -rd $src $src2
|
||||||
ln -s $(readlink -f $src) $TMPDIR/foo/bar
|
|
||||||
p1=$(nix-instantiate $src --dry-run -A firefox --show-trace)
|
|
||||||
p2=$(nix-instantiate $TMPDIR/foo/bar --dry-run -A firefox --show-trace)
|
|
||||||
if [ "$p1" != "$p2" ]; then
|
|
||||||
echo "Nixpkgs evaluation depends on Nixpkgs path ($p1 vs $p2)!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check that all-packages.nix evaluates on a number of platforms without any warnings.
|
# Check that all-packages.nix evaluates on a number of platforms without any warnings.
|
||||||
for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do
|
for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do
|
||||||
|
@ -42,7 +35,25 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
|
||||||
--arg config '{ allowAliases = false; }' \
|
--arg config '{ allowAliases = false; }' \
|
||||||
--option experimental-features 'no-url-literals' \
|
--option experimental-features 'no-url-literals' \
|
||||||
-qa --drv-path --system-filter \* --system \
|
-qa --drv-path --system-filter \* --system \
|
||||||
"''${opts[@]}" 2>&1 >/dev/null | tee eval-warnings.log
|
"''${opts[@]}" 2> eval-warnings.log > packages1
|
||||||
|
|
||||||
|
s1=$(sha1sum packages1 | cut -c1-40)
|
||||||
|
echo $s1
|
||||||
|
|
||||||
|
nix-env -f $src2 \
|
||||||
|
--show-trace --argstr system "$platform" \
|
||||||
|
--arg config '{ allowAliases = false; }' \
|
||||||
|
--option experimental-features 'no-url-literals' \
|
||||||
|
-qa --drv-path --system-filter \* --system \
|
||||||
|
"''${opts[@]}" > packages2
|
||||||
|
|
||||||
|
s2=$(sha1sum packages2 | cut -c1-40)
|
||||||
|
|
||||||
|
if [[ $s1 != $s2 ]]; then
|
||||||
|
echo "Nixpkgs evaluation depends on Nixpkgs path"
|
||||||
|
diff packages1 packages2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Catch any trace calls not caught by NIX_ABORT_ON_WARN (lib.warn)
|
# Catch any trace calls not caught by NIX_ABORT_ON_WARN (lib.warn)
|
||||||
if [ -s eval-warnings.log ]; then
|
if [ -s eval-warnings.log ]; then
|
||||||
|
|
Loading…
Reference in a new issue