mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 05:03:09 +00:00
xdg-desktop-entries: make exec
default to null (#3827)
The [specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html) does not require those keys to be set, and the type reflects that, so they should default to null.
This commit is contained in:
parent
eefb379386
commit
ec06f419af
3 changed files with 2 additions and 6 deletions
|
@ -34,6 +34,7 @@ let
|
||||||
exec = mkOption {
|
exec = mkOption {
|
||||||
description = "Program to execute, possibly with arguments.";
|
description = "Program to execute, possibly with arguments.";
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
icon = mkOption {
|
icon = mkOption {
|
||||||
|
@ -131,6 +132,7 @@ let
|
||||||
options.exec = mkOption {
|
options.exec = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = "Program to execute, possibly with arguments.";
|
description = "Program to execute, possibly with arguments.";
|
||||||
|
default = null;
|
||||||
};
|
};
|
||||||
options.icon = mkOption {
|
options.icon = mkOption {
|
||||||
type = with types; nullOr (either str path);
|
type = with types; nullOr (either str path);
|
||||||
|
@ -162,10 +164,6 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#formatting helpers
|
|
||||||
semicolonList = list:
|
|
||||||
(concatStringsSep ";" list) + ";"; # requires trailing semicolon
|
|
||||||
|
|
||||||
#passes config options to makeDesktopItem in expected format
|
#passes config options to makeDesktopItem in expected format
|
||||||
makeFile = name: config:
|
makeFile = name: config:
|
||||||
pkgs.makeDesktopItem {
|
pkgs.makeDesktopItem {
|
||||||
|
|
|
@ -32,7 +32,6 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
min = { # minimal definition
|
min = { # minimal definition
|
||||||
exec = "test --option";
|
|
||||||
name = "Test";
|
name = "Test";
|
||||||
};
|
};
|
||||||
deprecated = {
|
deprecated = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Exec=test --option
|
|
||||||
Name=Test
|
Name=Test
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
|
Loading…
Reference in a new issue