about summary refs log tree commit diff
path: root/pkgs/development/tools/asmfmt
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-06-12 02:26:59 +0300
committerAzat Bahawi <azat@bahawi.net>2022-06-12 02:26:59 +0300
commit08f841f03d45c9858789940ec9267cfc1df5f828 (patch)
treeff3f9501e27c12c119b9e010573d472f4a175c78 /pkgs/development/tools/asmfmt
parent260653fe9bbe801c1e7a62880c6bdaea2cec7178 (diff)
asmfmt: use buildGoModule
Diffstat (limited to 'pkgs/development/tools/asmfmt')
-rw-r--r--pkgs/development/tools/asmfmt/default.nix21
-rw-r--r--pkgs/development/tools/asmfmt/deps.nix20
2 files changed, 14 insertions, 27 deletions
diff --git a/pkgs/development/tools/asmfmt/default.nix b/pkgs/development/tools/asmfmt/default.nix
index 81f7aa764f27c..953a5469ec51d 100644
--- a/pkgs/development/tools/asmfmt/default.nix
+++ b/pkgs/development/tools/asmfmt/default.nix
@@ -1,14 +1,12 @@
-{ buildGoPackage
+{ buildGoModule
 , lib
 , fetchFromGitHub
 }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "asmfmt";
   version = "1.3.2";
 
-  goPackagePath = "github.com/klauspost/asmfmt";
-
   src = fetchFromGitHub {
     owner = "klauspost";
     repo = "asmfmt";
@@ -16,17 +14,26 @@ buildGoPackage rec {
     sha256 = "sha256-YxIVqPGsqxvOY0Qz4Jw5FuO9IbplCICjChosnHrSCgc=";
   };
 
-  goDeps = ./deps.nix;
+  vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
 
   # This package comes with its own version of goimports, gofmt and goreturns
   # but these binaries are outdated and are offered by other packages.
   subPackages = [ "cmd/asmfmt" ];
 
+  ldflags = [ "-s" "-w" ];
+
+  # There are no tests.
+  doCheck = false;
+
   meta = with lib; {
-    description = "Go Assembler Formatter";
+    description = "Go assembler formatter";
+    longDescription = ''
+      This will format your assembler code in a similar way that gofmt formats
+      your Go code.
+    '';
     homepage = "https://github.com/klauspost/asmfmt";
+    changelog = "https://github.com/klauspost/asmfmt/releases/tag/${src.rev}";
     license = licenses.mit;
     maintainers = with maintainers; [ kalbasit ];
-    platforms = platforms.linux ++ platforms.darwin;
   };
 }
diff --git a/pkgs/development/tools/asmfmt/deps.nix b/pkgs/development/tools/asmfmt/deps.nix
deleted file mode 100644
index 0288fc206d492..0000000000000
--- a/pkgs/development/tools/asmfmt/deps.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-[
-  {
-    goPackagePath = "golang.org/x/tools";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/tools";
-      rev = "3a10b9bf0a52df7e992a8c3eb712a86d3c896c75";
-      sha256 = "19f3dijcc54jnd7458jab2dgpd0gzccmv2qympd9wi8cc8jpnhws";
-    };
-  }
-  {
-    goPackagePath = "sourcegraph.com/sqs/goreturns";
-    fetch = {
-      type = "git";
-      url = "https://github.com/sqs/goreturns";
-      rev = "538ac601451833c7c4449f8431d65d53c1c60e41";
-      sha256 = "0gcplch8zmcgwl6xvcffxg50g3xnf60n7dlqxgn51179qcjr354p";
-    };
-  }
-]