2011-03-21 14:49:36 +00:00
|
|
|
|
{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
|
2011-11-18 02:40:33 +00:00
|
|
|
|
, fetchurl, ffmpeg, fontconfig, freetype, gtkLibs, libX11, libXfixes
|
2011-03-21 14:49:36 +00:00
|
|
|
|
, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst
|
|
|
|
|
, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
|
2011-09-11 21:48:02 +01:00
|
|
|
|
, stdenv, unzip, zlib, pam, pcre }:
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-11-18 02:40:33 +00:00
|
|
|
|
name = "chromium-17.0.943.0-pre${version}";
|
2011-09-11 21:48:02 +01: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 02:40:33 +00:00
|
|
|
|
version = "110566";
|
2011-09-11 21:48:02 +01:00
|
|
|
|
|
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 {
|
2011-06-13 21:42:09 +01:00
|
|
|
|
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux_x64/${version}/chrome-linux.zip";
|
2011-11-18 02:40:33 +00:00
|
|
|
|
sha256 = "0pi2qbcvqy9gn2s0bfqlam3mj5ghnnnkrbxrrjl63737377an7ha";
|
2010-11-28 09:27:45 +00:00
|
|
|
|
}
|
|
|
|
|
else if stdenv.system == "i686-linux" then
|
2009-10-30 08:45:58 +00:00
|
|
|
|
fetchurl {
|
2011-06-13 21:42:09 +01:00
|
|
|
|
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/${version}/chrome-linux.zip";
|
2011-11-18 02:40:33 +00:00
|
|
|
|
sha256 = "0mk8ikgz97i69qy1cy3cqw4a2ff2ixjzyw5i86fmrq7m1f156yva";
|
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
|
|
|
|
|
2011-08-12 17:45:17 +01:00
|
|
|
|
buildInputs = [ makeWrapper unzip ];
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
2010-11-28 09:27:45 +00:00
|
|
|
|
libPath =
|
2009-10-30 08:45:58 +00:00
|
|
|
|
stdenv.lib.makeLibraryPath
|
2011-03-21 14:49:36 +00:00
|
|
|
|
[ GConf alsaLib bzip2 cairo cups dbus dbus_glib expat
|
2011-11-18 02:40:33 +00:00
|
|
|
|
ffmpeg fontconfig freetype libX11 libXScrnSaver libXfixes
|
2011-01-03 00:33:14 +00:00
|
|
|
|
libXdamage libXext libXrender libXt libXtst libgcrypt libjpeg
|
2011-09-11 21:48:02 +01:00
|
|
|
|
libpng nspr stdenv.gcc.gcc zlib stdenv.gcc.libc
|
2011-03-21 14:49:36 +00:00
|
|
|
|
gtkLibs.glib gtkLibs.gtk gtkLibs.gdk_pixbuf gtkLibs.pango
|
|
|
|
|
pam
|
|
|
|
|
];
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
ensureDir $out/bin
|
2011-08-12 17:45:17 +01:00
|
|
|
|
ensureDir $out/libexec/chrome
|
|
|
|
|
|
|
|
|
|
cp -R * $out/libexec/chrome
|
2011-09-11 21:48:02 +01:00
|
|
|
|
|
|
|
|
|
strip $out/libexec/chrome/chrome
|
2011-08-12 17:45:17 +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/libexec/chrome/chrome
|
|
|
|
|
|
|
|
|
|
makeWrapper $out/libexec/chrome/chrome $out/bin/chrome \
|
2011-09-11 21:48:02 +01:00
|
|
|
|
--prefix LD_LIBRARY_PATH : "${pcre}/lib:${nss}/lib"
|
2009-10-30 08:45:58 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2011-02-12 18:47:28 +00:00
|
|
|
|
meta = with stdenv.lib; {
|
2010-09-11 15:20:46 +01:00
|
|
|
|
description = "Chromium, an open source web browser";
|
2011-02-12 18:47:28 +00:00
|
|
|
|
homepage = http://www.chromium.org/;
|
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
|
|
|
|
license = licenses.bsd3;
|
2009-10-30 12:28:44 +00:00
|
|
|
|
};
|
2009-10-30 08:45:58 +00:00
|
|
|
|
}
|