about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/asmfmt/default.nix
blob: 1c22f3ea1781104e10694831874e10a46ade8739 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ buildGoModule
, lib
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "asmfmt";
  version = "1.3.2";

  src = fetchFromGitHub {
    owner = "klauspost";
    repo = "asmfmt";
    rev = "v${version}";
    sha256 = "sha256-YxIVqPGsqxvOY0Qz4Jw5FuO9IbplCICjChosnHrSCgc=";
  };

  vendorHash = null;

  # 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";
    mainProgram = "asmfmt";
    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 ];
  };
}