summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-08 17:18:54 +0300
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-05-02 16:45:55 +0200
commit2a72b02b5bc8b761ed8a8e6d66b56fd12546f522 (patch)
treece641660b5087a8821b0e4d64da54d9733917d02
parentflashplayer: fix build on 32-bit platform (diff)
downloadnixpkgs-2a72b02b5bc8b761ed8a8e6d66b56fd12546f522.tar.gz
flashplayer: cleanup, add comment to maintainers
(cherry picked from commit d45ac41e8740a96d59860dfe7c404041a2ed962b)
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix56
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 27 insertions, 31 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 b624bfe65192..d1a00f1bd044 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -36,6 +36,13 @@
}:
+/* When updating this package, test that the following derivations build:
+
+ * flashplayer
+ * flashplayer-standalone
+ * flashplayer-standalone-debugger
+*/
+
let
arch =
if stdenv.system == "x86_64-linux" then
@@ -55,6 +62,10 @@ let
else "_linux.i386"
else throw "Flash Player is not supported on this platform";
+ saname =
+ if debug then "flashplayerdebugger"
+ else "flashplayer";
+
is-i686 = (stdenv.system == "i686-linux");
in
stdenv.mkDerivation rec {
@@ -66,53 +77,38 @@ stdenv.mkDerivation rec {
sha256 = "0y4bjkla6ils4crmx61pi31s4gscy8rgiv7xccx1z0g6hba9j73l";
};
- buildInputs = [ unzip ];
+ nativeBuildInputs = [ unzip ];
+
+ sourceRoot = ".";
postUnpack = ''
- pushd $sourceRoot
+ cd *${arch}
+
tar -xvzf *${suffix}.tar.gz
- ${ lib.optionalString is-i686 ''
+ ${lib.optionalString is-i686 ''
tar -xvzf *_sa[_.]*.tar.gz
''}
-
- popd
- '';
-
- setSourceRoot = ''
- sourceRoot=$(ls -d *${arch})
'';
dontStrip = true;
dontPatchELF = true;
- outputs = [ "out" ] ++ lib.optional (is-i686 && !debug) "sa" ++ lib.optional (is-i686 && debug) "saDbg";
+ outputs = [ "out" ] ++ lib.optional is-i686 "sa";
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 ''
- ${ lib.optionalString (!debug) ''
- mkdir -p $sa/bin
- cp flashplayer $sa/bin/
- patchelf \
- --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
- --set-rpath "$rpath" \
- $sa/bin/flashplayer
- ''}
+ patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
- ${ lib.optionalString debug ''
- mkdir -p $saDbg/bin
- cp flashplayerdebugger $saDbg/bin/
+ ${lib.optionalString is-i686 ''
+ install -Dm755 ${saname} $sa/bin/flashplayer
- patchelf \
- --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
- --set-rpath "$rpath" \
- $saDbg/bin/flashplayerdebugger
- ''}
+ patchelf \
+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+ --set-rpath "$rpath" \
+ $sa/bin/flashplayer
''}
'';
@@ -120,7 +116,7 @@ stdenv.mkDerivation rec {
mozillaPlugin = "/lib/mozilla/plugins";
};
- rpath = stdenv.lib.makeLibraryPath
+ rpath = lib.makeLibraryPath
[ zlib alsaLib curl nspr fontconfig freetype expat libX11
libXext libXrender libXcursor libXt gtk glib pango atk cairo gdk_pixbuf
libvdpau nss
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ea2c322bfbc1..fc42a771e640 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11573,7 +11573,7 @@ let
flashplayer-standalone = pkgsi686Linux.flashplayer.sa;
- flashplayer-standalone-debugger = pkgsi686Linux.flashplayer.saDbg;
+ flashplayer-standalone-debugger = (pkgsi686Linux.flashplayer.override { debug = true; }).sa;
fluxbox = callPackage ../applications/window-managers/fluxbox { };