Skip to content

Commit

Permalink
newlib-nano: Fix build
Browse files Browse the repository at this point in the history
The original check, while terse, causes the shell to exit after the
`for` loop if any file is non-existent.
  • Loading branch information
zhaofengli committed Jan 22, 2025
1 parent 5df4362 commit cf69ff8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/development/misc/newlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ stdenv.mkDerivation (finalAttrs: {
for f in librdimon.a libc.a libm.a libg.a libgloss.a; do
# Some libraries are only available for specific architectures.
# For example, librdimon.a is only available on ARM.
[ -f "$f" ] && cp "$f" "''${f%%\.a}_nano.a"
if [ -f "$f" ]; then
dst="''${f%%\.a}_nano.a"
>&2 echo "$f -> $dst"
cp "$f" "$dst"
fi
done
)
''
Expand Down

0 comments on commit cf69ff8

Please sign in to comment.