2014-08-31 18:32:34 +01:00
|
|
|
# The standard set of gems in nixpkgs including potential fixes.
|
|
|
|
#
|
|
|
|
# The gemset is derived from two points of entry:
|
|
|
|
# - An attrset describing a gem, including version, source and dependencies
|
|
|
|
# This is just meta data, most probably automatically generated by a tool
|
|
|
|
# like Bundix (https://github.com/aflatter/bundix).
|
|
|
|
# {
|
|
|
|
# name = "bundler";
|
|
|
|
# version = "1.6.5";
|
|
|
|
# sha256 = "1s4x0f5by9xs2y24jk6krq5ky7ffkzmxgr4z1nhdykdmpsi2zd0l";
|
|
|
|
# dependencies = [ "rake" ];
|
|
|
|
# }
|
|
|
|
# - An optional derivation that may override how the gem is built. For popular
|
|
|
|
# gems that don't behave correctly, fixes are already provided in the form of
|
|
|
|
# derivations.
|
|
|
|
#
|
|
|
|
# This seperates "what to build" (the exact gem versions) from "how to build"
|
|
|
|
# (to make gems behave if necessary).
|
|
|
|
|
2014-10-28 04:16:14 +00:00
|
|
|
{ lib, fetchurl, writeScript, ruby, libxml2, libxslt, python, stdenv, which
|
2015-07-08 23:10:07 +01:00
|
|
|
, libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick
|
2015-01-25 21:01:48 +00:00
|
|
|
, pkgconfig , ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata, icu, libffi
|
2015-10-01 21:30:23 +01:00
|
|
|
, cmake, libssh2, openssl, mysql, darwin
|
2015-01-22 01:33:19 +00:00
|
|
|
}:
|
2014-08-31 18:32:34 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
v8 = v8_3_16_14;
|
2014-10-28 04:16:14 +00:00
|
|
|
in
|
2014-08-31 18:32:34 +01:00
|
|
|
|
2014-10-28 04:16:14 +00:00
|
|
|
{
|
2015-01-25 21:01:48 +00:00
|
|
|
charlock_holmes = attrs: {
|
2015-04-16 00:24:04 +01:00
|
|
|
buildInputs = [ which icu zlib ];
|
2015-01-25 21:01:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ffi = attrs: {
|
|
|
|
buildInputs = [ libffi pkgconfig ];
|
|
|
|
};
|
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
gpgme = attrs: {
|
|
|
|
buildInputs = [ gpgme ];
|
|
|
|
};
|
|
|
|
|
2014-10-28 04:16:14 +00:00
|
|
|
libv8 = attrs: {
|
|
|
|
buildInputs = [ which v8 python ];
|
2015-01-22 01:46:50 +00:00
|
|
|
buildFlags = [
|
|
|
|
"--with-system-v8=true"
|
|
|
|
];
|
2015-01-22 01:33:19 +00:00
|
|
|
};
|
|
|
|
|
2015-01-25 21:01:48 +00:00
|
|
|
mysql2 = attrs: {
|
2015-04-02 00:39:50 +01:00
|
|
|
buildInputs = [ mysql.lib zlib openssl ];
|
2015-01-25 21:01:48 +00:00
|
|
|
};
|
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
ncursesw = attrs: {
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
buildFlags = [
|
|
|
|
"--with-cflags=-I${ncurses}/include"
|
|
|
|
"--with-ldflags=-L${ncurses}/lib"
|
|
|
|
];
|
2014-10-28 04:16:14 +00:00
|
|
|
};
|
2014-08-31 18:32:34 +01:00
|
|
|
|
2014-10-28 04:16:14 +00:00
|
|
|
nokogiri = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--use-system-libraries"
|
2014-10-29 01:16:02 +00:00
|
|
|
"--with-zlib-dir=${zlib}"
|
|
|
|
"--with-xml2-lib=${libxml2}/lib"
|
|
|
|
"--with-xml2-include=${libxml2}/include/libxml2"
|
|
|
|
"--with-xslt-lib=${libxslt}/lib"
|
|
|
|
"--with-xslt-include=${libxslt}/include"
|
|
|
|
"--with-exslt-lib=${libxslt}/lib"
|
|
|
|
"--with-exslt-include=${libxslt}/include"
|
2015-01-22 03:38:29 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}";
|
2015-10-01 21:30:23 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
|
2014-10-29 01:16:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pg = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--with-pg-config=${postgresql}/bin/pg_config"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
rmagick = attrs: {
|
|
|
|
buildInputs = [ imagemagick pkgconfig ];
|
|
|
|
};
|
|
|
|
|
2015-01-25 21:01:48 +00:00
|
|
|
rugged = attrs: {
|
|
|
|
buildInputs = [ cmake pkgconfig openssl libssh2 zlib ];
|
|
|
|
};
|
|
|
|
|
2014-10-29 01:16:02 +00:00
|
|
|
sqlite3 = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--with-sqlite3-include=${sqlite}/include"
|
|
|
|
"--with-sqlite3-lib=${sqlite}/lib"
|
2014-10-28 04:16:14 +00:00
|
|
|
];
|
|
|
|
};
|
2014-08-31 18:32:34 +01:00
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
sup = attrs: {
|
|
|
|
# prevent sup from trying to dynamically install `xapian-ruby`.
|
|
|
|
postPatch = ''
|
|
|
|
cp ${./mkrf_conf_xapian.rb} ext/mkrf_conf_xapian.rb
|
2014-08-31 18:32:34 +01:00
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
substituteInPlace lib/sup/crypto.rb \
|
|
|
|
--replace 'which gpg2' \
|
|
|
|
'${which}/bin/which gpg2'
|
2014-10-28 04:16:14 +00:00
|
|
|
'';
|
2015-01-22 01:33:19 +00:00
|
|
|
};
|
2014-08-31 18:32:34 +01:00
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
therubyracer = attrs: {
|
2014-10-28 04:16:14 +00:00
|
|
|
buildFlags = [
|
2015-01-22 01:33:19 +00:00
|
|
|
"--with-v8-dir=${v8}"
|
|
|
|
"--with-v8-include=${v8}/include"
|
2014-10-28 04:16:14 +00:00
|
|
|
"--with-v8-lib=${v8}/lib"
|
|
|
|
];
|
2014-08-31 18:32:34 +01:00
|
|
|
};
|
2015-01-22 01:33:19 +00:00
|
|
|
|
2015-01-25 21:01:48 +00:00
|
|
|
tzinfo = attrs: {
|
2015-01-24 22:59:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/tzinfo/zoneinfo_data_source.rb \
|
2015-01-25 21:01:48 +00:00
|
|
|
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
|
2015-01-24 22:59:01 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2015-10-01 21:30:23 +01:00
|
|
|
unf_ext = attrs: {
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
|
|
|
|
};
|
|
|
|
|
2015-01-22 01:33:19 +00:00
|
|
|
xapian-ruby = attrs: {
|
|
|
|
# use the system xapian
|
|
|
|
buildInputs = [ xapian pkgconfig zlib ];
|
|
|
|
postPatch = ''
|
|
|
|
cp ${./xapian-Rakefile} Rakefile
|
|
|
|
'';
|
|
|
|
preInstall = ''
|
|
|
|
export XAPIAN_CONFIG=${xapian}/bin/xapian-config
|
|
|
|
'';
|
|
|
|
};
|
2014-10-28 04:16:14 +00:00
|
|
|
}
|
2015-01-22 05:47:08 +00:00
|
|
|
|