2016-12-25 11:32:24 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, alsaLib
|
|
|
|
, atk
|
|
|
|
, bzip2
|
|
|
|
, cairo
|
|
|
|
, curl
|
|
|
|
, expat
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
2019-05-22 12:03:39 +01:00
|
|
|
, gdk-pixbuf
|
2016-12-25 11:32:24 +00:00
|
|
|
, glib
|
|
|
|
, glibc
|
|
|
|
, graphite2
|
|
|
|
, gtk2
|
|
|
|
, harfbuzz
|
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, libX11
|
|
|
|
, libXau
|
|
|
|
, libXcomposite
|
|
|
|
, libXcursor
|
|
|
|
, libXdamage
|
|
|
|
, libXdmcp
|
|
|
|
, libXext
|
|
|
|
, libXfixes
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXrender
|
|
|
|
, libXt
|
|
|
|
, libXxf86vm
|
|
|
|
, libdrm
|
|
|
|
, libffi
|
2018-11-07 15:36:30 +00:00
|
|
|
, libglvnd
|
2016-12-25 11:32:24 +00:00
|
|
|
, libpng
|
|
|
|
, libvdpau
|
|
|
|
, libxcb
|
|
|
|
, libxshmfence
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, pango
|
|
|
|
, pcre
|
|
|
|
, pixman
|
|
|
|
, zlib
|
|
|
|
, unzip
|
|
|
|
, 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
arch =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2016-12-25 11:32:24 +00:00
|
|
|
"x86_64"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then
|
2016-12-25 11:32:24 +00:00
|
|
|
"i386"
|
|
|
|
else throw "Flash Player is not supported on this platform";
|
|
|
|
lib_suffix =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2016-12-25 11:32:24 +00:00
|
|
|
"64"
|
|
|
|
else
|
|
|
|
"";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "flashplayer";
|
2020-02-11 12:15:08 +00:00
|
|
|
version = "32.0.0.330";
|
2016-12-25 11:32:24 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url =
|
|
|
|
if debug then
|
2018-12-05 12:13:07 +00:00
|
|
|
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_npapi_linux_debug.${arch}.tar.gz"
|
2016-12-25 11:32:24 +00:00
|
|
|
else
|
|
|
|
"https://fpdownload.adobe.com/get/flashplayer/pdc/${version}/flash_player_npapi_linux.${arch}.tar.gz";
|
|
|
|
sha256 =
|
|
|
|
if debug then
|
|
|
|
if arch == "x86_64" then
|
2020-02-11 12:15:08 +00:00
|
|
|
"1k7h1p6g1vf96v31j1n8638jdxacap0729n0dnmh6l0h5q518k1b"
|
2016-12-25 11:32:24 +00:00
|
|
|
else
|
2020-02-11 12:15:08 +00:00
|
|
|
"0gabgllx79s6rhv0zivfj6z79rcsdrzrdm94xdr19c11dsbqxd6b"
|
2016-12-25 11:32:24 +00:00
|
|
|
else
|
|
|
|
if arch == "x86_64" then
|
2020-02-11 12:15:08 +00:00
|
|
|
"1pf3k1x8c2kbkc9pf9y5n4jilp3g41v8v0q5ng77sbnl92s35zsj"
|
2016-12-25 11:32:24 +00:00
|
|
|
else
|
2020-02-11 12:15:08 +00:00
|
|
|
"1xibm6ffm09c553g100cgb6grnk21dfq8m81yy0jskph157vg962";
|
2016-12-25 11:32:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/mozilla/plugins
|
|
|
|
cp -pv libflashplayer.so $out/lib/mozilla/plugins
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -pv usr/bin/flash-player-properties $out/bin
|
|
|
|
|
|
|
|
mkdir -p $out/lib${lib_suffix}/kde4
|
|
|
|
cp -pv usr/lib${lib_suffix}/kde4/kcm_adobe_flash_player.so $out/lib${lib_suffix}/kde4
|
|
|
|
|
|
|
|
patchelf --set-rpath "$rpath" \
|
|
|
|
$out/lib/mozilla/plugins/libflashplayer.so \
|
|
|
|
$out/lib${lib_suffix}/kde4/kcm_adobe_flash_player.so
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath "$rpath" \
|
|
|
|
$out/bin/flash-player-properties
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
mozillaPlugin = "/lib/mozilla/plugins";
|
|
|
|
};
|
|
|
|
|
|
|
|
rpath = lib.makeLibraryPath
|
|
|
|
[ stdenv.cc.cc
|
2019-05-22 12:03:39 +01:00
|
|
|
alsaLib atk bzip2 cairo curl expat fontconfig freetype gdk-pixbuf glib
|
2016-12-25 11:32:24 +00:00
|
|
|
glibc graphite2 gtk2 harfbuzz libICE libSM libX11 libXau libXcomposite
|
|
|
|
libXcursor libXdamage libXdmcp libXext libXfixes libXi libXinerama
|
2018-11-07 15:36:30 +00:00
|
|
|
libXrandr libXrender libXt libXxf86vm libdrm libffi libglvnd libpng
|
|
|
|
libvdpau libxcb libxshmfence nspr nss pango pcre pixman zlib
|
2016-12-25 11:32:24 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Adobe Flash Player browser plugin";
|
|
|
|
homepage = http://www.adobe.com/products/flashplayer/;
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
2019-09-11 14:59:24 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ taku0 ];
|
2016-12-25 11:32:24 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|