aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/text/shfmt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/shfmt/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/shfmt/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/text/shfmt/default.nix b/nixpkgs/pkgs/tools/text/shfmt/default.nix
index ab96392a95d..ec58cbdd1a9 100644
--- a/nixpkgs/pkgs/tools/text/shfmt/default.nix
+++ b/nixpkgs/pkgs/tools/text/shfmt/default.nix
@@ -1,21 +1,30 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoModule rec {
pname = "shfmt";
- version = "3.1.1";
+ version = "3.1.2";
src = fetchFromGitHub {
owner = "mvdan";
repo = "sh";
rev = "v${version}";
- sha256 = "0zlk1jjk65jwd9cx0xarz4yg2r2h86kd5g00gcnsav6dp6rx3aw8";
+ sha256 = "03zgi0rlra3gz8cbqwmhpjxsg5048anfc6ccd2w50fjhx6farsnv";
};
vendorSha256 = "1jq2x4yxshsy4ahp7nrry8dc9cyjj46mljs447rq57sgix4ndpq8";
- subPackages = ["cmd/shfmt"];
+
+ subPackages = [ "cmd/shfmt" ];
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";
@@ -24,5 +33,6 @@ buildGoModule rec {
You can feed it standard input, any number of files or any number of directories to recurse into.
'';
license = licenses.bsd3;
+ maintainers = with maintainers; [ zowoq ];
};
-} \ No newline at end of file
+}