2011-03-21 15:49:36 +01:00
|
|
|
{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
|
|
|
|
, fetchurl, ffmpeg, fontconfig, freetype, gtkLibs, libX11
|
|
|
|
, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst
|
|
|
|
, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
|
|
|
|
, stdenv, unzip, zlib, pam }:
|
2009-10-30 09:45:58 +01:00
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2010-10-12 10:09:57 +02:00
|
|
|
name = "chrome-${version}";
|
2011-04-28 15:12:26 +02:00
|
|
|
version = "83323";
|
2010-11-28 10:27:45 +01:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
2009-10-30 09:45:58 +01:00
|
|
|
fetchurl {
|
2011-04-28 15:12:26 +02:00
|
|
|
url = "http://build.chromium.org/f/chromium/continuous/linux64/2011-04-28/${version}/chrome-linux.zip";
|
|
|
|
sha256 = "1bm9fg0bbiv0rwkvmhb2pdbm30x10kg39fiwbl98vk7qaai6s7nv";
|
2010-11-28 10:27:45 +01:00
|
|
|
}
|
|
|
|
else if stdenv.system == "i686-linux" then
|
2009-10-30 09:45:58 +01:00
|
|
|
fetchurl {
|
2011-04-28 15:12:26 +02:00
|
|
|
url = "http://build.chromium.org/f/chromium/continuous/linux/2011-04-28/${version}/chrome-linux.zip";
|
|
|
|
sha256 = "1wi744gjnd42zjq1jjjrlm2y0q97j1gfijmlmr3q4d82a3yvmijj";
|
2010-11-28 10:27:45 +01:00
|
|
|
}
|
2010-09-11 16:20:46 +02:00
|
|
|
else throw "Chromium is not supported on this platform.";
|
2009-10-30 09:45:58 +01:00
|
|
|
|
2010-09-11 16:20:46 +02:00
|
|
|
phases = "unpackPhase installPhase";
|
2009-10-30 09:45:58 +01:00
|
|
|
|
|
|
|
buildInputs = [makeWrapper unzip];
|
|
|
|
|
2010-11-28 10:27:45 +01:00
|
|
|
libPath =
|
2009-10-30 09:45:58 +01:00
|
|
|
stdenv.lib.makeLibraryPath
|
2011-03-21 15:49:36 +01:00
|
|
|
[ GConf alsaLib bzip2 cairo cups dbus dbus_glib expat
|
|
|
|
ffmpeg fontconfig freetype libX11 libXScrnSaver
|
2011-01-03 01:33:14 +01:00
|
|
|
libXdamage libXext libXrender libXt libXtst libgcrypt libjpeg
|
2011-03-21 15:49:36 +01:00
|
|
|
libpng nspr nss stdenv.gcc.gcc zlib stdenv.gcc.libc
|
|
|
|
gtkLibs.glib gtkLibs.gtk gtkLibs.gdk_pixbuf gtkLibs.pango
|
|
|
|
pam
|
|
|
|
];
|
2009-10-30 09:45:58 +01: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 10:27:45 +01: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 09:45:58 +01: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
|
|
|
|
'';
|
|
|
|
|
2011-02-12 19:47:28 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-09-11 16:20:46 +02:00
|
|
|
description = "Chromium, an open source web browser";
|
2011-02-12 19:47:28 +01:00
|
|
|
homepage = http://www.chromium.org/;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
|
|
|
license = licenses.bsd3;
|
2009-10-30 13:28:44 +01:00
|
|
|
};
|
2009-10-30 09:45:58 +01:00
|
|
|
}
|