chromium/plugins: Use Debian package from sources.

This now uses the Debian package from the sources derivation instead of
hardcoding it, so we finally should have proper PepperAPI plugin support
without crashing plugins and whatnot.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-27 09:49:46 +01:00
parent 6184ee89fe
commit cad411f61d
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
3 changed files with 16 additions and 16 deletions

View File

@ -1,7 +1,8 @@
{ stdenv
, enablePepperFlash ? false
, enablePepperPDF ? false
, fetchurl # XXX
, source
}:
with stdenv.lib;
@ -11,21 +12,20 @@ let
name = "chromium-binary-plugins";
# XXX: Only temporary and has to be version-specific
src = fetchurl {
url = "https://dl.google.com/linux/chrome/deb/pool/main/g/"
+ "google-chrome-unstable/google-chrome-unstable_"
+ "35.0.1897.2-1_amd64.deb";
sha1 = "b68683fc5321d10536e4135c266b14894b7668ed";
};
src = source.plugins;
phases = [ "unpackPhase" "patchPhase" "checkPhase" "installPhase" ];
outputs = [ "pdf" "flash" ];
unpackCmd = ''
unpackCmd = let
chan = if source.channel == "dev" then "chrome-unstable"
else if source.channel == "stable" then "chrome"
else "chrome-${source.channel}";
in ''
ensureDir plugins
ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \
./opt/google/chrome-unstable/PepperFlash \
./opt/google/chrome-unstable/libpdf.so
./opt/google/${chan}/PepperFlash \
./opt/google/${chan}/libpdf.so
'';
doCheck = true;

View File

@ -12,9 +12,7 @@ with (import ./update.nix {
stdenv.mkDerivation {
name = "chromium-source-${version}";
src = fetchurl {
inherit url sha256;
};
src = fetchurl main;
buildInputs = [ python ]; # cannot patch shebangs otherwise
@ -72,6 +70,7 @@ stdenv.mkDerivation {
'';
passthru = {
inherit version;
inherit version channel;
plugins = fetchurl binary;
};
}

View File

@ -48,9 +48,11 @@ in rec {
getChannel = channel: let
chanAttrs = builtins.getAttr channel sources;
in {
inherit (chanAttrs) version;
main = {
url = "${bucketURL}/chromium-${chanAttrs.version}.tar.xz";
inherit (chanAttrs) version sha256;
inherit (chanAttrs) sha256;
};
binary = let
@ -64,7 +66,6 @@ in rec {
sha256 = if stdenv.is64bit
then chanAttrs.sha256bin64
else chanAttrs.sha256bin32;
inherit (chanAttrs) version;
};
};