firefox-bin: use wrapGAppsHook

This commit is contained in:
Nikolay Amiantov 2017-04-23 16:34:24 +03:00
parent 9f6baaa89a
commit 6df350ffc8

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, config, makeWrapper { stdenv, fetchurl, config, wrapGAppsHook
, alsaLib , alsaLib
, atk , atk
, cairo , cairo
@ -77,7 +77,7 @@ stdenv.mkDerivation {
src = fetchurl { inherit (source) url sha512; }; src = fetchurl { inherit (source) url sha512; };
phases = "unpackPhase installPhase"; phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.cc [ stdenv.cc.cc
@ -124,11 +124,12 @@ stdenv.mkDerivation {
stdenv.cc.cc stdenv.cc.cc
]; ];
buildInputs = [ makeWrapper gtk3 defaultIconTheme ]; buildInputs = [ wrapGAppsHook gtk3 defaultIconTheme ];
# "strip" after "patchelf" may break binaries. # "strip" after "patchelf" may break binaries.
# See: https://github.com/NixOS/patchelf/issues/10 # See: https://github.com/NixOS/patchelf/issues/10
dontStrip = 1; dontStrip = true;
dontPatchELF = true;
installPhase = installPhase =
'' ''
@ -167,10 +168,7 @@ stdenv.mkDerivation {
Categories=Application;Network; Categories=Application;Network;
EOF EOF
wrapProgram "$out/bin/firefox" \ gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
--argv0 "$out/bin/.firefox-wrapped" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:" \
--suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
''; '';
passthru.ffmpegSupport = true; passthru.ffmpegSupport = true;