diff options
Diffstat (limited to 'pkgs/tools/text/shfmt/default.nix')
-rw-r--r-- | pkgs/tools/text/shfmt/default.nix | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix index ec58cbdd1a9..29a5a157a67 100644 --- a/pkgs/tools/text/shfmt/default.nix +++ b/pkgs/tools/text/shfmt/default.nix @@ -1,29 +1,28 @@ -{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, scdoc }: buildGoModule rec { pname = "shfmt"; - version = "3.1.2"; + version = "3.3.0"; src = fetchFromGitHub { owner = "mvdan"; repo = "sh"; rev = "v${version}"; - sha256 = "03zgi0rlra3gz8cbqwmhpjxsg5048anfc6ccd2w50fjhx6farsnv"; + sha256 = "sha256-pD1nkbBw5NBCyuhn2DYop2AR+1T8p6/zTa6FeWiya7Q="; }; - vendorSha256 = "1jq2x4yxshsy4ahp7nrry8dc9cyjj46mljs447rq57sgix4ndpq8"; + vendorSha256 = "sha256-euJYStN21xFYosouWYXpHN3MWCKR4NT8z6OSonM0HW8="; 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"; - }) - ]; + nativeBuildInputs = [ installShellFiles scdoc ]; + + postBuild = '' + scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 + installManPage shfmt.1 + ''; meta = with lib; { homepage = "https://github.com/mvdan/sh"; @@ -33,6 +32,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 ]; + maintainers = with maintainers; [ zowoq SuperSandro2000 ]; }; } |