mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +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
|
|
'';
|
|
}
|