1{ lib, buildGoModule, fetchFromGitHub }:
2
3buildGoModule rec {
4 pname = "goconst";
5 version = "1.7.1";
6
7 excludedPackages = [ "tests" ];
8
9 src = fetchFromGitHub {
10 owner = "jgautheron";
11 repo = "goconst";
12 rev = "v${version}";
13 sha256 = "sha256-GpOZJ5/5aNw1o8fk2RSAx200v6AZ+pbNu/25i8OSS1Y=";
14 };
15
16 vendorHash = null;
17
18 ldflags = [ "-s" "-w" ];
19
20 meta = with lib; {
21 description = "Find in Go repeated strings that could be replaced by a constant";
22 mainProgram = "goconst";
23 homepage = "https://github.com/jgautheron/goconst";
24 license = licenses.mit;
25 maintainers = with maintainers; [ kalbasit ];
26 platforms = platforms.linux ++ platforms.darwin;
27 };
28}