diff options
Diffstat (limited to 'pkgs/build-support/make-desktopitem/default.nix')
-rw-r--r-- | pkgs/build-support/make-desktopitem/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/make-desktopitem/default.nix b/pkgs/build-support/make-desktopitem/default.nix index ccceb23256b6f..9cae8204c6a83 100644 --- a/pkgs/build-support/make-desktopitem/default.nix +++ b/pkgs/build-support/make-desktopitem/default.nix @@ -108,11 +108,12 @@ let renderAction = name: attrs: renderSection "Desktop Action ${name}" (preprocessAction attrs); actionsRendered = lib.mapAttrsToList renderAction actions; + extension = if type == "Directory" then "directory" else "desktop"; content = [ mainSectionRendered ] ++ actionsRendered; in writeTextFile { - name = "${name}.desktop"; - destination = "/share/applications/${name}.desktop"; + name = "${name}.${extension}"; + destination = "/share/applications/${name}.${extension}"; text = builtins.concatStringsSep "\n" content; checkPhase = ''${buildPackages.desktop-file-utils}/bin/desktop-file-validate "$target"''; }) |