mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 22:14:42 +00:00
buildRubyGem: fix missing libobjc in darwin
This was preventing any ruby gem with a c extension to build. mkmf would fail with a misleading error: /nix/store/dmkcai8fnv21qxiasx628nim3mq4r4wg-ruby-2.2.3-p0/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
This commit is contained in:
parent
9a55295c49
commit
e9eda43928
@ -18,7 +18,8 @@
|
|||||||
# Normal gem packages can be used outside of bundler; a binstub is created in
|
# Normal gem packages can be used outside of bundler; a binstub is created in
|
||||||
# $out/bin.
|
# $out/bin.
|
||||||
|
|
||||||
{ lib, ruby, rubygems, bundler, fetchurl, fetchgit, makeWrapper, git, buildRubyGem
|
{ lib, ruby, rubygems, bundler, fetchurl, fetchgit, makeWrapper, git,
|
||||||
|
buildRubyGem, darwin
|
||||||
} @ defs:
|
} @ defs:
|
||||||
|
|
||||||
lib.makeOverridable (
|
lib.makeOverridable (
|
||||||
@ -85,6 +86,7 @@ stdenv.mkDerivation (attrs // {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
ruby rubygems makeWrapper
|
ruby rubygems makeWrapper
|
||||||
] ++ lib.optionals (type == "git") [ git bundler ]
|
] ++ lib.optionals (type == "git") [ git bundler ]
|
||||||
|
++ lib.optional stdenv.isDarwin darwin.libobjc
|
||||||
++ buildInputs;
|
++ buildInputs;
|
||||||
|
|
||||||
name = attrs.name or (namePrefix + gemName);
|
name = attrs.name or (namePrefix + gemName);
|
||||||
|
@ -79,7 +79,6 @@ in
|
|||||||
"--with-exslt-lib=${libxslt}/lib"
|
"--with-exslt-lib=${libxslt}/lib"
|
||||||
"--with-exslt-include=${libxslt}/include"
|
"--with-exslt-include=${libxslt}/include"
|
||||||
] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}";
|
] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}";
|
||||||
buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patron = attrs: {
|
patron = attrs: {
|
||||||
@ -143,10 +142,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
unf_ext = attrs: {
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
|
|
||||||
};
|
|
||||||
|
|
||||||
xapian-ruby = attrs: {
|
xapian-ruby = attrs: {
|
||||||
# use the system xapian
|
# use the system xapian
|
||||||
dontBuild = false;
|
dontBuild = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user