diff options
author | Arie Middelkoop <amiddelk@gmail.com> | 2012-02-29 12:50:17 +0000 |
---|---|---|
committer | Arie Middelkoop <amiddelk@gmail.com> | 2012-02-29 12:50:17 +0000 |
commit | d4960f72bec068336819f3258fa67f1b1b4a6bd7 (patch) | |
tree | cb6c516b2c699852faa177728401dd3539d44d7d /pkgs | |
parent | 1ad3da0ca888b860bac78a7c11a68e6afbfd3ddc (diff) |
Added an optional parameter to "make-startupitem" to provide a prefix to the ".desktop" file.
svn path=/nixpkgs/trunk/; revision=32686
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/make-startupitem/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/build-support/make-startupitem/default.nix b/pkgs/build-support/make-startupitem/default.nix index 07cdee600d45f..dc78b8a704e26 100644 --- a/pkgs/build-support/make-startupitem/default.nix +++ b/pkgs/build-support/make-startupitem/default.nix @@ -2,8 +2,9 @@ # as autostart item. {stdenv, lib}: -{ name # name of the desktop file (without .desktop) -, package # package where the desktop file resides in +{ name # name of the desktop file (without .desktop) +, package # package where the desktop file resides in +, srcPrefix ? "" # additional prefix that the desktop file may have in the 'package' , after ? null , condition ? null , phase ? "2" @@ -20,7 +21,7 @@ stdenv.mkDerivation { buildCommand = '' ensureDir $out/share/autostart target=${name}.desktop - cp ${package}/share/applications/${name}.desktop $target + cp ${package}/share/applications/${srcPrefix}${name}.desktop $target chmod +rw $target echo "X-KDE-autostart-phase=${phase}" >> $target ${lib.optionalString (after != null) ''echo "${after}" >> $target''} @@ -31,4 +32,4 @@ stdenv.mkDerivation { # this will automatically put 'package' in the environment when you # put its startup item in there. propagatedBuildInputs = [ package ]; -} \ No newline at end of file +} |