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-04-19 03:58:45 +02:00
parent 6184ee89fe
commit cad411f61d
3 changed files with 16 additions and 16 deletions
@@ -1,7 +1,8 @@
{ stdenv { stdenv
, enablePepperFlash ? false , enablePepperFlash ? false
, enablePepperPDF ? false , enablePepperPDF ? false
, fetchurl # XXX
, source
}: }:
with stdenv.lib; with stdenv.lib;
@@ -11,21 +12,20 @@ let
name = "chromium-binary-plugins"; name = "chromium-binary-plugins";
# XXX: Only temporary and has to be version-specific # XXX: Only temporary and has to be version-specific
src = fetchurl { src = source.plugins;
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";
};
phases = [ "unpackPhase" "patchPhase" "checkPhase" "installPhase" ]; phases = [ "unpackPhase" "patchPhase" "checkPhase" "installPhase" ];
outputs = [ "pdf" "flash" ]; 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 ensureDir plugins
ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \ ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \
./opt/google/chrome-unstable/PepperFlash \ ./opt/google/${chan}/PepperFlash \
./opt/google/chrome-unstable/libpdf.so ./opt/google/${chan}/libpdf.so
''; '';
doCheck = true; doCheck = true;
@@ -12,9 +12,7 @@ with (import ./update.nix {
stdenv.mkDerivation { stdenv.mkDerivation {
name = "chromium-source-${version}"; name = "chromium-source-${version}";
src = fetchurl { src = fetchurl main;
inherit url sha256;
};
buildInputs = [ python ]; # cannot patch shebangs otherwise buildInputs = [ python ]; # cannot patch shebangs otherwise
@@ -72,6 +70,7 @@ stdenv.mkDerivation {
''; '';
passthru = { passthru = {
inherit version; inherit version channel;
plugins = fetchurl binary;
}; };
} }
@@ -48,9 +48,11 @@ in rec {
getChannel = channel: let getChannel = channel: let
chanAttrs = builtins.getAttr channel sources; chanAttrs = builtins.getAttr channel sources;
in { in {
inherit (chanAttrs) version;
main = { main = {
url = "${bucketURL}/chromium-${chanAttrs.version}.tar.xz"; url = "${bucketURL}/chromium-${chanAttrs.version}.tar.xz";
inherit (chanAttrs) version sha256; inherit (chanAttrs) sha256;
}; };
binary = let binary = let
@@ -64,7 +66,6 @@ in rec {
sha256 = if stdenv.is64bit sha256 = if stdenv.is64bit
then chanAttrs.sha256bin64 then chanAttrs.sha256bin64
else chanAttrs.sha256bin32; else chanAttrs.sha256bin32;
inherit (chanAttrs) version;
}; };
}; };