summary refs log tree commit diff
path: root/pkgs/development/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r--pkgs/development/misc/newlib/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/misc/newlib/default.nix b/pkgs/development/misc/newlib/default.nix
index 4ec603f250d52..d162753608bdc 100644
--- a/pkgs/development/misc/newlib/default.nix
+++ b/pkgs/development/misc/newlib/default.nix
@@ -73,10 +73,12 @@ stdenv.mkDerivation (finalAttrs: {
       cd $out${finalAttrs.passthru.libdir}
 
       for f in librdimon.a libc.a libg.a; do
-        cp "$f" "''${f%%\.a}_nano.a"
+        # 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"
       done
     )
-  '';
+  '' + ''[ "$(find $out -type f | wc -l)" -gt 0 ] || (echo '$out is empty' 1>&2 && exit 1)'';
 
   passthru = {
     incdir = "/${stdenv.targetPlatform.config}/include";