mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments
This commit is contained in:
parent
bef98989a2
commit
498d662662
@ -29,7 +29,7 @@ stdenv.mkDerivation {
|
|||||||
target=${name}.desktop
|
target=${name}.desktop
|
||||||
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
|
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
|
||||||
${lib.optionalString (prependExtraArgs != [] || appendExtraArgs != []) ''
|
${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
|
chmod +rw $target
|
||||||
echo "X-KDE-autostart-phase=${phase}" >> $target
|
echo "X-KDE-autostart-phase=${phase}" >> $target
|
||||||
|
Loading…
Reference in New Issue
Block a user