summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-02-03 16:54:03 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-02-03 16:57:19 +0100
commitae74c356d94b795eb07dfe9978788b49b70f5959 (patch)
treec13c6894b75f95d3a4dc4627efef508bb03dfba8 /pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
parentc9790126312119ce5a2a8ac946d9f086e7ea9f55 (diff)
parent53e0f8b1cdf36574bfede6e62e2ac2739c3ef804 (diff)
downloadnixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.gz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.bz2
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.lz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.xz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.zst
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.zip
Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
Diffstat (limited to 'pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix36
1 files changed, 33 insertions, 3 deletions
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index 9521e1debd7..f29f569cd3a 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -1,4 +1,5 @@
 { stdenv
+, lib
 , fetchurl
 , zlib
 , alsaLib
@@ -54,6 +55,7 @@ let
       else             "_linux.i386"
     else throw "Flash Player is not supported on this platform";
 
+  is-i686 = (stdenv.system == "i686-linux");
 in
 stdenv.mkDerivation rec {
   name = "flashplayer-${version}";
@@ -67,19 +69,47 @@ stdenv.mkDerivation rec {
   buildInputs = [ unzip ];
 
   postUnpack = ''
-    cd */*${arch}
-    tar -xvzf *${suffix}.tar.gz
+    pushd $sourceRoot
+    tar -xvzf *${arch}/*${suffix}.tar.gz
+
+    ${ lib.optionalString is-i686 ''
+       tar -xvzf */*_sa.*.tar.gz
+       tar -xvzf */*_sa_debug.*.tar.gz
+    ''}
+
+    popd
   '';
 
-  sourceRoot = ".";
+  sourceRoot = "fp_${version}_archive";
 
   dontStrip = true;
   dontPatchELF = true;
 
+  outputs = [ "out" ] ++ lib.optionals is-i686 ["sa" "saDbg" ];
+
   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
+
+    ${ lib.optionalString is-i686 ''
+       mkdir -p $sa/bin
+       cp flashplayer $sa/bin/
+
+       patchelf \
+         --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+         --set-rpath "$rpath" \
+         $sa/bin/flashplayer
+
+
+       mkdir -p $saDbg/bin
+       cp flashplayerdebugger $saDbg/bin/
+
+       patchelf \
+         --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+         --set-rpath "$rpath" \
+         $saDbg/bin/flashplayerdebugger
+    ''}
   '';
 
   passthru = {