2009-10-30 08:45:58 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, ffmpeg
|
|
|
|
, cairo
|
|
|
|
, pango
|
|
|
|
, glib
|
|
|
|
, libXrender
|
2010-02-25 13:22:51 +00:00
|
|
|
, libXScrnSaver
|
2009-10-30 08:45:58 +00:00
|
|
|
, gtk
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, alsaLib
|
|
|
|
, libX11
|
|
|
|
, GConf
|
|
|
|
, libXext
|
2009-10-30 12:28:44 +00:00
|
|
|
, libXt
|
2009-10-30 08:45:58 +00:00
|
|
|
, atk
|
|
|
|
, makeWrapper
|
|
|
|
, unzip
|
2009-11-05 10:50:57 +00:00
|
|
|
, expat
|
|
|
|
, zlib
|
2010-01-04 07:47:32 +00:00
|
|
|
, libjpeg
|
|
|
|
, bzip2
|
|
|
|
, libpng
|
2010-05-18 13:36:23 +01:00
|
|
|
, dbus
|
|
|
|
, dbus_glib
|
|
|
|
, patchelf
|
2010-07-06 09:18:14 +01:00
|
|
|
, cups
|
|
|
|
, libgcrypt
|
2009-10-30 08:45:58 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2010-09-11 15:20:46 +01:00
|
|
|
name = "chrome-${version}"; # !!! Shouldn't this be "chromium"?
|
2010-10-08 10:25:54 +01:00
|
|
|
version = "61624";
|
2010-09-11 15:20:46 +01:00
|
|
|
|
|
|
|
# TODO: Use a stable release that doesn't disappear every few days.
|
2009-10-30 08:45:58 +00:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
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-10-08 10:25:54 +01:00
|
|
|
sha256 = "16kv1zbs3ypb2b00dpg2s4nn8zqdnv8jdvgxknp3s0xcq02w2asl";
|
2009-10-30 08:45:58 +00:00
|
|
|
}
|
|
|
|
else if stdenv.system == "i686-linux" then
|
|
|
|
fetchurl {
|
2009-11-05 10:50:57 +00:00
|
|
|
url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${version}/chrome-linux.zip";
|
2010-10-08 10:25:54 +01:00
|
|
|
sha256 = "081pvwzpys98m3arj3qagyhrrphz7rjwn7yy4mk6bcrds6mwdxiz";
|
2009-10-30 08:45:58 +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];
|
|
|
|
|
|
|
|
libPath =
|
|
|
|
stdenv.lib.makeLibraryPath
|
2010-08-06 11:34:34 +01:00
|
|
|
[ stdenv.gcc.libc stdenv.gcc.gcc ffmpeg cairo pango glib libXrender gtk nspr nss fontconfig freetype alsaLib libX11 GConf libXext atk libXt expat zlib libjpeg bzip2 libpng libXScrnSaver dbus dbus_glib cups libgcrypt] ;
|
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-05-18 13:36:23 +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 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
|
|
|
}
|