2011-03-21 15:49:36 +01:00
|
|
|
|
{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
|
2011-11-18 03:40:33 +01:00
|
|
|
|
, fetchurl, ffmpeg, fontconfig, freetype, gtkLibs, libX11, libXfixes
|
2011-03-21 15:49:36 +01:00
|
|
|
|
, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst
|
|
|
|
|
, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
|
2011-09-11 22:48:02 +02:00
|
|
|
|
, stdenv, unzip, zlib, pam, pcre }:
|
2009-10-30 09:45:58 +01:00
|
|
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-11-18 03:40:33 +01:00
|
|
|
|
name = "chromium-17.0.943.0-pre${version}";
|
2011-09-11 22:48:02 +02:00
|
|
|
|
|
|
|
|
|
# To determine the latest revision, get
|
|
|
|
|
# ‘http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/LAST_CHANGE’.
|
|
|
|
|
# For the version number, see ‘about:config’.
|
2011-11-18 03:40:33 +01:00
|
|
|
|
version = "110566";
|
2011-09-11 22:48:02 +02:00
|
|
|
|
|
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-06-13 22:42:09 +02:00
|
|
|
|
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux_x64/${version}/chrome-linux.zip";
|
2011-11-18 03:40:33 +01:00
|
|
|
|
sha256 = "0pi2qbcvqy9gn2s0bfqlam3mj5ghnnnkrbxrrjl63737377an7ha";
|
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-06-13 22:42:09 +02:00
|
|
|
|
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/${version}/chrome-linux.zip";
|
2011-11-18 03:40:33 +01:00
|
|
|
|
sha256 = "0mk8ikgz97i69qy1cy3cqw4a2ff2ixjzyw5i86fmrq7m1f156yva";
|
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
|
|
|
|
|
2011-08-12 18:45:17 +02:00
|
|
|
|
buildInputs = [ makeWrapper unzip ];
|
2009-10-30 09:45:58 +01:00
|
|
|
|
|
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
|
2011-11-18 03:40:33 +01:00
|
|
|
|
ffmpeg fontconfig freetype libX11 libXScrnSaver libXfixes
|
2011-01-03 01:33:14 +01:00
|
|
|
|
libXdamage libXext libXrender libXt libXtst libgcrypt libjpeg
|
2011-09-11 22:48:02 +02:00
|
|
|
|
libpng nspr stdenv.gcc.gcc zlib stdenv.gcc.libc
|
2011-03-21 15:49:36 +01:00
|
|
|
|
gtkLibs.glib gtkLibs.gtk gtkLibs.gdk_pixbuf gtkLibs.pango
|
|
|
|
|
pam
|
|
|
|
|
];
|
2009-10-30 09:45:58 +01:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
ensureDir $out/bin
|
2011-08-12 18:45:17 +02:00
|
|
|
|
ensureDir $out/libexec/chrome
|
|
|
|
|
|
|
|
|
|
cp -R * $out/libexec/chrome
|
2011-09-11 22:48:02 +02:00
|
|
|
|
|
|
|
|
|
strip $out/libexec/chrome/chrome
|
2011-08-12 18:45:17 +02: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/libexec/chrome/chrome
|
|
|
|
|
|
|
|
|
|
makeWrapper $out/libexec/chrome/chrome $out/bin/chrome \
|
2011-09-11 22:48:02 +02:00
|
|
|
|
--prefix LD_LIBRARY_PATH : "${pcre}/lib:${nss}/lib"
|
2009-10-30 09:45:58 +01:00
|
|
|
|
'';
|
|
|
|
|
|
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/;
|
2012-01-21 19:28:39 +01:00
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ goibhniu chaoflow ];
|
2011-02-12 19:47:28 +01:00
|
|
|
|
license = licenses.bsd3;
|
2009-10-30 13:28:44 +01:00
|
|
|
|
};
|
2009-10-30 09:45:58 +01:00
|
|
|
|
}
|