chmod: cannot access '/nix/store/rawpkwl6b5h2qqv41w8yqgpayp89q9xa-rust-src-1.71.0-2023-07-12-8ede3aae2/bin/rustc': No such file or directory
because, indeed this file is not present in rust-src build output.
This commit moves the failing commands inside the conditional block so that they are only executed when the file is present.
\
\
After fixing the previous error the build failed with an error like
realpath: missing operand
because, bash shopt nullglob is enabled during build which leads to a non-existing glob matching pattern to be a null string and therefore the check with ls $out/lib/librustc_driver-*.so lists the whole directory and succeeds.
bash -c 'shopt -s nullglob; if ls $PWD/rust-o*.nixxxxxxxxxxx &> /dev/null ; then echo yes ; else echo no ; fi'
yes
This commit changes the check to compare the null string resulting from glob pattern match with nullglob enabled against another null string.
When building rust-src like in
the build failed since commit https://github.com/mozilla/nixpkgs-mozilla/commit/f6fe8508b0910b84b74c0e0bfa0ff8593e77d470 with an error like
because, indeed this file is not present in rust-src build output.
This commit moves the failing commands inside the conditional block so that they are only executed when the file is present. \ \ After fixing the previous error the build failed with an error like
because, bash shopt nullglob is enabled during build which leads to a non-existing glob matching pattern to be a null string and therefore the check with
ls $out/lib/librustc_driver-*.so
lists the whole directory and succeeds.This commit changes the check to compare the null string resulting from glob pattern match with nullglob enabled against another null string.