diff --git a/pkgs/development/tools/errcheck/default.nix b/pkgs/development/tools/errcheck/default.nix new file mode 100644 index 000000000000..1ce49a4cbb9d --- /dev/null +++ b/pkgs/development/tools/errcheck/default.nix @@ -0,0 +1,29 @@ +{ buildGoPackage +, lib +, fetchFromGitHub +}: + +buildGoPackage rec { + name = "errcheck-${version}"; + version = "1.1.0"; + + goPackagePath = "github.com/kisielk/errcheck"; + excludedPackages = "\\(testdata\\)"; + + src = fetchFromGitHub { + owner = "kisielk"; + repo = "errcheck"; + rev = "v${version}"; + sha256 = "19vd4rxmqbk5lpiav3pf7df3yjlz0l0dwx9mn0gjq5f998iyhy6y"; + }; + + goDeps = ./deps.nix; + + meta = with lib; { + description = "errcheck is a program for checking for unchecked errors in go programs."; + homepage = https://github.com/kisielk/errcheck; + license = licenses.mit; + maintainers = with maintainers; [ kalbasit ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/development/tools/errcheck/deps.nix b/pkgs/development/tools/errcheck/deps.nix new file mode 100644 index 000000000000..8470c9e12aa6 --- /dev/null +++ b/pkgs/development/tools/errcheck/deps.nix @@ -0,0 +1,20 @@ +[ + { + goPackagePath = "github.com/kisielk/gotool"; + fetch = { + type = "git"; + url = "https://github.com/kisielk/gotool"; + rev = "80517062f582ea3340cd4baf70e86d539ae7d84d"; + sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn"; + }; + } + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "3a10b9bf0a52df7e992a8c3eb712a86d3c896c75"; + sha256 = "19f3dijcc54jnd7458jab2dgpd0gzccmv2qympd9wi8cc8jpnhws"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ee9fc5ccd29..deea7f6b57c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1313,6 +1313,8 @@ with pkgs; envsubst = callPackage ../tools/misc/envsubst { }; + errcheck = callPackage ../development/tools/errcheck { }; + eschalot = callPackage ../tools/security/eschalot { }; esptool = callPackage ../tools/misc/esptool { };