shfmt: install man page

This commit is contained in:
zowoq 2020-10-31 09:22:22 +10:00
parent 703010347f
commit 1e20b2dce4

View File

@ -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";