make-desktopitem: fix file extension for type directory
This commit is contained in:
@@ -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"'';
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user