From 895b1cb1b06fc580f6ab5f0cdaaab7140895103f Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Mon, 19 Feb 2018 22:56:17 +0100 Subject: [PATCH 1/2] gem-config: add ethon The Ethon gem uses libcurl.so at runtime via FFI, so we need to specify the correct location. --- pkgs/development/ruby-modules/gem-config/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 5361c3ce65eb..6ae3c824a4eb 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -87,6 +87,14 @@ in sed -i $installPath/lib/dep-selector-libgecode.rb -e 's@VENDORED_GECODE_DIR =.*@VENDORED_GECODE_DIR = "${gecode_3}"@' ''; }; + + ethon = attrs: { + dontBuild = false; + postPatch = '' + substituteInPlace lib/ethon/curls/settings.rb \ + --replace "libcurl" "${curl.out}/lib/libcurl.so" + ''; + }; eventmachine = attrs: { buildInputs = [ openssl ]; From 1313542b6b602f43fa6e1c2ee84400753fc9c97a Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Tue, 20 Feb 2018 11:29:07 +0100 Subject: [PATCH 2/2] Support darwin --- pkgs/development/ruby-modules/gem-config/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 6ae3c824a4eb..8da6355e0016 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -92,7 +92,7 @@ in dontBuild = false; postPatch = '' substituteInPlace lib/ethon/curls/settings.rb \ - --replace "libcurl" "${curl.out}/lib/libcurl.so" + --replace "libcurl" "${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary}" ''; };