treewide: inject xdg-open into wrappers as $PATH suffix
The xdg-open utility is only ever a runtime dependency and its dependents only expect that it accept a URI as a command line argument and do something with it that the user would expect. For such as a trivial relationship it should be possible for users to override xdg-open with something else in their PATH.
This commit is contained in:
parent
1a9c66f883
commit
b5526585c2
32 changed files with 72 additions and 45 deletions
|
@ -27,10 +27,6 @@ stdenv.mkDerivation rec {
|
||||||
libxkbfile pixman xcbutil xcbutilwm zlib
|
libxkbfile pixman xcbutil xcbutilwm zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
binPath = lib.makeBinPath [
|
|
||||||
xdg-utils zenity ffmpeg
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r opt/bitwig-studio $out/libexec
|
cp -r opt/bitwig-studio $out/libexec
|
||||||
|
@ -77,7 +73,8 @@ stdenv.mkDerivation rec {
|
||||||
-not -path '*/resources/*' | \
|
-not -path '*/resources/*' | \
|
||||||
while IFS= read -r f ; do
|
while IFS= read -r f ; do
|
||||||
wrapProgram $f \
|
wrapProgram $f \
|
||||||
--prefix PATH : "${binPath}" \
|
--suffix PATH : "${lib.makeBinPath [ ffmpeg zenity ]}" \
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
--set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
|
--set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
|
||||||
done
|
done
|
||||||
|
|
|
@ -27,10 +27,6 @@ stdenv.mkDerivation rec {
|
||||||
alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
|
alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
|
||||||
];
|
];
|
||||||
|
|
||||||
binPath = lib.makeBinPath [
|
|
||||||
xdg-utils ffmpeg
|
|
||||||
];
|
|
||||||
|
|
||||||
ldLibraryPath = lib.strings.makeLibraryPath buildInputs;
|
ldLibraryPath = lib.strings.makeLibraryPath buildInputs;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -60,8 +56,9 @@ stdenv.mkDerivation rec {
|
||||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
||||||
wrapProgram $f \
|
wrapProgram $f \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
--prefix PATH : "${binPath}" \
|
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}" \
|
||||||
--suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
||||||
done
|
done
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -53,9 +53,11 @@ stdenv.mkDerivation rec {
|
||||||
-not -path '*/resources/*' | \
|
-not -path '*/resources/*' | \
|
||||||
while IFS= read -r f ; do
|
while IFS= read -r f ; do
|
||||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
wrapProgram $f \
|
wrapProgram $f \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
--prefix PATH : "${lib.makeBinPath [ xdg-utils ffmpeg ]}" \
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||||
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
|
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,12 @@ stdenvNoCC.mkDerivation rec {
|
||||||
install -Dm755 irpf.jar "$BASEDIR/${pname}.jar"
|
install -Dm755 irpf.jar "$BASEDIR/${pname}.jar"
|
||||||
install -Dm644 Leia-me.htm offline.png online.png pgd-updater.jar "$BASEDIR"
|
install -Dm644 Leia-me.htm offline.png online.png pgd-updater.jar "$BASEDIR"
|
||||||
|
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
makeWrapper ${jdk11}/bin/java $out/bin/${pname} \
|
makeWrapper ${jdk11}/bin/java $out/bin/${pname} \
|
||||||
--add-flags "-Dawt.useSystemAAFontSettings=on" \
|
--add-flags "-Dawt.useSystemAAFontSettings=on" \
|
||||||
--add-flags "-Dswing.aatext=true" \
|
--add-flags "-Dswing.aatext=true" \
|
||||||
--add-flags "-jar $BASEDIR/${pname}.jar" \
|
--add-flags "-jar $BASEDIR/${pname}.jar" \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
--set _JAVA_AWT_WM_NONREPARENTING 1 \
|
--set _JAVA_AWT_WM_NONREPARENTING 1 \
|
||||||
--set AWT_TOOLKIT MToolkit
|
--set AWT_TOOLKIT MToolkit
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,11 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--set PERL5LIB ${perlPackages.makePerlPath perlModules} \
|
--set PERL5LIB ${perlPackages.makePerlPath perlModules} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ imagemagick xdg-utils ] }
|
--prefix PATH : ${lib.makeBinPath [ imagemagick ] }
|
||||||
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ] }
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,9 @@ in stdenv.mkDerivation rec {
|
||||||
# Electron is trying to open udev via dlopen()
|
# Electron is trying to open udev via dlopen()
|
||||||
# and for some reason that doesn't seem to be impacted from the rpath.
|
# and for some reason that doesn't seem to be impacted from the rpath.
|
||||||
# Adding udev to LD_LIBRARY_PATH fixes that.
|
# Adding udev to LD_LIBRARY_PATH fixes that.
|
||||||
|
# Make xdg-open overrideable at runtime.
|
||||||
makeWrapper $out/share/1password/1password $out/bin/1password \
|
makeWrapper $out/share/1password/1password $out/bin/1password \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
|
@ -126,8 +126,9 @@ in stdenv.mkDerivation rec {
|
||||||
# Electron is trying to open udev via dlopen()
|
# Electron is trying to open udev via dlopen()
|
||||||
# and for some reason that doesn't seem to be impacted from the rpath.
|
# and for some reason that doesn't seem to be impacted from the rpath.
|
||||||
# Adding udev to LD_LIBRARY_PATH fixes that.
|
# Adding udev to LD_LIBRARY_PATH fixes that.
|
||||||
|
# Make xdg-open overrideable at runtime.
|
||||||
makeWrapper $out/share/1password/1password $out/bin/1password \
|
makeWrapper $out/share/1password/1password $out/bin/1password \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
||||||
export LD_LIBRARY_PATH="${lib.makeLibraryPath [gtk2 mono]}"
|
export LD_LIBRARY_PATH="${lib.makeLibraryPath [gtk2 mono]}"
|
||||||
# We need PATH from user env for xdg-open to find its tools, which
|
# We need PATH from user env for xdg-open to find its tools, which
|
||||||
# typically depend on the currently running desktop environment.
|
# typically depend on the currently running desktop environment.
|
||||||
export PATH="${lib.makeBinPath [ avrdude xdg-utils ]}:\$PATH"
|
export PATH="\$PATH:${lib.makeBinPath [ avrdude xdg-utils ]}"
|
||||||
|
|
||||||
# avrdudess must have its resource files in its current working directory
|
# avrdudess must have its resource files in its current working directory
|
||||||
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
|
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
|
||||||
|
|
|
@ -61,12 +61,13 @@ stdenv.mkDerivation rec {
|
||||||
PYTHON = withPython;
|
PYTHON = withPython;
|
||||||
};
|
};
|
||||||
|
|
||||||
runtimeDeps = [ unzip zip p7zip xz gzip bzip2 gnutar xdg-utils ];
|
runtimeDeps = [ unzip zip p7zip xz gzip bzip2 gnutar ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/far2l \
|
wrapProgram $out/bin/far2l \
|
||||||
--argv0 $out/bin/far2l \
|
--argv0 $out/bin/far2l \
|
||||||
--prefix PATH : ${lib.makeBinPath runtimeDeps}
|
--prefix PATH : ${lib.makeBinPath runtimeDeps} \
|
||||||
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -33,8 +33,9 @@ buildGoModule rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--prefix PATH : ${xdg-utils}/bin
|
--suffix PATH : ${xdg-utils}/bin
|
||||||
--prefix XDG_DATA_DIRS : $out/share
|
--prefix XDG_DATA_DIRS : $out/share
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -141,8 +141,9 @@ stdenv.mkDerivation rec {
|
||||||
--prefix PATH : ${makeBinPath [ iproute2 networkmanager dnsmasq ]} \
|
--prefix PATH : ${makeBinPath [ iproute2 networkmanager dnsmasq ]} \
|
||||||
--set LD_LIBRARY_PATH $out/opt/appgate/service
|
--set LD_LIBRARY_PATH $out/opt/appgate/service
|
||||||
|
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
|
makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
|
||||||
--prefix PATH : ${makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${makeBinPath [ xdg-utils ]} \
|
||||||
--set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps}
|
--set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps}
|
||||||
|
|
||||||
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
|
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
|
||||||
|
|
|
@ -73,7 +73,7 @@ let
|
||||||
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage
|
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage
|
||||||
libXext libXfixes libXi libXrandr libXrender libxshmfence
|
libXext libXfixes libXi libXrandr libXrender libxshmfence
|
||||||
libXtst libuuid mesa nspr nss pango pipewire udev wayland
|
libXtst libuuid mesa nspr nss pango pipewire udev wayland
|
||||||
xdg-utils xorg.libxcb zlib snappy
|
xorg.libxcb zlib snappy
|
||||||
]
|
]
|
||||||
++ optional pulseSupport libpulseaudio
|
++ optional pulseSupport libpulseaudio
|
||||||
++ optional libvaSupport libva;
|
++ optional libvaSupport libva;
|
||||||
|
@ -170,6 +170,7 @@ stdenv.mkDerivation rec {
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--prefix LD_LIBRARY_PATH : ${rpath}
|
--prefix LD_LIBRARY_PATH : ${rpath}
|
||||||
--prefix PATH : ${binpath}
|
--prefix PATH : ${binpath}
|
||||||
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
${optionalString (enableFeatures != []) ''
|
${optionalString (enableFeatures != []) ''
|
||||||
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}"
|
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}"
|
||||||
''}
|
''}
|
||||||
|
|
|
@ -271,11 +271,12 @@ let
|
||||||
mv "$executablePath" "$oldExe"
|
mv "$executablePath" "$oldExe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
makeWrapper "$oldExe" \
|
makeWrapper "$oldExe" \
|
||||||
"''${executablePath}${nameSuffix}" \
|
"''${executablePath}${nameSuffix}" \
|
||||||
--prefix LD_LIBRARY_PATH ':' "$libs" \
|
--prefix LD_LIBRARY_PATH ':' "$libs" \
|
||||||
--suffix-each GTK_PATH ':' "$gtk_modules" \
|
--suffix-each GTK_PATH ':' "$gtk_modules" \
|
||||||
--prefix PATH ':' "${xdg-utils}/bin" \
|
--suffix PATH ':' "${xdg-utils}/bin" \
|
||||||
--suffix PATH ':' "$out/bin" \
|
--suffix PATH ':' "$out/bin" \
|
||||||
--set MOZ_APP_LAUNCHER "${launcherName}" \
|
--set MOZ_APP_LAUNCHER "${launcherName}" \
|
||||||
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
|
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
|
||||||
|
|
|
@ -63,7 +63,7 @@ let
|
||||||
dbus gdk-pixbuf gcc-unwrapped.lib
|
dbus gdk-pixbuf gcc-unwrapped.lib
|
||||||
systemd
|
systemd
|
||||||
libexif pciutils
|
libexif pciutils
|
||||||
liberation_ttf curl util-linux xdg-utils wget
|
liberation_ttf curl util-linux wget
|
||||||
flac harfbuzz icu libpng opusWithCustomModes snappy speechd
|
flac harfbuzz icu libpng opusWithCustomModes snappy speechd
|
||||||
bzip2 libcap at-spi2-atk at-spi2-core
|
bzip2 libcap at-spi2-atk at-spi2-core
|
||||||
libkrb5 libdrm libglvnd mesa coreutils
|
libkrb5 libdrm libglvnd mesa coreutils
|
||||||
|
@ -145,6 +145,7 @@ in stdenv.mkDerivation {
|
||||||
makeWrapper "$out/share/google/$appname/google-$appname" "$exe" \
|
makeWrapper "$out/share/google/$appname/google-$appname" "$exe" \
|
||||||
--prefix LD_LIBRARY_PATH : "$rpath" \
|
--prefix LD_LIBRARY_PATH : "$rpath" \
|
||||||
--prefix PATH : "$binpath" \
|
--prefix PATH : "$binpath" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addOpenGLRunpath.driverLink}/share" \
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addOpenGLRunpath.driverLink}/share" \
|
||||||
--set CHROME_WRAPPER "google-chrome-$dist" \
|
--set CHROME_WRAPPER "google-chrome-$dist" \
|
||||||
--add-flags ${escapeShellArg commandLineArgs} \
|
--add-flags ${escapeShellArg commandLineArgs} \
|
||||||
|
|
|
@ -108,7 +108,7 @@ stdenv.mkDerivation rec {
|
||||||
# Wrap the startup command
|
# Wrap the startup command
|
||||||
makeWrapper $out/opt/ArmCord/armcord $out/bin/armcord \
|
makeWrapper $out/opt/ArmCord/armcord $out/bin/armcord \
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
"''${gappsWrapperArgs[@]}"
|
"''${gappsWrapperArgs[@]}"
|
||||||
|
|
||||||
# Fix desktop link
|
# Fix desktop link
|
||||||
|
|
|
@ -111,10 +111,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cc $localtime64_stub -shared -o "${placeholder "out"}"/opt/BlueJeans/liblocaltime64_stub.so
|
cc $localtime64_stub -shared -o "${placeholder "out"}"/opt/BlueJeans/liblocaltime64_stub.so
|
||||||
|
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
makeWrapper $out/opt/BlueJeans/bluejeans-v2 $out/bin/bluejeans \
|
makeWrapper $out/opt/BlueJeans/bluejeans-v2 $out/bin/bluejeans \
|
||||||
--set LD_LIBRARY_PATH "${libPath}":"${placeholder "out"}"/opt/BlueJeans \
|
--set LD_LIBRARY_PATH "${libPath}":"${placeholder "out"}"/opt/BlueJeans \
|
||||||
--set LD_PRELOAD "$out"/opt/BlueJeans/liblocaltime64_stub.so \
|
--set LD_PRELOAD "$out"/opt/BlueJeans/liblocaltime64_stub.so \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
|
|
||||||
substituteInPlace "$out"/share/applications/bluejeans-v2.desktop \
|
substituteInPlace "$out"/share/applications/bluejeans-v2.desktop \
|
||||||
--replace "/opt/BlueJeans/bluejeans-v2" "$out/bin/bluejeans"
|
--replace "/opt/BlueJeans/bluejeans-v2" "$out/bin/bluejeans"
|
||||||
|
|
|
@ -85,9 +85,10 @@ stdenv.mkDerivation rec {
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
wrapProgram $out/opt/${name}/${pname} \
|
wrapProgram $out/opt/${name}/${pname} \
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDependencies}" \
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDependencies}" \
|
||||||
--prefix PATH : ${xdg-utils}/bin \
|
--suffix PATH : ${xdg-utils}/bin \
|
||||||
"''${gappsWrapperArgs[@]}"
|
"''${gappsWrapperArgs[@]}"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,11 +164,12 @@ let
|
||||||
patchelf --set-rpath ${rpath}:$out/lib/slack $file || true
|
patchelf --set-rpath ${rpath}:$out/lib/slack $file || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# Replace the broken bin/slack symlink with a startup wrapper
|
# Replace the broken bin/slack symlink with a startup wrapper.
|
||||||
|
# Make xdg-open overrideable at runtime.
|
||||||
rm $out/bin/slack
|
rm $out/bin/slack
|
||||||
makeWrapper $out/lib/slack/slack $out/bin/slack \
|
makeWrapper $out/lib/slack/slack $out/bin/slack \
|
||||||
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
|
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
|
||||||
--prefix PATH : ${lib.makeBinPath [xdg-utils]} \
|
--suffix PATH : ${lib.makeBinPath [xdg-utils]} \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
||||||
|
|
||||||
# Fix the desktop link
|
# Fix the desktop link
|
||||||
|
|
|
@ -173,7 +173,7 @@ env.mkDerivation rec {
|
||||||
wrapProgram $out/bin/telegram-desktop \
|
wrapProgram $out/bin/telegram-desktop \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
"''${qtWrapperArgs[@]}" \
|
"''${qtWrapperArgs[@]}" \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils]} \
|
||||||
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
|
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
|
||||||
sed -i $out/bin/telegram-desktop \
|
sed -i $out/bin/telegram-desktop \
|
||||||
-e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
|
-e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
|
||||||
|
|
|
@ -53,8 +53,9 @@ in stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
makeWrapper $out/opt/wavebox/Wavebox $out/bin/wavebox \
|
makeWrapper $out/opt/wavebox/Wavebox $out/bin/wavebox \
|
||||||
--prefix PATH : ${xdg-utils}/bin
|
--suffix PATH : ${xdg-utils}/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -79,7 +79,8 @@ mkDerivation rec {
|
||||||
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
|
||||||
# See also: https://bugreports.qt.io/browse/QTBUG-85967
|
# See also: https://bugreports.qt.io/browse/QTBUG-85967
|
||||||
"--set QML_DISABLE_DISK_CACHE 1"
|
"--set QML_DISABLE_DISK_CACHE 1"
|
||||||
"--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}"
|
# make xdg-open overrideable at runtime
|
||||||
|
"--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
|
|
@ -119,7 +119,7 @@ stdenv.mkDerivation rec {
|
||||||
unzip $out/lib/javafx-web-18-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/
|
unzip $out/lib/javafx-web-18-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/
|
||||||
|
|
||||||
wrapProgram $out/bin/JabRef \
|
wrapProgram $out/bin/JabRef \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
--set JAVA_HOME "${jdk}" \
|
--set JAVA_HOME "${jdk}" \
|
||||||
--set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
|
--set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,9 @@ mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
wrapProgram $out/bin/mytetra \
|
wrapProgram $out/bin/mytetra \
|
||||||
--prefix PATH : ${xdg-utils}/bin
|
--suffix PATH : ${xdg-utils}/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
|
||||||
cp git-open $out/bin
|
cp git-open $out/bin
|
||||||
installManPage git-open.1
|
installManPage git-open.1
|
||||||
wrapProgram $out/bin/git-open \
|
wrapProgram $out/bin/git-open \
|
||||||
--prefix PATH : "${lib.makeBinPath [ git xdg-utils gnugrep ]}"
|
--prefix PATH : "${lib.makeBinPath [ git gnugrep ]}" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -22,7 +22,10 @@ buildGoModule rec {
|
||||||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
|
# make xdg-open overrideable at runtime
|
||||||
|
wrapProgram $out/bin/lab \
|
||||||
|
--prefix PATH ":" "${lib.makeBinPath [ git ]}" \
|
||||||
|
--suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
|
||||||
installShellCompletion --cmd lab \
|
installShellCompletion --cmd lab \
|
||||||
--bash <($out/bin/lab completion bash) \
|
--bash <($out/bin/lab completion bash) \
|
||||||
--fish <($out/bin/lab completion fish) \
|
--fish <($out/bin/lab completion fish) \
|
||||||
|
|
|
@ -72,8 +72,10 @@ buildPerlModule rec {
|
||||||
wrapProgram "$out/bin/pipe-viewer" \
|
wrapProgram "$out/bin/pipe-viewer" \
|
||||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}"
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}"
|
||||||
'' + lib.optionalString withGtk3 ''
|
'' + lib.optionalString withGtk3 ''
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
wrapProgram "$out/bin/gtk-pipe-viewer" ''${gappsWrapperArgs[@]} \
|
wrapProgram "$out/bin/gtk-pipe-viewer" ''${gappsWrapperArgs[@]} \
|
||||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget xdg-utils youtube-dl yt-dlp ]}"
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -31,7 +31,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm -r $out/include
|
rm -r $out/include
|
||||||
wrapProgram $out/bin/enigma --prefix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
# make xdg-open overrideable at runtime
|
||||||
|
wrapProgram $out/bin/enigma --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -56,7 +56,9 @@ python3Packages.buildPythonApplication rec {
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"\${gappsWrapperArgs[@]}"
|
"\${gappsWrapperArgs[@]}"
|
||||||
"--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs xdg-utils wine winetricks pciutils glxinfo ]}"
|
"--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs wine winetricks pciutils glxinfo ]}"
|
||||||
|
# make xdg-open overrideable at runtime
|
||||||
|
"--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -119,8 +119,9 @@ buildGoModule rec {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm755 -t $client/bin $out/bin/tsh
|
install -Dm755 -t $client/bin $out/bin/tsh
|
||||||
wrapProgram $client/bin/tsh --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
# make xdg-open overrideable at runtime
|
||||||
wrapProgram $out/bin/tsh --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
wrapProgram $client/bin/tsh --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
|
wrapProgram $out/bin/tsh --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
|
@ -21,7 +21,7 @@ buildGoModule rec {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/bin/cmd $out/bin/aws-sso
|
mv $out/bin/cmd $out/bin/aws-sso
|
||||||
wrapProgram $out/bin/aws-sso \
|
wrapProgram $out/bin/aws-sso \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -21,7 +21,8 @@ buildGoModule rec {
|
||||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/aws-vault --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
# make xdg-open overrideable at runtime
|
||||||
|
wrapProgram $out/bin/aws-vault --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
||||||
installShellCompletion --cmd aws-vault \
|
installShellCompletion --cmd aws-vault \
|
||||||
--bash $src/contrib/completions/bash/aws-vault.bash \
|
--bash $src/contrib/completions/bash/aws-vault.bash \
|
||||||
--fish $src/contrib/completions/fish/aws-vault.fish \
|
--fish $src/contrib/completions/fish/aws-vault.fish \
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pythonPackages = python3Packages;
|
pythonPackages = python3Packages;
|
||||||
binPath = lib.makeBinPath [ xdg-utils dnsmasq dhcp iproute2 ];
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "blueman";
|
pname = "blueman";
|
||||||
|
@ -41,8 +40,12 @@ in stdenv.mkDerivation rec {
|
||||||
(lib.enableFeature withPulseAudio "pulseaudio")
|
(lib.enableFeature withPulseAudio "pulseaudio")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--prefix PATH ':' ${lib.makeBinPath [ dnsmasq dhcp iproute2 ]}"
|
||||||
|
"--suffix PATH ':' ${lib.makeBinPath [ xdg-utils ]}"
|
||||||
|
];
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
makeWrapperArgs="--prefix PATH ':' ${binPath}"
|
|
||||||
# This mimics ../../../development/interpreters/python/wrap.sh
|
# This mimics ../../../development/interpreters/python/wrap.sh
|
||||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||||
wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
|
wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
|
||||||
|
|
Loading…
Reference in a new issue