Merge pull request #64720 from worldofpeace/wrapqt-libexec
wrapQtAppsHook: wrap binaries in libexec
This commit is contained in:
commit
4c8eaa3d2e
@ -11,10 +11,5 @@ mkDerivation {
|
|||||||
propagatedBuildInputs = [ kauth kcodecs kconfig kwidgetsaddons ];
|
propagatedBuildInputs = [ kauth kcodecs kconfig kwidgetsaddons ];
|
||||||
patches = [ ./0001-qdiriterator-follow-symlinks.patch ];
|
patches = [ ./0001-qdiriterator-follow-symlinks.patch ];
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
preConfigure = ''
|
outputBin = "dev";
|
||||||
outputBin=dev
|
|
||||||
'';
|
|
||||||
postInstall = ''
|
|
||||||
moveToOutput share/man $dev
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
@ -64,10 +64,6 @@ qtOwnPathsHook() {
|
|||||||
|
|
||||||
preFixupPhases+=" qtOwnPathsHook"
|
preFixupPhases+=" qtOwnPathsHook"
|
||||||
|
|
||||||
isQtApp () {
|
|
||||||
readelf -d "$1" 2>/dev/null | grep -q -F 'libQt5Core'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Note: $qtWrapperArgs still gets defined even if $dontWrapQtApps is set.
|
# Note: $qtWrapperArgs still gets defined even if $dontWrapQtApps is set.
|
||||||
wrapQtAppsHook() {
|
wrapQtAppsHook() {
|
||||||
# skip this hook when requested
|
# skip this hook when requested
|
||||||
@ -77,7 +73,7 @@ wrapQtAppsHook() {
|
|||||||
[ -z "$wrapQtAppsHookHasRun" ] || return 0
|
[ -z "$wrapQtAppsHookHasRun" ] || return 0
|
||||||
wrapQtAppsHookHasRun=1
|
wrapQtAppsHookHasRun=1
|
||||||
|
|
||||||
local targetDirs=( "$prefix/bin" )
|
local targetDirs=( "$prefix/bin" "$prefix/libexec" )
|
||||||
echo "wrapping Qt applications in ${targetDirs[@]}"
|
echo "wrapping Qt applications in ${targetDirs[@]}"
|
||||||
|
|
||||||
for targetDir in "${targetDirs[@]}"
|
for targetDir in "${targetDirs[@]}"
|
||||||
@ -86,7 +82,7 @@ wrapQtAppsHook() {
|
|||||||
|
|
||||||
find "$targetDir" -executable -print0 | while IFS= read -r -d '' file
|
find "$targetDir" -executable -print0 | while IFS= read -r -d '' file
|
||||||
do
|
do
|
||||||
isQtApp "$file" || continue
|
isELF "$file" || continue
|
||||||
|
|
||||||
if [ -f "$file" ]
|
if [ -f "$file" ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user