summary refs log tree commit diff
path: root/pkgs/tools/text/shfmt
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-10-31 09:22:22 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2020-10-31 09:59:37 +1000
commit1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f (patch)
treebe8a1a4935141cd106713d2234f8aefff2b97eda /pkgs/tools/text/shfmt
parent703010347ffff5a5280965512b357e4a74efa9ed (diff)
downloadnixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar.gz
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar.bz2
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar.lz
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar.xz
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.tar.zst
nixpkgs-1e20b2dce4213b6a79e7fb7d3e1c5dad0ef5430f.zip
shfmt: install man page
Diffstat (limited to 'pkgs/tools/text/shfmt')
-rw-r--r--pkgs/tools/text/shfmt/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix
index 694b1db58f5..1d1def43177 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";