2020-01-12 10:33:16 +03:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub }:
|
2016-06-15 17:39:43 +03:00
|
|
|
|
2020-01-12 10:33:16 +03:00
|
|
|
buildGoModule rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "shfmt";
|
2020-01-12 10:33:16 +03:00
|
|
|
version = "3.0.1";
|
2016-06-15 17:39:43 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvdan";
|
|
|
|
repo = "sh";
|
2019-04-07 16:26:50 +03:00
|
|
|
rev = "v${version}";
|
2020-01-12 10:33:16 +03:00
|
|
|
sha256 = "1y6n2xi8m579xksnnsdzb4zvcvij48kywjfqzp7qm43ni8g7w9a8";
|
2016-06-15 17:39:43 +03:00
|
|
|
};
|
|
|
|
|
2020-01-12 10:33:16 +03:00
|
|
|
modSha256 = "1ll2cxhgf8hh19wzdykgc81c4yfcp8bzmfaif08nvvb63rhjdb5y";
|
|
|
|
subPackages = ["cmd/shfmt"];
|
|
|
|
|
2016-06-15 17:39:43 +03: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 19:38:46 +03:00
|
|
|
license = licenses.bsd3;
|
2016-06-15 17:39:43 +03:00
|
|
|
};
|
|
|
|
}
|