git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #12577 from zohl/flashplayer

Standalone flashplayers

commit5bc8f09b65893eb190de0896d27fa07f1c897f0d authorNikolay Amiantov <ab@fmap.me> dateTue 26 Jan 2016, 00:49 (11 years ago) parent5009b4ad9066cd
2 files changed+37−3
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix+33−3 pkgs/top-level/all-packages.nix+4
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix+33−3
@@ -1,4 +1,5 @@
11{ stdenv
2+, lib
23, fetchurl
34, zlib
45, alsaLib
@@ -54,6 +55,7 @@ let
5455 else "_linux.i386"
5556 else throw "Flash Player is not supported on this platform";
5657
58+ is-i686 = (stdenv.system == "i686-linux");
5759in
5860stdenv.mkDerivation rec {
5961 name = "flashplayer-${version}";
@@ -67,19 +69,47 @@ stdenv.mkDerivation rec {
6769 buildInputs = [ unzip ];
6870
6971 postUnpack = ''
70− cd */*${arch}
71− tar -xvzf *${suffix}.tar.gz
72+ pushd $sourceRoot
73+ tar -xvzf *${arch}/*${suffix}.tar.gz
74+
75+ ${ lib.optionalString is-i686 ''
76+ tar -xvzf */*_sa.*.tar.gz
77+ tar -xvzf */*_sa_debug.*.tar.gz
78+ ''}
79+
80+ popd
7281 '';
7382
74− sourceRoot = ".";
83+ sourceRoot = "fp_${version}_archive";
7584
7685 dontStrip = true;
7786 dontPatchELF = true;
7887
88+ outputs = [ "out" ] ++ lib.optionals is-i686 ["sa" "saDbg" ];
89+
7990 installPhase = ''
8091 mkdir -p $out/lib/mozilla/plugins
8192 cp -pv libflashplayer.so $out/lib/mozilla/plugins
8293 patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
94+
95+ ${ lib.optionalString is-i686 ''
96+ mkdir -p $sa/bin
97+ cp flashplayer $sa/bin/
98+
99+ patchelf \
100+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
101+ --set-rpath "$rpath" \
102+ $sa/bin/flashplayer
103+
104+
105+ mkdir -p $saDbg/bin
106+ cp flashplayerdebugger $saDbg/bin/
107+
108+ patchelf \
109+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
110+ --set-rpath "$rpath" \
111+ $saDbg/bin/flashplayerdebugger
112+ ''}
83113 '';
84114
85115 passthru = {
pkgs/top-level/all-packages.nix+4
@@ -11950,6 +11950,10 @@ let
1195011950 debug = config.flashplayer.debug or false;
1195111951 };
1195211952
11953+ flashplayer-standalone = pkgsi686Linux.flashplayer.sa;
11954+
11955+ flashplayer-standalone-debugger = pkgsi686Linux.flashplayer.saDbg;
11956+
1195311957 fluxbox = callPackage ../applications/window-managers/fluxbox { };
1195411958
1195511959 fme = callPackage ../applications/misc/fme {