90683792aa
It turns out that installing therubytracer, with dependency on old v8, even when using source libv8 version is problematic. (see http://stackoverflow.com/questions/21666379/problems-installing-gitlab-on-odroid-v8-lib-not-available). But wait, rails does not even need therubytracer, just any kind of javascript server side execution framework like nodejs. Well just use that, as also suggested from different internet sources (look link above), it works just fine.
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ pkgs ? import <nixpkgs> {}
|
|
}:
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
in stdenv.mkDerivation rec {
|
|
version = "7.4.2";
|
|
name = "gitlab-${version}";
|
|
__noChroot = true;
|
|
src = fetchurl {
|
|
url = "https://github.com/gitlabhq/gitlabhq/archive/v${version}.zip";
|
|
sha256 = "01iplkpa4scr0wcap6vjrc960dj15z4ciclaqswj0sz5hrp9glw6";
|
|
};
|
|
buildInputs = [
|
|
ruby rubyLibs.bundler libiconv libxslt libxml2 pkgconfig
|
|
libffi postgresql which stdenv unzip
|
|
];
|
|
installPhase = ''
|
|
unset http_proxy
|
|
unset ftp_proxy
|
|
|
|
cp -R . $out
|
|
cp ${./generate_nix_requirements.rb} $out/generate_nix_requirements.rb
|
|
cd $out
|
|
|
|
cat > config/database.yml <<EOF
|
|
production:
|
|
adapter: postgresql
|
|
EOF
|
|
|
|
substituteInPlace Gemfile --replace 'gem "therubyracer"' ""
|
|
|
|
bundle config --local build.nokogiri --use-system-libraries \
|
|
--with-iconv-dir=${libiconv} \
|
|
--with-xslt-dir=${libxslt} \
|
|
--with-xml2-dir=${libxml2} \
|
|
--with-pkg-config \
|
|
--with-pg-config=${postgresql}/bin/pg_config
|
|
|
|
HOME="/tmp/gitlab-${version}" ruby generate_nix_requirements.rb
|
|
rm -R /tmp/gems
|
|
'';
|
|
}
|