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 {
|
2012-01-21 19:28:44 +01:00
|
|
|
|
name = "chromium-18.0.975.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’.
|
2012-01-21 19:28:44 +01:00
|
|
|
|
# For the version number, see ‘about:version’.
|
|
|
|
|
version = "114925";
|
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";
|
2012-01-21 19:28:44 +01:00
|
|
|
|
sha256 = "19ayrcz1vw7nqr3bbas5f414n3kibf7knd285azrk29f7a7dnpd6";
|
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";
|
2012-01-21 19:28:44 +01:00
|
|
|
|
sha256 = "1bhcd3plw3r62bfysc9nszn07xv3gamf5lkwd6ardwyxanclc7x6";
|
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
|
|
|
|
}
|