gitlab: fix evaluation
This commit is contained in:
@@ -18,16 +18,26 @@
|
||||
# (to make gems behave if necessary).
|
||||
|
||||
{ lib, fetchurl, writeScript, ruby, libxml2, libxslt, python, stdenv, which
|
||||
, libiconv, postgresql, v8, v8_3_16_14, clang, sqlite, zlib, imagemagick, pkgconfig
|
||||
, ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata
|
||||
, libiconv, postgresql, v8, v8_3_16_14, clang, sqlite, zlib, imagemagick
|
||||
, pkgconfig , ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata, icu, libffi
|
||||
, cmake, libssh2, openssl, mysql
|
||||
}:
|
||||
|
||||
let
|
||||
v8 = v8_3_16_14;
|
||||
mysql = (import <nixpkgs> {}).mysql;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
charlock_holmes = attrs: {
|
||||
buildInputs = [ which icu ];
|
||||
};
|
||||
|
||||
ffi = attrs: {
|
||||
buildInputs = [ libffi pkgconfig ];
|
||||
};
|
||||
|
||||
gpgme = attrs: {
|
||||
buildInputs = [ gpgme ];
|
||||
};
|
||||
@@ -46,6 +56,10 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
mysql2 = attrs: {
|
||||
buildInputs = [ mysql zlib openssl ];
|
||||
};
|
||||
|
||||
ncursesw = attrs: {
|
||||
buildInputs = [ ncurses ];
|
||||
buildFlags = [
|
||||
@@ -77,6 +91,10 @@ in
|
||||
buildInputs = [ imagemagick pkgconfig ];
|
||||
};
|
||||
|
||||
rugged = attrs: {
|
||||
buildInputs = [ cmake pkgconfig openssl libssh2 zlib ];
|
||||
};
|
||||
|
||||
sqlite3 = attrs: {
|
||||
buildFlags = [
|
||||
"--with-sqlite3-include=${sqlite}/include"
|
||||
@@ -103,10 +121,10 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
tzdata = attrs: {
|
||||
tzinfo = attrs: {
|
||||
postPatch = ''
|
||||
substituteInPlace lib/tzinfo/zoneinfo_data_source.rb \
|
||||
--replace "/etc/zoneinfo" "${tzdata}/share/zoneinfo"
|
||||
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
{ name, gemset, gemfile, lockfile, ruby ? defs.ruby, gemConfig ? defaultGemConfig
|
||||
, enableParallelBuilding ? false # TODO: this might not work, given the env-var shinanigans.
|
||||
, postInstall ? null
|
||||
, documentation ? false
|
||||
, meta ? {}
|
||||
}@args:
|
||||
@@ -108,7 +109,7 @@ let
|
||||
FileUtils.cp(patched_package.spec.file_name, out)
|
||||
''}
|
||||
else
|
||||
cp -r . out
|
||||
cp -r . $out
|
||||
fi
|
||||
|
||||
runHook postInstall
|
||||
@@ -273,13 +274,13 @@ stdenv.mkDerivation {
|
||||
export NIX_BUNDLER_GEMPATH=${bundler}/${ruby.gemPath}
|
||||
|
||||
export GEM_HOME=$out/${ruby.gemPath}
|
||||
export GEM_PATH=$GEM_HOME
|
||||
export GEM_PATH=$NIX_BUNDLER_GEMPATH:$GEM_HOME
|
||||
mkdir -p $GEM_HOME
|
||||
|
||||
${allBuildFlags}
|
||||
#export
|
||||
|
||||
mkdir gems
|
||||
cp ${bundler}/${bundler.ruby.gemPath}/cache/bundler-*.gem gems
|
||||
${copyGems}
|
||||
|
||||
${lib.optionalString (!documentation) ''
|
||||
@@ -295,8 +296,13 @@ stdenv.mkDerivation {
|
||||
cp ${./monkey_patches.rb} monkey_patches.rb
|
||||
export RUBYOPT="-rmonkey_patches.rb -I $(pwd -P)"
|
||||
bundler install --frozen --binstubs ${lib.optionalString enableParallelBuilding "--jobs $NIX_BUILD_CORES"}
|
||||
RUBYOPT=""
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
inherit postInstall;
|
||||
|
||||
passthru = {
|
||||
inherit ruby;
|
||||
inherit bundler;
|
||||
|
||||
Reference in New Issue
Block a user