2011-03-21 14:49:36 +00:00
|
|
|
|
{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
|
2012-03-14 21:57:32 +00:00
|
|
|
|
, fetchurl, ffmpeg, fontconfig, freetype, libX11, libXfixes
|
|
|
|
|
, glib, gtk, gdk_pixbuf, pango
|
2012-03-22 10:29:43 +00:00
|
|
|
|
, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst, libXcomposite
|
2011-03-21 14:49:36 +00:00
|
|
|
|
, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
|
2012-03-22 10:29:43 +00:00
|
|
|
|
, stdenv, unzip, zlib, pam, pcre, udev }:
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-03-22 10:29:43 +00:00
|
|
|
|
name = "chromium-19.0.1061.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’.
|
2012-01-21 18:28:44 +00:00
|
|
|
|
# For the version number, see ‘about:version’.
|
2012-03-22 10:29:43 +00:00
|
|
|
|
version = "124950";
|
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";
|
2012-03-22 10:29:43 +00:00
|
|
|
|
sha256 = "4472bf584a96e477e2c17f96d4452dd41f4f34ac3d6a9bb4c845cf15d8db0c73";
|
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";
|
2012-03-22 10:29:43 +00:00
|
|
|
|
sha256 = "6e8a49d9917ee26b67d14cd10b85711c3b9382864197ba02b3cfe8e636d3d69c";
|
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
|
2012-03-22 10:29:43 +00:00
|
|
|
|
ffmpeg fontconfig freetype libX11 libXScrnSaver libXfixes libXcomposite
|
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
|
2012-03-14 21:57:32 +00:00
|
|
|
|
glib gtk gdk_pixbuf pango
|
2012-03-22 10:29:43 +00:00
|
|
|
|
pam udev
|
2011-03-21 14:49:36 +00:00
|
|
|
|
];
|
2009-10-30 08:45:58 +00:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
mkdir -p $out/libexec/chrome
|
2011-08-12 17:45:17 +01:00
|
|
|
|
|
|
|
|
|
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/;
|
2012-01-21 18:28:39 +00:00
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ goibhniu chaoflow ];
|
2011-02-12 18:47:28 +00:00
|
|
|
|
license = licenses.bsd3;
|
2009-10-30 12:28:44 +00:00
|
|
|
|
};
|
2009-10-30 08:45:58 +00:00
|
|
|
|
}
|