Commit Graph

20 Commits

Author SHA1 Message Date
K900
267f618da5 build-support/makeDesktopItem: remove workaround, fix quoting 2022-03-10 13:30:45 +03:00
Jörg Thalheim
9a5b1d3ca2 makeDesktopItem: improve error messages 2022-03-09 14:53:04 +00:00
Nick Cao
1454380313 makeDesktopItem: use desktop-file-utils from buildPackages in checkPhase 2022-03-08 12:44:36 +00:00
K900
1e2662c5fd treewide: fix some desktop file names
pkgs.writeTextFile doesn't like spaces in filenames.
This is fixed in #162246, but other tools will probably dislike
spaces in .desktop file names as well, and that PR will take forever,
so let's fix this anyway.
2022-02-28 20:15:33 +03:00
K900
0c713dbed4 build-support/makeDesktopItem: make fully declarative, add all missing options
This updates makeDesktopItem to explicitly support all the fields in the spec,
converts list-like fields to native Nix lists instead of semicolon-separated strings,
and allows automatically generating [Desktop Action] sections from Nix code
instead of hardcoding them as extraConfig strings.
2022-02-25 13:40:38 -08:00
Antoine Fontaine
c4b3aa6260 build-support/make-desktopitem: add some missing fields 2021-06-04 17:48:46 +02:00
Florian Klink
ae5764621d make-desktopitem: desktop-file-utils is a nativeBuildInput
This fixes cross-compilation of a NixOS with the manual enabled.
2020-11-27 01:17:32 +01:00
Leon Vack
f275b320d9
make-desktopitem: name was being used instead of desktopName
Name should be used as filename and desktopName for the name attribute of the desktop entry (according to docs).
2020-10-15 14:29:32 +02:00
piegames
3a76d4caea make-desktopitem: minor fixes and code style 2020-10-14 01:19:43 +02:00
piegames
51cc553307 make-desktopitem: refactoring, documentation and improvement
- New parameter `extraDesktopEntries` to easily add some less usual entries to the desktop file
- Rewrite of the core logic. Instead of a key-value-list, use an attribute set with nullable values to make it overridable
- Added some comments
- Some cosmetic/readability code refactors
	- I didn't like the doubly nested strings around the `fileValidation`
2020-06-29 23:23:50 +02:00
Orivej Desh
7df81361e4 makeDesktopItem: make categories optional
"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.
2020-03-31 04:10:58 +00:00
worldofpeace
9665977f4c makeDesktopItem: add desktop file validation
This uses desktop-file-validate in desktop-file-utils.
It can be turned off if wanted.
2019-12-15 19:04:10 -05:00
Bjørn Forsman
e488670764 makeDesktopItem: use runCommandLocal
This derivation only creates a simple text file, so it makes sense to do
it locally.

On my setup this reduces build time from 2.2s to 1.2s.
2019-12-08 20:47:27 +01:00
Laverne Schrock
f099df3c80 make-desktopitem: make genericName optional 2017-06-05 21:55:23 -05:00
Luca Bruno
5f8311775c chromium: add StartupWMClass to desktop file. Fixes #12433 2016-02-29 20:42:58 +01:00
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
Thomas Tuegel
623a117bdd makeDesktopItem: add StartupNotify key 2015-12-12 17:25:56 -06:00
Vladimír Čunát
c4406c585c makeDesktopItem: don't generated a deprecated key
Fixes #4319. We even seem we never override it anywhere.
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#deprecated-items
2015-06-18 10:31:48 +02:00
Eelco Dolstra
c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00
Sander van der Burg
a8315aa241 Added desktop file generation function and desktop item for firefox
svn path=/nixpkgs/trunk/; revision=15529
2009-05-10 12:03:53 +00:00