mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
c4406c585c
Fixes #4319. We even seem we never override it anywhere. http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#deprecated-items
32 lines
572 B
Nix
32 lines
572 B
Nix
{stdenv}:
|
|
{ name
|
|
, type ? "Application"
|
|
, exec
|
|
, icon ? ""
|
|
, comment ? ""
|
|
, terminal ? "false"
|
|
, desktopName
|
|
, genericName
|
|
, mimeType ? ""
|
|
, categories ? "Application;Other;"
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit name;
|
|
buildCommand = ''
|
|
mkdir -p $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}
|
|
EOF
|
|
'';
|
|
}
|