2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
2016-06-15 15:39:43 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "shfmt";
|
2019-04-07 14:26:50 +01:00
|
|
|
version = "2.6.4";
|
2016-06-15 15:39:43 +01:00
|
|
|
|
2019-04-07 14:26:50 +01:00
|
|
|
goPackagePath = "mvdan.cc/sh";
|
|
|
|
subPackages = ["cmd/shfmt"];
|
2016-06-15 15:39:43 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvdan";
|
|
|
|
repo = "sh";
|
2019-04-07 14:26:50 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1jifac0fi0sz6wzdgvk6s9xwpkdng2hj63ldbaral8n2j9km17hh";
|
2016-06-15 15:39:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
2018-08-04 17:38:46 +01:00
|
|
|
license = licenses.bsd3;
|
2016-06-15 15:39:43 +01:00
|
|
|
};
|
|
|
|
}
|