From 24e0fc99f9fecc817d917944f937648c7de119f2 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 24 Jan 2016 23:27:06 +0000 Subject: [PATCH 1/2] buildRubyGem: remove unecessary duplication --- .../ruby/build-ruby-gem/default.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix index c5b9fba37aa0..effd343ecfd9 100644 --- a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix +++ b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix @@ -50,24 +50,24 @@ lib.makeOverridable ( , passthru ? {} , ...} @ attrs: -if ! builtins.elem type [ "git" "gem" ] -then throw "buildRubyGem: don't know how to build a gem of type \"${type}\"" -else - let shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'"; rubygems = (attrs.rubygems or defs.rubygems).override { inherit ruby; }; src = attrs.src or ( - if type == "gem" - then fetchurl { - urls = map (remote: "${remote}/gems/${gemName}-${version}.gem") remotes; - inherit (attrs) sha256; - } else fetchgit { - inherit (attrs) url rev sha256 fetchSubmodules; - leaveDotGit = true; - } + if type == "gem" then + fetchurl { + urls = map (remote: "${remote}/gems/${gemName}-${version}.gem") remotes; + inherit (attrs) sha256; + } + else if type == "git" then + fetchgit { + inherit (attrs) url rev sha256 fetchSubmodules; + leaveDotGit = true; + } + else + throw "buildRubyGem: don't know how to build a gem of type \"${type}\"" ); documentFlag = if document == [] From a92c609ec6428cedd816229f739b0aa28addde2a Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 25 Jan 2016 10:22:00 +0000 Subject: [PATCH 2/2] gemconfig: add eventmachine and msgpack --- pkgs/development/interpreters/ruby/gemconfig/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/interpreters/ruby/gemconfig/default.nix b/pkgs/development/interpreters/ruby/gemconfig/default.nix index 787c3be54e35..dd4ae725095d 100644 --- a/pkgs/development/interpreters/ruby/gemconfig/default.nix +++ b/pkgs/development/interpreters/ruby/gemconfig/default.nix @@ -21,6 +21,7 @@ , libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick , pkgconfig , ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata, icu, libffi , cmake, libssh2, openssl, mysql, darwin, git, perl, gecode_3, curl +, libmsgpack }: let @@ -40,6 +41,10 @@ in ''; }; + eventmachine = attrs: { + buildInputs = [ openssl ]; + }; + ffi = attrs: { buildInputs = [ libffi pkgconfig ]; }; @@ -56,6 +61,10 @@ in buildFlags = [ "--with-system-v8=true" ]; }; + msgpack = attrs: { + buildInputs = [ libmsgpack ]; + }; + mysql2 = attrs: { buildInputs = [ mysql.lib zlib openssl ]; };