Added an optional parameter to "make-startupitem" to provide a prefix to the ".desktop" file.
svn path=/nixpkgs/trunk/; revision=32686
This commit is contained in:
parent
1ad3da0ca8
commit
d4960f72be
@ -4,6 +4,7 @@
|
|||||||
{stdenv, lib}:
|
{stdenv, lib}:
|
||||||
{ name # name of the desktop file (without .desktop)
|
{ name # name of the desktop file (without .desktop)
|
||||||
, package # package where the desktop file resides in
|
, package # package where the desktop file resides in
|
||||||
|
, srcPrefix ? "" # additional prefix that the desktop file may have in the 'package'
|
||||||
, after ? null
|
, after ? null
|
||||||
, condition ? null
|
, condition ? null
|
||||||
, phase ? "2"
|
, phase ? "2"
|
||||||
@ -20,7 +21,7 @@ stdenv.mkDerivation {
|
|||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
ensureDir $out/share/autostart
|
ensureDir $out/share/autostart
|
||||||
target=${name}.desktop
|
target=${name}.desktop
|
||||||
cp ${package}/share/applications/${name}.desktop $target
|
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
|
||||||
chmod +rw $target
|
chmod +rw $target
|
||||||
echo "X-KDE-autostart-phase=${phase}" >> $target
|
echo "X-KDE-autostart-phase=${phase}" >> $target
|
||||||
${lib.optionalString (after != null) ''echo "${after}" >> $target''}
|
${lib.optionalString (after != null) ''echo "${after}" >> $target''}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user