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 {
|
2012-01-21 18:28:44 +00:00
|
|
|
|
name = "chromium-18.0.975.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’.
|
|
|
|
|
version = "114925";
|
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-01-21 18:28:44 +00:00
|
|
|
|
sha256 = "19ayrcz1vw7nqr3bbas5f414n3kibf7knd285azrk29f7a7dnpd6";
|
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-01-21 18:28:44 +00:00
|
|
|
|
sha256 = "1bhcd3plw3r62bfysc9nszn07xv3gamf5lkwd6ardwyxanclc7x6";
|
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/;
|
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
|
|
|
|
}
|