Merge #24858: Smart wrapProgram
This commit is contained in:
commit
aeb0560959
|
@ -74,11 +74,8 @@ in buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
mv $out/bin/qutebrowser $out/bin/.qutebrowser-noqtpath
|
wrapQtProgram $out/bin/qutebrowser \
|
||||||
makeQtWrapper $out/bin/.qutebrowser-noqtpath $out/bin/qutebrowser \
|
|
||||||
${lib.optionalString withWebEngineDefault ''--add-flags "--backend webengine"''}
|
${lib.optionalString withWebEngineDefault ''--add-flags "--backend webengine"''}
|
||||||
|
|
||||||
sed -i 's/\.qutebrowser-wrapped/qutebrowser/g' $out/bin/..qutebrowser-wrapped-wrapped
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -132,6 +132,9 @@ wrapProgram() {
|
||||||
local prog="$1"
|
local prog="$1"
|
||||||
local hidden
|
local hidden
|
||||||
hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
|
hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
|
||||||
|
while [ -e "$hidden" ]; do
|
||||||
|
hidden="${hidden}_"
|
||||||
|
done
|
||||||
mv "$prog" "$hidden"
|
mv "$prog" "$hidden"
|
||||||
# Silence warning about unexpanded $0:
|
# Silence warning about unexpanded $0:
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, lib, fetchurl, intltool, pkgconfig, pythonPackages, bluez, polkit, gtk3
|
{ stdenv, lib, fetchurl, intltool, pkgconfig, pythonPackages, bluez, polkit, gtk3
|
||||||
, obex_data_server, xdg_utils, libnotify, dconf, gsettings_desktop_schemas, dnsmasq, dhcp
|
, obex_data_server, xdg_utils, libnotify, dconf, gsettings_desktop_schemas, dnsmasq, dhcp
|
||||||
, hicolor_icon_theme, librsvg
|
, hicolor_icon_theme, librsvg, wrapGAppsHook
|
||||||
, withPulseAudio ? true, libpulseaudio }:
|
, withPulseAudio ? true, libpulseaudio }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -15,7 +15,7 @@ in stdenv.mkDerivation rec {
|
||||||
sha256 = "03s305mbc57nl3sq5ywh9casz926k4aqnylgaidli8bmgz1djbg9";
|
sha256 = "03s305mbc57nl3sq5ywh9casz926k4aqnylgaidli8bmgz1djbg9";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ intltool pkgconfig pythonPackages.wrapPython pythonPackages.cython ];
|
nativeBuildInputs = [ intltool pkgconfig pythonPackages.wrapPython pythonPackages.cython wrapGAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ bluez gtk3 pythonPackages.python libnotify dconf librsvg
|
buildInputs = [ bluez gtk3 pythonPackages.python libnotify dconf librsvg
|
||||||
gsettings_desktop_schemas hicolor_icon_theme ]
|
gsettings_desktop_schemas hicolor_icon_theme ]
|
||||||
|
@ -32,12 +32,8 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [ (lib.enableFeature withPulseAudio "pulseaudio") ];
|
configureFlags = [ (lib.enableFeature withPulseAudio "pulseaudio") ];
|
||||||
|
|
||||||
postFixup = ''
|
preFixup = ''
|
||||||
makeWrapperArgs="\
|
makeWrapperArgs="--prefix PATH ':' ${binPath}"
|
||||||
--prefix PATH ':' ${binPath} \
|
|
||||||
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
|
|
||||||
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
|
|
||||||
--prefix GIO_EXTRA_MODULES : ${dconf}/lib/gio/modules"
|
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue