From 70ff4556082aff6722d1ce971ef2d6fd242e1b3d Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 4 Apr 2018 11:45:54 +0000 Subject: [PATCH] gron: init at 0.5.1 --- pkgs/development/tools/gron/default.nix | 32 ++++++++++++++++++++++ pkgs/development/tools/gron/deps.nix | 35 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 69 insertions(+) create mode 100644 pkgs/development/tools/gron/default.nix create mode 100644 pkgs/development/tools/gron/deps.nix diff --git a/pkgs/development/tools/gron/default.nix b/pkgs/development/tools/gron/default.nix new file mode 100644 index 000000000000..59f7360df2ae --- /dev/null +++ b/pkgs/development/tools/gron/default.nix @@ -0,0 +1,32 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "gron-${version}"; + version = "0.5.1"; + + owner = "tomnomnom"; + repo = "gron"; + goPackagePath = "github.com/${owner}/${repo}"; + + src = fetchFromGitHub { + inherit owner repo; + rev = "v${version}"; + sha256 = "1s688ynjddchviwbiggnfbw28s4wsff2941f4b1q1j7mfak7iym2"; + }; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + description = "Make JSON greppable!"; + longDescription = '' + gron transforms JSON into discrete assignments to make it easier to grep + for what you want and see the absolute 'path' to it. It eases the + exploration of APIs that return large blobs of JSON but have terrible + documentation. + ''; + homepage = "https://github.com/tomnomnom/gron"; + license = licenses.mit; + maintainers = [ maintainers.fgaz ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/development/tools/gron/deps.nix b/pkgs/development/tools/gron/deps.nix new file mode 100644 index 000000000000..c5b1feb888ae --- /dev/null +++ b/pkgs/development/tools/gron/deps.nix @@ -0,0 +1,35 @@ +[ + rec { + owner = "fatih"; + repo = "color"; + goPackagePath = "github.com/${owner}/${repo}"; + fetch = { + type = "git"; + url = "https://github.com/${owner}/${repo}"; + rev = "v1.6.0"; + sha256 = "0k1v9dkhrxiqhg48yqkwzpd7x40xx38gv2pgknswbsy4r8w644i7"; + }; + } + rec { + owner = "nwidger"; + repo = "jsoncolor"; + goPackagePath = "github.com/${owner}/${repo}"; + fetch = { + type = "git"; + url = "https://github.com/${owner}/${repo}"; + rev = "75a6de4340e59be95f0884b9cebdda246e0fdf40"; + sha256 = "0aiv42xijrqgrxfx6pfyrndpwqv8i1qwsk190jdczyjxlnki2nki"; + }; + } + rec { + owner = "pkg"; + repo = "errors"; + goPackagePath = "github.com/${owner}/${repo}"; + fetch = { + type = "git"; + url = "https://github.com/${owner}/${repo}"; + rev = "v0.8.0"; + sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 490f3b3f45bb..77ea8b7d5516 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2667,6 +2667,8 @@ with pkgs; inherit (xorg) libXdmcp; }; + gron = callPackage ../development/tools/gron { }; + groonga = callPackage ../servers/search/groonga { }; grub = callPackage_i686 ../tools/misc/grub {