nixpkgs/pkgs/build-support/make-desktopitem/default.nix
Vladimír Čunát f50d80f627 makeDesktopItem: change name of the derivations
The name wasn't suggesting what kind of stuff is in there;
now it's the same as the name of the file that gets generated.
2016-01-15 08:37:02 +01:00

35 lines
699 B
Nix

{stdenv}:
{ name
, type ? "Application"
, exec
, icon ? ""
, comment ? ""
, terminal ? "false"
, desktopName
, genericName
, mimeType ? ""
, categories ? "Application;Other;"
, startupNotify ? null
}:
stdenv.mkDerivation {
name = "${name}.desktop";
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}
${if startupNotify == null then ''EOF'' else ''
StartupNotify=${startupNotify}
EOF''}
'';
}