nixpkgs-suyu/pkgs/tools/text/shfmt/default.nix

28 lines
818 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
2016-06-15 16:39:43 +02:00
2020-01-12 08:33:16 +01:00
buildGoModule rec {
pname = "shfmt";
version = "3.1.1";
2016-06-15 16:39:43 +02:00
src = fetchFromGitHub {
owner = "mvdan";
repo = "sh";
rev = "v${version}";
sha256 = "0zlk1jjk65jwd9cx0xarz4yg2r2h86kd5g00gcnsav6dp6rx3aw8";
2016-06-15 16:39:43 +02:00
};
vendorSha256 = "1jq2x4yxshsy4ahp7nrry8dc9cyjj46mljs447rq57sgix4ndpq8";
2020-01-12 08:33:16 +01:00
subPackages = ["cmd/shfmt"];
2020-04-08 02:59:35 +02:00
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
meta = with lib; {
homepage = "https://github.com/mvdan/sh";
2016-06-15 16:39:43 +02:00
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 18:38:46 +02:00
license = licenses.bsd3;
2016-06-15 16:39:43 +02:00
};
}