mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 20:03:16 +00:00
commit
d1ca1bd455
@ -0,0 +1,14 @@
|
||||
diff --git a/printing/printing.gyp b/printing/printing.gyp
|
||||
index 19fa1b2..f11d76e 100644
|
||||
--- a/printing/printing.gyp
|
||||
+++ b/printing/printing.gyp
|
||||
@@ -26,6 +26,9 @@
|
||||
'include_dirs': [
|
||||
'..',
|
||||
],
|
||||
+ 'cflags': [
|
||||
+ '-Wno-deprecated-declarations',
|
||||
+ ],
|
||||
'sources': [
|
||||
'backend/print_backend.cc',
|
||||
'backend/print_backend.h',
|
@ -1,62 +1,187 @@
|
||||
{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
|
||||
, fetchurl, ffmpeg, fontconfig, freetype, libX11, libXfixes
|
||||
, glib, gtk, gdk_pixbuf, pango
|
||||
, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst, libXcomposite
|
||||
, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
|
||||
, stdenv, unzip, zlib, pam, pcre, udev }:
|
||||
{ stdenv, getConfig, fetchurl, makeWrapper, which
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
|
||||
# default dependencies
|
||||
, bzip2, flac, speex
|
||||
, libevent, expat, libjpeg
|
||||
, libpng, libxml2, libxslt
|
||||
, xdg_utils, yasm, zlib
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "chromium-19.0.1061.0-pre${version}";
|
||||
, python, perl, pkgconfig
|
||||
, nspr, udev, krb5
|
||||
, utillinux, alsaLib
|
||||
, gcc, bison, gperf
|
||||
, glib, gtk, dbus_glib
|
||||
, libXScrnSaver, libXcursor, mesa
|
||||
|
||||
# To determine the latest revision, get
|
||||
# ‘http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/LAST_CHANGE’.
|
||||
# For the version number, see ‘about:version’.
|
||||
version = "124950";
|
||||
# optional dependencies
|
||||
, libgnome_keyring # config.gnomeKeyring
|
||||
, gconf # config.gnome
|
||||
, libgcrypt # config.gnome || config.cups
|
||||
, nss, openssl # config.openssl
|
||||
, pulseaudio # config.pulseaudio
|
||||
, libselinux # config.selinux
|
||||
}:
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux_x64/${version}/chrome-linux.zip";
|
||||
sha256 = "4472bf584a96e477e2c17f96d4452dd41f4f34ac3d6a9bb4c845cf15d8db0c73";
|
||||
}
|
||||
else if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/${version}/chrome-linux.zip";
|
||||
sha256 = "6e8a49d9917ee26b67d14cd10b85711c3b9382864197ba02b3cfe8e636d3d69c";
|
||||
}
|
||||
else throw "Chromium is not supported on this platform.";
|
||||
let
|
||||
mkConfigurable = stdenv.lib.mapAttrs (flag: default: getConfig ["chromium" flag] default);
|
||||
|
||||
phases = "unpackPhase installPhase";
|
||||
config = mkConfigurable {
|
||||
selinux = false;
|
||||
nacl = false;
|
||||
openssl = true;
|
||||
gnome = false;
|
||||
gnomeKeyring = false;
|
||||
proprietaryCodecs = true;
|
||||
cups = false;
|
||||
pulseaudio = getConfig ["pulseaudio"] true;
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper unzip ];
|
||||
sourceInfo = import ./source.nix;
|
||||
|
||||
libPath =
|
||||
stdenv.lib.makeLibraryPath
|
||||
[ GConf alsaLib bzip2 cairo cups dbus dbus_glib expat
|
||||
ffmpeg fontconfig freetype libX11 libXScrnSaver libXfixes libXcomposite
|
||||
libXdamage libXext libXrender libXt libXtst libgcrypt libjpeg
|
||||
libpng nspr stdenv.gcc.gcc zlib stdenv.gcc.libc
|
||||
glib gtk gdk_pixbuf pango
|
||||
pam udev
|
||||
mkGypFlags = with stdenv.lib; let
|
||||
sanitize = value:
|
||||
if value == true then "1"
|
||||
else if value == false then "0"
|
||||
else "${value}";
|
||||
toFlag = key: value: "-D${key}=${sanitize value}";
|
||||
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
|
||||
|
||||
gypFlagsUseSystemLibs = {
|
||||
use_system_bzip2 = true;
|
||||
use_system_flac = true;
|
||||
use_system_libevent = true;
|
||||
use_system_libexpat = true;
|
||||
use_system_libjpeg = true;
|
||||
use_system_libpng = true;
|
||||
use_system_libxml = true;
|
||||
use_system_speex = true;
|
||||
use_system_ssl = true;
|
||||
use_system_stlport = true;
|
||||
use_system_xdg_utils = true;
|
||||
use_system_yasm = true;
|
||||
use_system_zlib = true;
|
||||
|
||||
use_system_harfbuzz = false;
|
||||
use_system_icu = false;
|
||||
use_system_libwebp = false; # See chromium issue #133161
|
||||
use_system_skia = false;
|
||||
use_system_sqlite = false; # See chromium issue #22208
|
||||
use_system_v8 = false;
|
||||
};
|
||||
|
||||
defaultDependencies = [
|
||||
bzip2 flac speex
|
||||
libevent expat libjpeg
|
||||
libpng libxml2 libxslt
|
||||
xdg_utils yasm zlib
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "${packageName}-${version}";
|
||||
packageName = "chromium";
|
||||
|
||||
version = sourceInfo.version;
|
||||
|
||||
src = fetchurl {
|
||||
url = sourceInfo.url;
|
||||
sha256 = sourceInfo.sha256;
|
||||
};
|
||||
|
||||
buildInputs = defaultDependencies ++ [
|
||||
which makeWrapper
|
||||
python perl pkgconfig
|
||||
nspr udev
|
||||
(if config.openssl then openssl else nss)
|
||||
utillinux alsaLib
|
||||
gcc bison gperf
|
||||
krb5
|
||||
glib gtk dbus_glib
|
||||
libXScrnSaver libXcursor mesa
|
||||
] ++ stdenv.lib.optional config.gnomeKeyring libgnome_keyring
|
||||
++ stdenv.lib.optionals config.gnome [ gconf libgcrypt ]
|
||||
++ stdenv.lib.optional config.selinux libselinux
|
||||
++ stdenv.lib.optional config.cups libgcrypt
|
||||
++ stdenv.lib.optional config.pulseaudio pulseaudio;
|
||||
|
||||
opensslPatches = stdenv.lib.optional config.openssl openssl.patches;
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
|
||||
patches = stdenv.lib.optional (!config.selinux) ./enable_seccomp.patch
|
||||
++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch
|
||||
++ stdenv.lib.optional config.pulseaudio ./pulseaudio_array_bounds.patch;
|
||||
|
||||
postPatch = stdenv.lib.optionalString config.openssl ''
|
||||
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
|
||||
'';
|
||||
|
||||
gypFlags = mkGypFlags (gypFlagsUseSystemLibs // {
|
||||
linux_use_gold_binary = false;
|
||||
linux_use_gold_flags = false;
|
||||
proprietary_codecs = false;
|
||||
use_gnome_keyring = config.gnomeKeyring;
|
||||
use_gconf = config.gnome;
|
||||
use_gio = config.gnome;
|
||||
use_pulseaudio = config.pulseaudio;
|
||||
disable_nacl = !config.nacl;
|
||||
use_openssl = config.openssl;
|
||||
selinux = config.selinux;
|
||||
use_cups = config.cups;
|
||||
} // stdenv.lib.optionalAttrs config.proprietaryCodecs {
|
||||
# enable support for the H.264 codec
|
||||
proprietary_codecs = true;
|
||||
ffmpeg_branding = "Chrome";
|
||||
} // stdenv.lib.optionalAttrs (stdenv.system == "x86_64-linux") {
|
||||
target_arch = "x64";
|
||||
} // stdenv.lib.optionalAttrs (stdenv.system == "i686-linux") {
|
||||
target_arch = "ia32";
|
||||
});
|
||||
|
||||
buildType = "Release";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configurePhase = ''
|
||||
python build/gyp_chromium --depth "$(pwd)" ${gypFlags}
|
||||
'';
|
||||
|
||||
makeFlags = let
|
||||
CC = "${gcc}/bin/gcc";
|
||||
CXX = "${gcc}/bin/g++";
|
||||
in [
|
||||
"CC=${CC}"
|
||||
"CXX=${CXX}"
|
||||
"CC.host=${CC}"
|
||||
"CXX.host=${CXX}"
|
||||
"LINK.host=${CXX}"
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"BUILDTYPE=${buildType}"
|
||||
"library=shared_library"
|
||||
"chrome"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/libexec/chrome
|
||||
mkdir -vp "$out/libexec/${packageName}"
|
||||
cp -v "out/${buildType}/"*.pak "$out/libexec/${packageName}/"
|
||||
cp -vR "out/${buildType}/locales" "out/${buildType}/resources" "$out/libexec/${packageName}/"
|
||||
|
||||
cp -R * $out/libexec/chrome
|
||||
cp -v "out/${buildType}/chrome" "$out/libexec/${packageName}/${packageName}"
|
||||
|
||||
strip $out/libexec/chrome/chrome
|
||||
mkdir -vp "$out/bin"
|
||||
makeWrapper "$out/libexec/${packageName}/${packageName}" "$out/bin/${packageName}"
|
||||
|
||||
${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
|
||||
mkdir -vp "$out/share/man/man1"
|
||||
cp -v "out/${buildType}/chrome.1" "$out/share/man/man1/${packageName}.1"
|
||||
|
||||
makeWrapper $out/libexec/chrome/chrome $out/bin/chrome \
|
||||
--prefix LD_LIBRARY_PATH : "${pcre}/lib:${nss}/lib"
|
||||
for icon_file in chrome/app/theme/chromium/product_logo_*[0-9].png; do
|
||||
num_and_suffix="''${icon_file##*logo_}"
|
||||
icon_size="''${num_and_suffix%.*}"
|
||||
logo_output_path="$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps"
|
||||
mkdir -vp "$logo_output_path"
|
||||
cp -v "$icon_file" "$logo_output_path/${packageName}.png"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -0,0 +1,20 @@
|
||||
diff --git a/content/common/seccomp_sandbox.h b/content/common/seccomp_sandbox.h
|
||||
index a07d6f3..a622a35 100644
|
||||
--- a/content/common/seccomp_sandbox.h
|
||||
+++ b/content/common/seccomp_sandbox.h
|
||||
@@ -29,15 +29,9 @@ static bool SeccompSandboxEnabled() {
|
||||
// TODO(evan): turn on for release too once we've flushed out all the bugs,
|
||||
// allowing us to delete this file entirely and just rely on the "disabled"
|
||||
// switch.
|
||||
-#ifdef NDEBUG
|
||||
- // Off by default; allow turning on with a switch.
|
||||
- return CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
- switches::kEnableSeccompSandbox);
|
||||
-#else
|
||||
// On by default; allow turning off with a switch.
|
||||
return !CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kDisableSeccompSandbox);
|
||||
-#endif // NDEBUG
|
||||
}
|
||||
#endif // SECCOMP_SANDBOX
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff --git a/media/media.gyp b/media/media.gyp
|
||||
index 2a8c6c6..66ca767 100644
|
||||
--- a/media/media.gyp
|
||||
+++ b/media/media.gyp
|
||||
@@ -399,6 +399,7 @@
|
||||
['use_pulseaudio == 1', {
|
||||
'cflags': [
|
||||
'<!@(pkg-config --cflags libpulse)',
|
||||
+ '-Wno-array-bounds',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
version = "21.0.1179.1";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1179.1.tar.bz2";
|
||||
sha256 = "1ynm1dv8nwjg6a0absid1g3r62y0mpb74pmal8g9nmqb92rlkdnc";
|
||||
}
|
34
pkgs/applications/networking/browsers/chromium/update.sh
Executable file
34
pkgs/applications/networking/browsers/chromium/update.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
bucket_url="http://commondatastorage.googleapis.com/chromium-browser-official/";
|
||||
|
||||
get_newest_version()
|
||||
{
|
||||
curl -s "$bucket_url" | sed -ne ' H;/<[Kk][Ee][Yy]>chromium-[^<]*</h;${
|
||||
g;s/^.*<Key>chromium-\([^<.]\+\(\.[^<.]\+\)\+\)\.tar\.bz2<.*$/\1/p
|
||||
}';
|
||||
}
|
||||
|
||||
cd "$(dirname "$0")";
|
||||
|
||||
version="$(get_newest_version)";
|
||||
|
||||
if [ -e source.nix ]; then
|
||||
oldver="$(sed -n 's/^ *version *= *"\([^"]\+\)".*$/\1/p' source.nix)";
|
||||
if [ "x$oldver" = "x$version" ]; then
|
||||
echo "Already the newest version: $version" >&2;
|
||||
exit 1;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
url="${bucket_url%/}/chromium-$version.tar.bz2";
|
||||
|
||||
sha256="$(nix-prefetch-url "$url")";
|
||||
|
||||
cat > source.nix <<EOF
|
||||
{
|
||||
version = "$version";
|
||||
url = "$url";
|
||||
sha256 = "$sha256";
|
||||
}
|
||||
EOF
|
@ -6340,14 +6340,13 @@ let
|
||||
xulrunner = firefox36Pkgs.xulrunner;
|
||||
};
|
||||
|
||||
chrome = lowPrio (callPackage ../applications/networking/browsers/chromium {
|
||||
inherit (gnome) GConf;
|
||||
libpng = libpng12;
|
||||
chromium = lowPrio (callPackage ../applications/networking/browsers/chromium {
|
||||
gconf = gnome.GConf;
|
||||
});
|
||||
|
||||
chromeWrapper = wrapFirefox
|
||||
{ browser = chrome; browserName = "chrome"; desktopName = "Chrome";
|
||||
icon = "${chrome}/libexec/chrome/product_logo_48.png";
|
||||
{ browser = chromium; browserName = chromium.packageName; desktopName = "Chromium";
|
||||
icon = "${chromium}/share/icons/hicolor/48x48/apps/${chromium.packageName}.png";
|
||||
};
|
||||
|
||||
cinelerra = callPackage ../applications/video/cinelerra { };
|
||||
|
Loading…
Reference in New Issue
Block a user