@@ -1,4 +1,4 @@
1−{ lib, buildGoModule, fetchFromGitHub }:
1+{ lib, buildGoModule, fetchFromGitHub, installShellFiles, scdoc }:
22
33buildGoModule rec {
44 pname = "shfmt";
@@ -17,6 +17,13 @@ buildGoModule rec {
1717
1818 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1919
20+ nativeBuildInputs = [ installShellFiles scdoc ];
21+
22+ postBuild = ''
23+ scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1
24+ installManPage shfmt.1
25+ '';
26+
2027 meta = with lib; {
2128 homepage = "https://github.com/mvdan/sh";
2229 description = "A shell parser and formatter";