Merge pull request #11675 from abbradar/flashplayer-archive

flashplayer: cleanup, use archive as a source
This commit is contained in:
Eelco Dolstra 2015-12-14 13:56:20 +01:00
commit 1ae8f0f0f7
2 changed files with 29 additions and 57 deletions

View File

@ -1,23 +0,0 @@
source $stdenv/setup
dontStrip=1
dontPatchELF=1
sourceRoot=$TMPDIR
unpackPhase() {
tar xvzf $src;
for a in *; do
if [ -d $a ]; then
cd $a
break
fi
done
}
installPhase() {
mkdir -p $out/lib/mozilla/plugins
cp -pv libflashplayer.so $out/lib/mozilla/plugins
patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
}
genericBuild

View File

@ -20,6 +20,7 @@
, atk
, gdk_pixbuf
, nss
, unzip
, debug ? false
/* you have to add ~/mm.cfg :
@ -35,45 +36,41 @@
}:
let
# -> http://get.adobe.com/flashplayer/
arch =
if stdenv.system == "x86_64-linux" then
if debug then throw "no x86_64 debugging version available"
else "64bit"
else if stdenv.system == "i686-linux" then
if debug then "32bit_debug"
else "32bit"
else throw "Flash Player is not supported on this platform";
in
stdenv.mkDerivation rec {
name = "flashplayer-${version}";
version = "11.2.202.554";
src =
if stdenv.system == "x86_64-linux" then
if debug then
# no plans to provide a x86_64 version:
# http://labs.adobe.com/technologies/flashplayer10/faq.html
throw "no x86_64 debugging version available"
else rec {
inherit version;
url = "http://fpdownload.adobe.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
sha256 = "15zziclffvsa0wpygkwzbh3v367n73pmzwsnkanhg75rv28dgl3x";
}
else if stdenv.system == "i686-linux" then
if debug then
throw "flash debugging version is outdated and probably broken" /* {
# The debug version also contains a player
version = "11.1";
url = http://fpdownload.adobe.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug.i386.tar.gz;
sha256 = "0jn7klq2cyqasj6nxfka2l8nsf7sn7hi6443nv6dd2sb3g7m6x92";
}*/
else rec {
inherit version;
url = "http://fpdownload.adobe.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
sha256 = "1a26l6lz5l6qbx4lm7266pzk0zr77h6issbnayr6df9qj99bppyz";
}
else throw "Flash Player is not supported on this platform";
src = fetchurl {
url = "https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_${version}_archive.zip";
sha256 = "0pjan07k419pk3lmfdl5vww0ipf5b76cxqhxwjrikb1fc4x993fi";
};
in
buildInputs = [ unzip ];
stdenv.mkDerivation {
name = "flashplayer-${src.version}";
postUnpack = ''
cd */*${arch}
tar -xvzf flash-plugin*.tar.gz
'';
builder = ./builder.sh;
sourceRoot = ".";
src = fetchurl { inherit (src) url sha256; };
dontStrip = true;
dontPatchELF = true;
inherit zlib alsaLib;
installPhase = ''
mkdir -p $out/lib/mozilla/plugins
cp -pv libflashplayer.so $out/lib/mozilla/plugins
patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
'';
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
@ -85,8 +82,6 @@ stdenv.mkDerivation {
libvdpau nss
];
buildPhase = ":";
meta = {
description = "Adobe Flash Player browser plugin";
homepage = http://www.adobe.com/products/flashplayer/;