2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
appstream.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-08-20 17:08:02 +00:00
|
|
|
Whether to install files to support the
|
2022-08-12 12:06:08 +00:00
|
|
|
[AppStream metadata specification](https://www.freedesktop.org/software/appstream/docs/index.html).
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.appstream.enable {
|
2020-08-20 17:08:02 +00:00
|
|
|
environment.pathsToLink = [
|
2020-04-24 23:36:52 +00:00
|
|
|
# per component metadata
|
2020-08-20 17:08:02 +00:00
|
|
|
"/share/metainfo"
|
2020-04-24 23:36:52 +00:00
|
|
|
# legacy path for above
|
2020-08-20 17:08:02 +00:00
|
|
|
"/share/appdata"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|