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. + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9f1acce76ba..89a3f4427f57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14104,6 +14104,8 @@ in gtk = gtk3; }; + shfmt = callPackage ../tools/text/shfmt { }; + shutter = callPackage ../applications/graphics/shutter { }; simple-scan = callPackage ../applications/graphics/simple-scan { };