nixpkgs/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix

103 lines
2.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchurl
, alsaLib
, atk
, bzip2
, cairo
, curl
, expat
, fontconfig
, freetype
, gdk_pixbuf
, glib
, glibc
, graphite2
, gtk2
, harfbuzz
, libICE
, libSM
, libX11
, libXau
, libXcomposite
, libXcursor
, libXdamage
, libXdmcp
, libXext
, libXfixes
, libXi
, libXinerama
, libXrandr
, libXrender
, libXt
, libXxf86vm
, libdrm
, libffi
, libpng
, libvdpau
, libxcb
, libxshmfence
, nspr
, nss
, pango
, pcre
, pixman
, zlib
, unzip
, debug ? false
}:
stdenv.mkDerivation rec {
name = "flashplayer-standalone-${version}";
2018-07-11 23:34:16 +00:00
version = "30.0.0.134";
src = fetchurl {
url =
if debug then
2018-06-07 19:16:42 +00:00
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/30/flash_player_sa_linux_debug.x86_64.tar.gz"
else
2018-06-07 19:16:42 +00:00
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/30/flash_player_sa_linux.x86_64.tar.gz";
sha256 =
if debug then
2018-07-12 13:05:17 +00:00
"1plmhv1799j0habmyxy7zhvilh823djmg4i387s6qifr5iv66pax"
else
2018-07-12 13:05:17 +00:00
"13cb7sca5mw5b1iiimyxbfxwpmdh7aya8rnlhkv3fgk5a1jwrxqr";
};
nativeBuildInputs = [ unzip ];
sourceRoot = ".";
dontStrip = true;
dontPatchELF = true;
preferLocalBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -pv flashplayer${lib.optionalString debug "debugger"} $out/bin
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$rpath" \
$out/bin/flashplayer${lib.optionalString debug "debugger"}
'';
rpath = lib.makeLibraryPath
[ stdenv.cc.cc
alsaLib atk bzip2 cairo curl expat fontconfig freetype gdk_pixbuf glib
glibc graphite2 gtk2 harfbuzz libICE libSM libX11 libXau libXcomposite
libXcursor libXdamage libXdmcp libXext libXfixes libXi libXinerama
libXrandr libXrender libXt libXxf86vm libdrm libffi libpng libvdpau
libxcb libxshmfence nspr nss pango pcre pixman zlib
];
meta = {
description = "Adobe Flash Player standalone executable";
homepage = https://www.adobe.com/support/flashplayer/debug_downloads.html;
license = stdenv.lib.licenses.unfree;
maintainers = [];
platforms = [ "x86_64-linux" ];
};
}