Skip to content

Commit 0350a58

Browse files
authored
Merge pull request #102 from tfuxu/switch-to-libappstream
Switch to `libappstream`
2 parents f17a9e6 + beb31eb commit 0350a58

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

data/meson.build

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,28 @@ if desktop_file_validate.found()
2626
)
2727
endif
2828

29-
# Appdata
30-
appdata_conf = configuration_data()
31-
appdata_conf.set('app-id', application_id)
32-
appdata_conf.set('gettext-package', gettext_package)
33-
appdata_file = i18n.merge_file(
29+
# Translate and install Metainfo file
30+
metainfo_file = i18n.merge_file(
3431
input: configure_file(
3532
input: '@[email protected]'.format(base_id),
3633
output: '@BASENAME@',
37-
configuration: appdata_conf
34+
configuration: configuration_data({
35+
'app-id': application_id,
36+
'gettext-package': gettext_package
37+
})
3838
),
3939
output: '@[email protected]'.format(application_id),
4040
po_dir: podir,
4141
install: true,
4242
install_dir: join_paths(get_option('datadir'), 'metainfo')
4343
)
4444

45-
# Validate Appdata
46-
if appstream_util.found()
47-
test(
48-
'validate-appdata', appstream_util,
49-
args: [
50-
'validate-relax', '--nonet', appdata_file.full_path()
51-
],
52-
depends: appdata_file,
45+
# Validate Metainfo file
46+
appstream_cli = find_program('appstreamcli', required: false)
47+
if appstream_cli.found()
48+
test('Validate metainfo file', appstream_cli,
49+
args: ['validate', '--no-net', '--explain', metainfo_file.full_path()],
50+
depends: metainfo_file
5351
)
5452
endif
5553

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependency('gtk4', version: '>= 4.0.0')
1818
glib_compile_resources = find_program('glib-compile-resources', required: true)
1919
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
2020
desktop_file_validate = find_program('desktop-file-validate', required: false)
21-
appstream_util = find_program('appstream-util', required: false)
2221

2322
cargo = find_program('cargo', required: true)
2423

nix/geopard.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
, desktop-file-utils
1717
, gettext
1818
, blueprint-compiler
19-
, appstream-glib
19+
, appstream
2020
, rust-analyzer
2121
}:
2222

@@ -40,8 +40,7 @@ stdenv.mkDerivation {
4040
cmake
4141
blueprint-compiler
4242
desktop-file-utils
43-
appstream-glib
44-
blueprint-compiler
43+
appstream
4544
cargo
4645
rustPlatform.cargoSetupHook
4746
rustc

0 commit comments

Comments
 (0)