git.iko.soy/typeable/nixpkgs
on master help sign in
shfmt: install man page
commit1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f authorzowoq <59103226+zowoq@users.noreply.github.com> dateSat 31 Oct 2020, 09:22 (6 years ago) parent7030103
1 file changed+8−1
pkgs/tools/text/shfmt/default.nix+8−1
pkgs/tools/text/shfmt/default.nix+8−1
@@ -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";