Merge pull request #335575 from felschr/make-startupitem-extra-args-fix

make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments
This commit is contained in:
Philip Taron 2024-08-18 19:56:39 -07:00 committed by GitHub
commit bd346e9f29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation {
target=${name}.desktop
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
${lib.optionalString (prependExtraArgs != [] || appendExtraArgs != []) ''
sed -i -r "s/(Exec=)([^ ]*) (.*)/\1\2 ${prependArgs}\3${appendArgs}/" $target
sed -i -r "s/(Exec=)([^ \n]*) *(.*)/\1\2 ${prependArgs}\3${appendArgs}/" $target
''}
chmod +rw $target
echo "X-KDE-autostart-phase=${phase}" >> $target