From d559c776a1308662651fd032a1ad10b01736168a Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 21 Aug 2020 16:28:54 +1000 Subject: [PATCH] shfmt: fix failing test on go 1.15 --- pkgs/tools/text/shfmt/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix index 43c945ac769..ec58cbdd1a9 100644 --- a/pkgs/tools/text/shfmt/default.nix +++ b/pkgs/tools/text/shfmt/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: buildGoModule rec { pname = "shfmt"; @@ -17,6 +17,14 @@ buildGoModule rec { buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + patches = [ + # fix failing test on go 1.15, remove with > 3.1.2 + (fetchpatch { + url = "https://github.com/mvdan/sh/commit/88956f97dae1f268af6c030bf2ba60762ebb488a.patch"; + sha256 = "1zg8i7kklr12zjkaxh8djd2bzkdx8klgfj271r2wivkc2x61shgv"; + }) + ]; + meta = with lib; { homepage = "https://github.com/mvdan/sh"; description = "A shell parser and formatter";