mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
c556a6ea46
function, so obsolete it. svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
33 lines
618 B
Nix
33 lines
618 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 = ''
|
|
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}
|
|
Encoding=${encoding}
|
|
EOF
|
|
'';
|
|
}
|