diff --git a/builder/default.nix b/builder/default.nix index 170d32b..2310fa5 100644 --- a/builder/default.nix +++ b/builder/default.nix @@ -260,7 +260,7 @@ let echo "$d" | grep -q "\(/_\|examples\|Godeps\|testdata\)" && return 0 [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && return 0 local OUT - if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" -v -p $NIX_BUILD_CORES $d 2>&1)"; then + if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" ''${ldflags:+-ldflags="$ldflags"} -v -p $NIX_BUILD_CORES $d 2>&1)"; then if echo "$OUT" | grep -qE 'imports .*?: no Go files in'; then echo "$OUT" >&2 return 1