Merge pull request #36 from aszlig/chromium-channels
Use chromium release channels
This commit is contained in:
commit
6ba310e908
@ -1,5 +1,8 @@
|
||||
{ stdenv, getConfig, fetchurl, makeWrapper, which
|
||||
|
||||
# this is needed in order to build the versions older than 21.x
|
||||
, subversion
|
||||
|
||||
# default dependencies
|
||||
, bzip2, flac, speex
|
||||
, libevent, expat, libjpeg
|
||||
@ -26,6 +29,7 @@ let
|
||||
mkConfigurable = stdenv.lib.mapAttrs (flag: default: getConfig ["chromium" flag] default);
|
||||
|
||||
config = mkConfigurable {
|
||||
channel = "stable";
|
||||
selinux = false;
|
||||
nacl = false;
|
||||
openssl = true;
|
||||
@ -36,7 +40,7 @@ let
|
||||
pulseaudio = getConfig ["pulseaudio"] true;
|
||||
};
|
||||
|
||||
sourceInfo = import ./source.nix;
|
||||
sourceInfo = builtins.getAttr config.channel (import ./sources.nix);
|
||||
|
||||
mkGypFlags = with stdenv.lib; let
|
||||
sanitize = value:
|
||||
@ -69,12 +73,14 @@ let
|
||||
use_system_v8 = false;
|
||||
};
|
||||
|
||||
needsSubversion = stdenv.lib.versionOlder sourceInfo.version "21.0.0.0";
|
||||
|
||||
defaultDependencies = [
|
||||
bzip2 flac speex
|
||||
libevent expat libjpeg
|
||||
libpng libxml2 libxslt
|
||||
xdg_utils yasm zlib
|
||||
];
|
||||
] ++ stdenv.lib.optional needsSubversion subversion;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "${packageName}-${version}";
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
version = "21.0.1179.1";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1179.1.tar.bz2";
|
||||
sha256 = "1ynm1dv8nwjg6a0absid1g3r62y0mpb74pmal8g9nmqb92rlkdnc";
|
||||
}
|
19
pkgs/applications/networking/browsers/chromium/sources.nix
Normal file
19
pkgs/applications/networking/browsers/chromium/sources.nix
Normal file
@ -0,0 +1,19 @@
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
# VHASH: 5e5af2017fa2e05f11aa741c6f87fff0549b93e3bc2aa40e6cc0a0aff84ba010
|
||||
{
|
||||
dev = {
|
||||
version = "21.0.1180.15";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1180.15.tar.bz2";
|
||||
sha256 = "0ahsrsyw4928vg1kl3dv44q77ksp85crw6m7fy20nq46qihb0mxa";
|
||||
};
|
||||
beta = {
|
||||
version = "20.0.1132.47";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-20.0.1132.47.tar.bz2";
|
||||
sha256 = "1rd1lfn9xchf4nrgi46van5aigqxj2n303890sslc4bcj6p8fkm3";
|
||||
};
|
||||
stable = {
|
||||
version = "20.0.1132.47";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-20.0.1132.47.tar.bz2";
|
||||
sha256 = "1rd1lfn9xchf4nrgi46van5aigqxj2n303890sslc4bcj6p8fkm3";
|
||||
};
|
||||
}
|
@ -1,34 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
channels_url="http://omahaproxy.appspot.com/";
|
||||
bucket_url="http://commondatastorage.googleapis.com/chromium-browser-official/";
|
||||
output_file="$(cd "$(dirname "$0")" && pwd)/sources.nix";
|
||||
|
||||
get_newest_version()
|
||||
get_channels()
|
||||
{
|
||||
curl -s "$bucket_url" | sed -ne ' H;/<[Kk][Ee][Yy]>chromium-[^<]*</h;${
|
||||
g;s/^.*<Key>chromium-\([^<.]\+\(\.[^<.]\+\)\+\)\.tar\.bz2<.*$/\1/p
|
||||
}';
|
||||
for chline in $(echo "$1" | cut -d, -f-2);
|
||||
do
|
||||
channel="${chline%%,*}";
|
||||
version="${chline##*,}";
|
||||
|
||||
url="${bucket_url%/}/chromium-$version.tar.bz2";
|
||||
|
||||
sha256="$(nix-prefetch-url "$url")";
|
||||
|
||||
echo " $channel = {";
|
||||
echo " version = \"$version\";";
|
||||
echo " url = \"$url\";";
|
||||
echo " sha256 = \"$sha256\";";
|
||||
echo " };";
|
||||
done;
|
||||
}
|
||||
|
||||
cd "$(dirname "$0")";
|
||||
|
||||
version="$(get_newest_version)";
|
||||
versions="$(curl -s "$channels_url" | sed -n -e 's/^linux,\(\([^,]\+,\)\{2\}\).*$/\1/p')";
|
||||
|
||||
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;
|
||||
if [ -e "$output_file" ];
|
||||
then
|
||||
vhash="$(echo "$versions" | sha256sum | cut -d' ' -f1)";
|
||||
old_vhash="$(sed -n 's/# *VHASH: *//p' "$output_file")";
|
||||
|
||||
if [ "x$vhash" = "x$old_vhash" ];
|
||||
then
|
||||
echo "$output_file is already up to date, bailing out." >&2;
|
||||
exit 1;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
url="${bucket_url%/}/chromium-$version.tar.bz2";
|
||||
channels="$(get_channels "$versions")";
|
||||
|
||||
sha256="$(nix-prefetch-url "$url")";
|
||||
|
||||
cat > source.nix <<EOF
|
||||
cat > "$output_file" <<-EOF
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
# VHASH: $vhash
|
||||
{
|
||||
version = "$version";
|
||||
url = "$url";
|
||||
sha256 = "$sha256";
|
||||
$channels
|
||||
}
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user