aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/text/shfmt
diff options
context:
space:
mode:
authorNahum Shalman <nshalman@omniti.com>2016-06-15 14:39:43 +0000
committerNahum Shalman <nshalman@omniti.com>2016-06-16 00:18:15 +0000
commitd624b02e1eff21580b93970f03459fe0246600bb (patch)
tree721d86d13586ea3bf795d91601890e955638c69c /pkgs/tools/text/shfmt
parentac92273faab57442f58dbaa0068aad7725e5ed8b (diff)
Add new package "shfmt"
Diffstat (limited to 'pkgs/tools/text/shfmt')
-rw-r--r--pkgs/tools/text/shfmt/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix
new file mode 100644
index 000000000000..1c6dede0c54c
--- /dev/null
+++ b/pkgs/tools/text/shfmt/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+ name = "shfmt-${version}";
+ version = "2016-06-15";
+ rev = "233b276a55cdd4aaa4625893255382993bbb0533";
+
+ goPackagePath = "github.com/mvdan/sh";
+
+ src = fetchFromGitHub {
+ owner = "mvdan";
+ repo = "sh";
+ inherit rev;
+ sha256 = "09rq99gw2g6az6dmdg82nql8zp3c3mrqavqwvx76dirabzjhsbj6";
+ };
+
+ meta = with stdenv.lib; {
+ homepage = https://github.com/mvdan/sh;
+ description = "A shell parser and formatter";
+ longDescription = ''
+ shfmt formats shell programs. It can use tabs or any number of spaces to indent.
+ You can feed it standard input, any number of files or any number of directories to recurse into.
+ '';
+ };
+}