git.iko.soy/typeable/nixpkgs
on master help sign in
chromium: Switch to use open-source PDF plugin.

The Chromium PDF plugin is now available as open source software and is already included in the Chromium source tree in current stable, so there is no need to extract it from the Chrome binary package anymore. See release announcement at http://blog.foxitsoftware.com/?p=641 Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit7eb4d3a3a9c65ec18eb1f5c8ad5872359ad51887 authoraszlig <aszlig@redmoonstudios.org> dateFri 21 Nov 2014, 16:34 (12 years ago) parent45c4d68
4 files changed+4−22
pkgs/applications/networking/browsers/chromium/browser.nix+1−1 pkgs/applications/networking/browsers/chromium/default.nix+1−2 pkgs/applications/networking/browsers/chromium/plugins.nix+2−18 pkgs/top-level/all-packages.nix−1
pkgs/applications/networking/browsers/chromium/browser.nix+1−1
@@ -12,7 +12,7 @@ mkChromiumDerivation (base: rec {
1212 cp -v "$buildPath/"*.pak "$libExecPath/"
1313 cp -v "$buildPath/icudtl.dat" "$libExecPath/"
1414 cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
15− cp -v $buildPath/libffmpegsumo.so "$libExecPath/"
15+ cp -v "$buildPath/libpdf.so" "$buildPath/libffmpegsumo.so" "$libExecPath/"
1616
1717 cp -v "$buildPath/chrome" "$libExecPath/$packageName"
1818
pkgs/applications/networking/browsers/chromium/default.nix+1−2
@@ -9,7 +9,6 @@
99, gnomeKeyringSupport ? false
1010, proprietaryCodecs ? true
1111, enablePepperFlash ? false
12−, enablePepperPDF ? false
1312, enableWideVine ? false
1413, cupsSupport ? false
1514, pulseSupport ? false
@@ -36,7 +35,7 @@ let
3635 sandbox = callPackage ./sandbox.nix { };
3736
3837 plugins = callPackage ./plugins.nix {
39− inherit enablePepperFlash enablePepperPDF enableWideVine;
38+ inherit enablePepperFlash enableWideVine;
4039 };
4140 };
4241
pkgs/applications/networking/browsers/chromium/plugins.nix+2−18
@@ -1,6 +1,5 @@
11{ stdenv
22, enablePepperFlash ? false
3−, enablePepperPDF ? false
43, enableWideVine ? false
54
65, source
@@ -16,7 +15,7 @@ let
1615 src = source.plugins;
1716
1817 phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
19− outputs = [ "pdf" "flash" "widevine" ];
18+ outputs = [ "flash" "widevine" ];
2019
2120 unpackCmd = let
2221 chan = if source.channel == "dev" then "chrome-unstable"
@@ -26,7 +25,6 @@ let
2625 mkdir -p plugins
2726 ar p "$src" data.tar.lzma | tar xJ -C plugins --strip-components=4 \
2827 ./opt/google/${chan}/PepperFlash \
29− ./opt/google/${chan}/libpdf.so \
3028 ./opt/google/${chan}/libwidevinecdm.so \
3129 ./opt/google/${chan}/libwidevinecdmadapter.so
3230 '';
@@ -40,7 +38,7 @@ let
4038 rpaths = [ stdenv.gcc.gcc ];
4139 mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}";
4240 in ''
43− for sofile in PepperFlash/libpepflashplayer.so libpdf.so \
41+ for sofile in PepperFlash/libpepflashplayer.so \
4442 libwidevinecdm.so libwidevinecdmadapter.so; do
4543 chmod +x "$sofile"
4644 patchelf --set-rpath "${mkrpath rpaths}" "$sofile"
@@ -51,25 +49,12 @@ let
5149 '';
5250
5351 installPhase = let
54− pdfName = "Chrome PDF Viewer";
55− pdfDescription = "Portable Document Format";
56− pdfMimeTypes = concatStringsSep ";" [
57− "application/pdf"
58− "application/x-google-chrome-print-preview-pdf"
59− ];
60− pdfInfo = "#${pdfName}#${pdfDescription};${pdfMimeTypes}";
61−
6252 wvName = "Widevine Content Decryption Module";
6353 wvDescription = "Playback of encrypted HTML audio/video content";
6454 wvMimeTypes = "application/x-ppapi-widevine-cdm";
6555 wvModule = "$widevine/lib/libwidevinecdmadapter.so";
6656 wvInfo = "#${wvName}#${wvDescription}:${wvMimeTypes}";
6757 in ''
68− install -vD libpdf.so "$pdf/lib/libpdf.so"
69− mkdir -p "$pdf/nix-support"
70− echo "--register-pepper-plugins='$pdf/lib/libpdf.so${pdfInfo}'" \
71− > "$pdf/nix-support/chromium-flags"
72−
7358 flashVersion="$(
7459 sed -n -r 's/.*"version": "([^"]+)",.*/\1/p' PepperFlash/manifest.json
7560 )"
@@ -94,7 +79,6 @@ let
9479
9580 passthru = let
9681 enabledPlugins = optional enablePepperFlash plugins.flash
97− ++ optional enablePepperPDF plugins.pdf
9882 ++ optional enableWideVine plugins.widevine;
9983 getFlags = plugin: "$(< ${plugin}/nix-support/chromium-flags)";
10084 getEnvVars = plugin: "$(< ${plugin}/nix-support/chromium-env-vars)";
pkgs/top-level/all-packages.nix−1
@@ -9120,7 +9120,6 @@ let
91209120 channel = "stable";
91219121 pulseSupport = config.pulseaudio or true;
91229122 enablePepperFlash = config.chromium.enablePepperFlash or false;
9123− enablePepperPDF = config.chromium.enablePepperPDF or false;
91249123 hiDPISupport = config.chromium.hiDPISupport or false;
91259124 };
91269125