From 219b9d5086678ac3b5332414f2153601937032f4 Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Fri, 16 Oct 2015 04:20:38 +0530 Subject: [PATCH] ruby-zoom: init at 4.1.0 From the website, https://gitlab.com/mjwhitta/zoom Zoom adds some convenience to ag/ack/grep by allowing you to quickly open your search results in your editor of choice. Also available as a ruby gem. https://rubygems.org/gems/ruby-zoom In addition to including the ruby-zoom tool, we also added a global override for the ruby-terminfo gem to handle the ncurses build time dependency. --- .../ruby-modules/gem-config/default.nix | 7 +++ pkgs/tools/text/ruby-zoom/Gemfile | 2 + pkgs/tools/text/ruby-zoom/Gemfile.lock | 25 ++++++++ pkgs/tools/text/ruby-zoom/default.nix | 18 ++++++ pkgs/tools/text/ruby-zoom/gemset.nix | 58 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 6 files changed, 112 insertions(+) create mode 100644 pkgs/tools/text/ruby-zoom/Gemfile create mode 100644 pkgs/tools/text/ruby-zoom/Gemfile.lock create mode 100644 pkgs/tools/text/ruby-zoom/default.nix create mode 100644 pkgs/tools/text/ruby-zoom/gemset.nix diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index a9b16f0db2c5..742c9e497575 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -141,6 +141,13 @@ in buildInputs = [ imagemagick pkgconfig which ]; }; + ruby-terminfo = attrs: { + buildInputs = [ ncurses ]; + buildFlags = [ + "--with-cflags=-I${ncurses.dev}/include" + "--with-ldflags=-L${ncurses.out}/lib" + ]; + }; rugged = attrs: { buildInputs = [ cmake pkgconfig openssl libssh2 zlib ]; }; diff --git a/pkgs/tools/text/ruby-zoom/Gemfile b/pkgs/tools/text/ruby-zoom/Gemfile new file mode 100644 index 000000000000..4bb5d8c175d7 --- /dev/null +++ b/pkgs/tools/text/ruby-zoom/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'ruby-zoom' diff --git a/pkgs/tools/text/ruby-zoom/Gemfile.lock b/pkgs/tools/text/ruby-zoom/Gemfile.lock new file mode 100644 index 000000000000..29d5fe1da5ba --- /dev/null +++ b/pkgs/tools/text/ruby-zoom/Gemfile.lock @@ -0,0 +1,25 @@ +GEM + remote: https://rubygems.org/ + specs: + djinni (2.0.1) + fagin (~> 0.1, >= 0.1.2) + ruby-terminfo (~> 0.1, >= 0.1.1) + fagin (0.1.2) + hilighter (0.1.7) + json_config (0.1.2) + ruby-terminfo (0.1.1) + ruby-zoom (4.1.0) + djinni (~> 2.0, >= 2.0.1) + hilighter (~> 0.1, >= 0.1.3) + json_config (~> 0.1, >= 0.1.2) + scoobydoo (~> 0.1, >= 0.1.4) + scoobydoo (0.1.4) + +PLATFORMS + ruby + +DEPENDENCIES + ruby-zoom + +BUNDLED WITH + 1.13.1 diff --git a/pkgs/tools/text/ruby-zoom/default.nix b/pkgs/tools/text/ruby-zoom/default.nix new file mode 100644 index 000000000000..eb3968a0db93 --- /dev/null +++ b/pkgs/tools/text/ruby-zoom/default.nix @@ -0,0 +1,18 @@ +{ lib, bundlerEnv, ruby, stdenv }: + +bundlerEnv { + pname = "ruby-zoom"; + + inherit ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + + meta = with lib; { + description = "Quickly open CLI search results in your favorite editor!"; + homepage = https://gitlab.com/mjwhitta/zoom; + license = with licenses; gpl3; + maintainers = with stdenv.lib.maintainers; [ vmandela ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/text/ruby-zoom/gemset.nix b/pkgs/tools/text/ruby-zoom/gemset.nix new file mode 100644 index 000000000000..7d3836a3c33a --- /dev/null +++ b/pkgs/tools/text/ruby-zoom/gemset.nix @@ -0,0 +1,58 @@ +{ + djinni = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0wl4q4qs1nyla5n2b2ys6n3i35gvli8xb8mxz2xv0ik306cikqm6"; + type = "gem"; + }; + version = "2.0.1"; + }; + fagin = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "17d419vkfr26gdbad97fg2ikskhn82vs3bnxlzd27w6lwyf13qxk"; + type = "gem"; + }; + version = "0.1.2"; + }; + hilighter = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1a9a9clgd6kx63a82msjzi6abznfqivsgmds7qaqwb1dsl1nznbh"; + type = "gem"; + }; + version = "0.1.7"; + }; + json_config = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "16q3q0j9s8w93lzxa7rrvh5wqk11np7s2nmgmdlrh8gl3w76xcz6"; + type = "gem"; + }; + version = "0.1.2"; + }; + ruby-terminfo = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"; + type = "gem"; + }; + version = "0.1.1"; + }; + ruby-zoom = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "132pk0zp3rayvvbccfs5ksigg9zpflp9734b4r0jz5aimmv2qpvp"; + type = "gem"; + }; + version = "4.1.0"; + }; + scoobydoo = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1w83zgip3qvh20pgqgcp9yp0k35ypn7ny0d61xcv1ik0r3ab8ga0"; + type = "gem"; + }; + version = "0.1.4"; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4402d1697638..8a27e2d07553 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10330,6 +10330,8 @@ in seyren = callPackage ../servers/monitoring/seyren { }; + ruby-zoom = callPackage ../tools/text/ruby-zoom { }; + sensu = callPackage ../servers/monitoring/sensu { ruby = ruby_2_1; };