2011-12-03 16:16:17 +01:00
|
|
|
{ stdenv
|
2016-01-24 16:51:59 +01:00
|
|
|
, lib
|
2011-12-03 16:16:17 +01:00
|
|
|
, fetchurl
|
|
|
|
, zlib
|
|
|
|
, alsaLib
|
|
|
|
, curl
|
|
|
|
, nspr
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, expat
|
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, libXrender
|
2012-10-05 03:15:26 +02:00
|
|
|
, libXcursor
|
2011-12-03 16:16:17 +01:00
|
|
|
, libXt
|
2013-01-08 20:40:18 +01:00
|
|
|
, libvdpau
|
2016-09-11 23:24:51 +02:00
|
|
|
, gtk2
|
2011-12-03 16:16:17 +01:00
|
|
|
, glib
|
|
|
|
, pango
|
|
|
|
, cairo
|
|
|
|
, atk
|
|
|
|
, gdk_pixbuf
|
2013-02-28 01:22:00 +01:00
|
|
|
, nss
|
2015-12-13 14:25:35 +01:00
|
|
|
, unzip
|
2011-12-03 16:16:17 +01:00
|
|
|
, debug ? false
|
|
|
|
|
|
|
|
/* you have to add ~/mm.cfg :
|
|
|
|
|
|
|
|
TraceOutputFileEnable=1
|
|
|
|
ErrorReportingEnable=1
|
|
|
|
MaxWarnings=1
|
|
|
|
|
|
|
|
in order to read the flash trace at ~/.macromedia/Flash_Player/Logs/flashlog.txt
|
|
|
|
Then FlashBug (a FireFox plugin) shows the log as well
|
|
|
|
*/
|
|
|
|
|
|
|
|
}:
|
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
/* When updating this package, test that the following derivations build:
|
|
|
|
|
|
|
|
* flashplayer
|
|
|
|
* flashplayer-standalone
|
|
|
|
* flashplayer-standalone-debugger
|
|
|
|
*/
|
|
|
|
|
2011-12-03 16:16:17 +01:00
|
|
|
let
|
2015-12-13 14:25:35 +01:00
|
|
|
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";
|
2015-12-17 13:08:03 +01:00
|
|
|
|
|
|
|
suffix =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
if debug then throw "no x86_64 debugging version available"
|
2016-04-08 15:11:29 +02:00
|
|
|
else "_linux.x86_64"
|
2015-12-17 13:08:03 +01:00
|
|
|
else if stdenv.system == "i686-linux" then
|
|
|
|
if debug then "_linux_debug.i386"
|
|
|
|
else "_linux.i386"
|
|
|
|
else throw "Flash Player is not supported on this platform";
|
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
saname =
|
|
|
|
if debug then "flashplayerdebugger"
|
|
|
|
else "flashplayer";
|
|
|
|
|
2016-01-24 16:51:59 +01:00
|
|
|
is-i686 = (stdenv.system == "i686-linux");
|
2015-12-13 14:25:35 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "flashplayer-${version}";
|
2016-10-11 14:12:12 +02:00
|
|
|
version = "11.2.202.637";
|
2011-12-03 16:16:17 +01:00
|
|
|
|
2015-12-13 14:25:35 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_${version}_archive.zip";
|
2016-10-11 14:12:12 +02:00
|
|
|
sha256 = "0xp1pxhrnam4yi8wfwaifqx7m2im0zx2xv8xgbdm0llrzbkc57mh";
|
2015-12-13 14:25:35 +01:00
|
|
|
};
|
2011-12-03 16:16:17 +01:00
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2011-12-03 16:16:17 +01:00
|
|
|
|
2015-12-13 14:25:35 +01:00
|
|
|
postUnpack = ''
|
2016-04-08 16:18:54 +02:00
|
|
|
cd *${arch}
|
|
|
|
|
2016-04-08 15:11:29 +02:00
|
|
|
tar -xvzf *${suffix}.tar.gz
|
2016-01-24 16:51:59 +01:00
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
${lib.optionalString is-i686 ''
|
2016-04-08 15:33:14 +02:00
|
|
|
tar -xvzf *_sa[_.]*.tar.gz
|
2016-01-24 16:51:59 +01:00
|
|
|
''}
|
2016-04-08 15:11:29 +02:00
|
|
|
'';
|
2012-10-05 03:15:26 +02:00
|
|
|
|
2015-12-13 14:25:35 +01:00
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
2011-12-03 16:16:17 +01:00
|
|
|
|
2016-10-02 14:52:02 +02:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
outputs = [ "out" ] ++ lib.optional is-i686 "sa";
|
2016-01-24 16:51:59 +01:00
|
|
|
|
2015-12-13 14:25:35 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/mozilla/plugins
|
|
|
|
cp -pv libflashplayer.so $out/lib/mozilla/plugins
|
2016-04-08 16:18:54 +02:00
|
|
|
|
2015-12-13 14:25:35 +01:00
|
|
|
patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
|
2016-01-24 16:51:59 +01:00
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
${lib.optionalString is-i686 ''
|
|
|
|
install -Dm755 ${saname} $sa/bin/flashplayer
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath "$rpath" \
|
|
|
|
$sa/bin/flashplayer
|
2016-01-24 16:51:59 +01:00
|
|
|
''}
|
2015-12-13 14:25:35 +01:00
|
|
|
'';
|
2011-12-03 16:16:17 +01:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
mozillaPlugin = "/lib/mozilla/plugins";
|
|
|
|
};
|
|
|
|
|
2016-04-08 16:18:54 +02:00
|
|
|
rpath = lib.makeLibraryPath
|
2013-02-21 17:45:20 +01:00
|
|
|
[ zlib alsaLib curl nspr fontconfig freetype expat libX11
|
2016-09-11 23:24:51 +02:00
|
|
|
libXext libXrender libXcursor libXt gtk2 glib pango atk cairo gdk_pixbuf
|
2013-02-28 01:22:00 +01:00
|
|
|
libvdpau nss
|
2011-12-03 16:16:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Adobe Flash Player browser plugin";
|
|
|
|
homepage = http://www.adobe.com/products/flashplayer/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2015-12-12 14:57:38 +01:00
|
|
|
maintainers = [];
|
2015-12-17 13:08:03 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2011-12-03 16:16:17 +01:00
|
|
|
};
|
|
|
|
}
|