about summary refs log tree commit diff
path: root/nix/buildGo
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2020-01-24T13·30+0000
committerVincent Ambo <tazjin@google.com>2020-01-24T22·18+0000
commitccbac831d326836b33a9f79b9e545d7bb247eb86 (patch)
treea29f95d451f654f37a41356b4a86fbeb5908cf6e /nix/buildGo
parentfb5f26e548dc74f49a1242d80d2b23feeef5645e (diff)
chore(buildGo): use lib.optionalString where applicable r/454
Diffstat (limited to 'nix/buildGo')
-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}