about summary refs log tree commit diff
path: root/nix/buildGo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/buildGo/default.nix')
-rw-r--r--nix/buildGo/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix
index 140cbf2d9d16..8d790cbea2c9 100644
--- a/nix/buildGo/default.nix
+++ b/nix/buildGo/default.nix
@@ -72,7 +72,7 @@ let
     # assembly if the analyser detected any *.s files.
     #
     # This is required for several popular packages (e.g. x/sys).
-    ifAsm = do: if sfiles == [] then "" else do;
+    ifAsm = do: lib.optionalString (sfiles != []) do;
     asmBuild = ifAsm ''
       ${go}/bin/go tool asm -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -gensymabis -o ./symabis ${spaceOut sfiles}
       ${go}/bin/go tool asm -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -o ./asm.o ${spaceOut sfiles}