From d624b02e1eff21580b93970f03459fe0246600bb Mon Sep 17 00:00:00 2001 From: Nahum Shalman Date: Wed, 15 Jun 2016 14:39:43 +0000 Subject: [PATCH] Add new package "shfmt" --- pkgs/tools/text/shfmt/default.nix | 25 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/tools/text/shfmt/default.nix 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 4560172e4e0b..9a82e37158e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14102,6 +14102,8 @@ in gtk = gtk3; }; + shfmt = callPackage ../tools/text/shfmt { }; + shutter = callPackage ../applications/graphics/shutter { }; simple-scan = callPackage ../applications/graphics/simple-scan { };