2010-11-28 09:27:45 +00:00
|
|
|
{ GConf, alsaLib, atk, bzip2, cairo, cups, dbus, dbus_glib,
|
|
|
|
expat, fetchurl, ffmpeg, fontconfig, freetype, glib, gtk,
|
|
|
|
libX11, libXScrnSaver, libXdamage, libXext, libXrender, libXt,
|
|
|
|
libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, pango,
|
|
|
|
patchelf, stdenv, unzip, zlib }:
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2010-10-12 09:09:57 +01:00
|
|
|
name = "chrome-${version}";
|
2010-11-04 12:09:40 +00:00
|
|
|
version = "65039";
|
2010-11-28 09:27:45 +00:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
2009-10-30 08:45:58 +00:00
|
|
|
fetchurl {
|
2009-11-05 10:50:57 +00:00
|
|
|
url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/${version}/chrome-linux.zip";
|
2010-11-04 12:09:40 +00:00
|
|
|
sha256 = "1ad7kwd1w1958mb3pwzhshawrf2nlxdsf0gy7d2q4qnx5d809vws";
|
2010-11-28 09:27:45 +00:00
|
|
|
}
|
|
|
|
else if stdenv.system == "i686-linux" then
|
2009-10-30 08:45:58 +00:00
|
|
|
fetchurl {
|
2009-11-05 10:50:57 +00:00
|
|
|
url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${version}/chrome-linux.zip";
|
2010-11-04 12:09:40 +00:00
|
|
|
sha256 = "06hz3gvv3623ldrj141w3mnzw049yylvv9b9q5r6my8icm722phf";
|
2010-11-28 09:27:45 +00:00
|
|
|
}
|
2010-09-11 15:20:46 +01:00
|
|
|
else throw "Chromium is not supported on this platform.";
|
2009-10-30 08:45:58 +00:00
|
|
|
|
2010-09-11 15:20:46 +01:00
|
|
|
phases = "unpackPhase installPhase";
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
buildInputs = [makeWrapper unzip];
|
|
|
|
|
2010-11-28 09:27:45 +00:00
|
|
|
libPath =
|
2009-10-30 08:45:58 +00:00
|
|
|
stdenv.lib.makeLibraryPath
|
2010-11-28 09:27:45 +00:00
|
|
|
[ GConf alsaLib atk bzip2 cairo cups dbus dbus_glib expat
|
|
|
|
ffmpeg fontconfig freetype glib gtk libX11 libXScrnSaver
|
|
|
|
libXdamage libXext libXrender libXt libgcrypt libjpeg libpng
|
|
|
|
nspr nss pango stdenv.gcc.gcc zlib stdenv.gcc.libc ];
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out/bin
|
|
|
|
ensureDir $out/chrome
|
|
|
|
ensureDir $out/lib
|
|
|
|
|
|
|
|
cp -R * $out/chrome
|
|
|
|
ln -s $out/chrome/chrome $out/bin/chrome
|
2010-11-28 09:27:45 +00:00
|
|
|
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/lib:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib $out/chrome/chrome
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
ln -s ${nss}/lib/libsmime3.so $out/lib/libsmime3.so.1d
|
|
|
|
ln -s ${nss}/lib/libnssutil3.so $out/lib/libnssutil3.so.1d
|
|
|
|
ln -s ${nss}/lib/libssl3.so $out/lib/libssl3.so.1d
|
|
|
|
ln -s ${nss}/lib/libnss3.so $out/lib/libnss3.so.1d
|
|
|
|
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
|
|
|
|
ln -s ${nspr}/lib/libplds4.so $out/lib/libplds4.so.0d
|
|
|
|
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
|
|
|
|
'';
|
|
|
|
|
2009-10-30 12:28:44 +00:00
|
|
|
meta = {
|
2010-09-11 15:20:46 +01:00
|
|
|
description = "Chromium, an open source web browser";
|
2009-10-30 12:28:44 +00:00
|
|
|
};
|
2009-10-30 08:45:58 +00:00
|
|
|
}
|