diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix index 694b1db58f5f..1d1def43177c 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, installShellFiles, scdoc }: buildGoModule rec { pname = "shfmt"; @@ -17,6 +17,13 @@ buildGoModule rec { buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + nativeBuildInputs = [ installShellFiles scdoc ]; + + postBuild = '' + scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 + installManPage shfmt.1 + ''; + meta = with lib; { homepage = "https://github.com/mvdan/sh"; description = "A shell parser and formatter";