New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makeDesktopItem: add desktop file validation #75729
makeDesktopItem: add desktop file validation #75729
Conversation
This uses desktop-file-validate in desktop-file-utils. It can be turned off if wanted.
It's possible current expressions using |
I don't have a beefy enough machine but I don't think it would break too much stuff. |
We could modify the makeDesktopItem() using desktop-file-edit , ie in soulseekqt derivation:
that way, according to documentation, you won't need to rerun validation. you can also enforce mode with --mode , avoid some desktop files like firefox ,0ad or xterm one to be executable ... We can unify how desktop files are handles in nixpkgs, desktop-file-utils is often used in nativeBuildInputs of gnome application. An other case in usage of desktop file directly in nixpkgs, for example openra :
This use the same idea as in soulseekqt, fill the blank with meta properties. This could be an automatic feature with a proper .desktop.in extention. cc @tilpner : we could offer such desktop mecanism as soulseekqt in appimageTools since all users of desktop software appimage need it and use often ugly method to fix that issue. |
@bignaux Sounds good, will try this. |
@bignaux I don't use .desktop files, so I'm unfamiliar with the ways used to generate them, but I'll try to review a PR to appimageTools if you send one. :) |
Using this issue as a TODO, i notice we need a unified method to make the icon directories, lot use Edit: i forget to say i search for tools to do it well/better, i don't find any, but xdg-desktop-icon was very useless and make nothing interesting imho. |
Merged because I don't think I'll have the time to improve this more. |
Audio;Mixer; puts it near KMix which has Categories=Qt;KDE;AudioVideo;Audio;Mixer;
This also broke the build of |
"Application" is deprecated, "Other" is invalid, there are no generic categories, and the Categories fields is optional per the spec. Fixes the defaults after #75729.
Fixed in 7df8136. |
Broken by NixOS#75729 since the desktop items are only valid after post-processing. There's probably multiple better ways to do this, but I'm not a calibre maintainer and I just want to get this unbroken as quickly as possible.
This broke calibre: #84095 |
Audio;Mixer; puts it near KMix which has Categories=Qt;KDE;AudioVideo;Audio;Mixer; (cherry picked from commit ee5f863)
Was |
This fixes all packages that are failed `nixpkgs-review` in NixOS#91790. Packages that were broken prior to that PR were marked as broken. Packages that failed because of NixOS#75729 were fixed.
Broken by NixOS#75729 since the desktop items are only valid after post-processing. There's probably multiple better ways to do this, but I'm not a calibre maintainer and I just want to get this unbroken as quickly as possible.
Motivation for this change
This uses desktop-file-validate in desktop-file-utils.
It can be turned off if wanted.
Errant entries according to the specification will now fail the build, and enforce properly created desktop files.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @