# build-time overrides for some gems # # gems in here generally involve native extensions; there's no way to tell # based on the gemfile { libxml2, libxslt, postgresql, python, ruby, self, v8_3_16_14, which, writeScript , stdenv }: let v8 = v8_3_16_14; patchUsrBinEnv = writeScript "path-usr-bin-env" '' #!/bin/sh echo "===================" find "$1" -type f -name "*.rb" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g" find "$1" -type f -name "*.mk" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g" ''; in { barber = { gemFlags = "--ignore-dependencies"; dontBuild = 1; }; ember_data_source = { gemFlags = "--ignore-dependencies"; }; ember_rails = { gemFlags = "--ignore-dependencies"; }; rbtrace = { dontBuild = 1; }; method_source = { dontBuild = 1; }; pg = { buildFlags = ["--with-pg-config=${postgresql}/bin/pg_config"]; }; nokogiri = { buildInputs = [ libxml2 ]; buildFlags = [ "--with-xml2-dir=${libxml2} --with-xml2-include=${libxml2}/include/libxml2" "--with-xslt-dir=${libxslt}" "--use-system-libraries" ]; }; therubyracer = { preBuild = '' addToSearchPath RUBYLIB "${self.libv8}/${ruby.gemPath}/gems/libv8-3.16.14.3/lib" addToSearchPath RUBYLIB "${self.libv8}/${ruby.gemPath}/gems/libv8-3.16.14.3/ext" ''; postInstall = stdenv.lib.optionalString stdenv.isDarwin '' cat >> $out/nix-support/setup-hook <