From 13dedcf76ee734aa35285bc8f23e91b453233009 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Tue, 5 Apr 2022 21:06:06 +0000 Subject: [PATCH] pkgs/errcheck: 1.6.0 -> 20220325-e62617a, and go1.18 This updates errcheck to a newer version which has go1.18 support. There's no tagged release yet for this, but without this change, this package breaks under go1.18, so it seems worth updating before upstream tags. Related to #164320 The switch to 'subPackages' was added because 'testdata' contains a 'main_test.go' file which is not meant to be actually tested, and the default checkPhase will try to run 'cd testdata && go test' unless you do _something_ to override it. Since checkPhase doesn't respect 'excludedPackages', but does respect 'subPackages', this seemed like a reasonable way to do that. --- pkgs/development/tools/errcheck/default.nix | 13 +++++++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/errcheck/default.nix b/pkgs/development/tools/errcheck/default.nix index a387c14c0a5c944..eb8fd99f9e5a1cd 100644 --- a/pkgs/development/tools/errcheck/default.nix +++ b/pkgs/development/tools/errcheck/default.nix @@ -2,22 +2,23 @@ buildGoModule rec { pname = "errcheck"; - version = "1.6.0"; + version = "unstable-2022-03-26"; src = fetchFromGitHub { owner = "kisielk"; repo = "errcheck"; - rev = "v${version}"; - sha256 = "sha256-Przf2c2jFNdkUq7IOUD7ChXHiSayAz4xTsNzajycYZ0="; + rev = "e62617a91f7bd1abab2cbe7f28966188dd85eee0"; + sha256 = "sha256-RoPv6Odh8l9DF1S50pNEomLtI4uTDNjveOXZd4S52c0="; }; - vendorSha256 = "sha256-rluaBdW+w2zPThELlBwX/6LXDgc2aIk/ucbrsrABpVc="; + vendorSha256 = "sha256-fDugaI9Fh0L27yKSFNXyjYLMMDe6CRgE6kVLiJ3+Kyw="; + + subPackages = [ "." ]; meta = with lib; { - description = "Program for checking for unchecked errors in go programs"; + description = "Checks 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 21345ef8d88ae92..cd2ccf1b65cdd1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3095,7 +3095,9 @@ with pkgs; envsubst = callPackage ../tools/misc/envsubst { }; - errcheck = callPackage ../development/tools/errcheck { }; + errcheck = callPackage ../development/tools/errcheck { + buildGoModule = buildGo118Module; + }; eschalot = callPackage ../tools/security/eschalot { };