diff --git a/pkgs/development/tools/htmltest/default.nix b/pkgs/development/tools/htmltest/default.nix
index f64c8f04a15d..06e92e3639f9 100644
--- a/pkgs/development/tools/htmltest/default.nix
+++ b/pkgs/development/tools/htmltest/default.nix
@@ -16,6 +16,12 @@ buildGoModule rec {
vendorSha256 = "0zx3ii9crick647kslzwg4d39li6jds938f9j9dp287rhrlzjfbm";
+ ldflags = [
+ "-w"
+ "-s"
+ "-X main.version=${version}"
+ ];
+
# tests require network access
doCheck = false;