2009-05-10 16:03:53 +04:00
|
|
|
{stdenv}:
|
|
|
|
{ name
|
|
|
|
, type ? "Application"
|
|
|
|
, exec
|
|
|
|
, icon ? ""
|
|
|
|
, comment ? ""
|
|
|
|
, terminal ? "false"
|
|
|
|
, desktopName
|
|
|
|
, genericName
|
|
|
|
, mimeType ? ""
|
|
|
|
, categories ? "Application;Other;"
|
|
|
|
, encoding ? "UTF-8"
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
buildCommand = ''
|
2012-01-19 00:16:00 +04:00
|
|
|
mkdir -p $out/share/applications
|
2009-05-10 16:03:53 +04:00
|
|
|
cat > $out/share/applications/$name.desktop <<EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=${type}
|
|
|
|
Exec=${exec}
|
|
|
|
Icon=${icon}
|
|
|
|
Comment=${comment}
|
|
|
|
Terminal=${terminal}
|
|
|
|
Name=${desktopName}
|
|
|
|
GenericName=${genericName}
|
|
|
|
MimeType=${mimeType}
|
|
|
|
Categories=${categories}
|
|
|
|
Encoding=${encoding}
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
}
|