From d4960f72bec068336819f3258fa67f1b1b4a6bd7 Mon Sep 17 00:00:00 2001 From: Arie Middelkoop Date: Wed, 29 Feb 2012 12:50:17 +0000 Subject: Added an optional parameter to "make-startupitem" to provide a prefix to the ".desktop" file. svn path=/nixpkgs/trunk/; revision=32686 --- pkgs/build-support/make-startupitem/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pkgs/build-support') 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 +} -- cgit 1.4.1