mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
a8315aa241
svn path=/nixpkgs/trunk/; revision=15529
34 lines
619 B
Nix
34 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
|
|
'';
|
|
}
|