nixpkgs/pkgs/build-support/make-desktopitem/default.nix
Sander van der Burg a8315aa241 Added desktop file generation function and desktop item for firefox
svn path=/nixpkgs/trunk/; revision=15529
2009-05-10 12:03:53 +00:00

33 lines
619 B
Nix

{stdenv}:
{ name
, type ? "Application"
, exec
, icon ? ""
, comment ? ""
, terminal ? "false"
, desktopName
, genericName
, mimeType ? ""
, categories ? "Application;Other;"
, encoding ? "UTF-8"
}:
stdenv.mkDerivation {
inherit name;
buildCommand = ''
ensureDir $out/share/applications
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
'';
}