Skip to content

Commit faed197

Browse files
waydroid-helper: init at 0.1.2 (#378653)
2 parents e54cdfa + 267395e commit faed197

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
nix-update-script,
5+
desktop-file-utils,
6+
libadwaita,
7+
meson,
8+
ninja,
9+
pkg-config,
10+
wrapGAppsHook4,
11+
libxml2,
12+
python3Packages,
13+
appstream,
14+
glib,
15+
cmake,
16+
dbus,
17+
systemd,
18+
bash,
19+
}:
20+
21+
python3Packages.buildPythonApplication rec {
22+
pname = "waydroid-helper";
23+
version = "0.1.2";
24+
pyproject = false; # uses meson
25+
26+
src = fetchFromGitHub {
27+
owner = "ayasa520";
28+
repo = "waydroid-helper";
29+
tag = "v${version}";
30+
hash = "sha256-dYduO5Wi8Ia/pR1xQKPhC6Ek/1Q9fm2RaVuhm9KYiU0=";
31+
};
32+
33+
postPatch = ''
34+
substituteInPlace dbus/meson.build \
35+
--replace-fail "dbus_policy_dir," "'$out/share/dbus-1/system.d'," \
36+
--replace-fail "dbus_service_dir," "'$out/share/dbus-1/system-services',"
37+
substituteInPlace systemd/meson.build \
38+
--replace-fail ": systemd_system_unit_dir" ": '$out/lib/systemd/system'" \
39+
--replace-fail ": systemd_user_unit_dir" ": '$out/lib/sysusers.d'"
40+
# com.jaoushingan.WaydroidHelper.desktop: component-name-missing, description-first-para-too-short
41+
# url-homepage-missing, desktop-app-launchable-omitted, content-rating-missing, developer-info-missing
42+
sed -i '/test(/{N;/Validate appstream file/!b;:a;N;/)/!ba;d}' data/meson.build
43+
substituteInPlace waydroid_helper/waydroid-cli.in \
44+
--replace-fail "/bin/bash" "${bash}/bin/bash"
45+
'';
46+
47+
nativeBuildInputs = [
48+
appstream
49+
glib
50+
cmake
51+
meson
52+
ninja
53+
pkg-config
54+
wrapGAppsHook4
55+
desktop-file-utils
56+
];
57+
58+
buildInputs = [
59+
libxml2
60+
libadwaita
61+
dbus
62+
systemd
63+
];
64+
65+
dontUseCmakeConfigure = true;
66+
67+
dependencies = with python3Packages; [
68+
pygobject3
69+
httpx
70+
pyyaml
71+
aiofiles
72+
dbus-python
73+
];
74+
75+
strictDeps = true;
76+
77+
dontWrapGApps = true;
78+
79+
makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ];
80+
81+
postInstallCheck = ''
82+
mesonCheckPhase
83+
'';
84+
85+
passthru.updateScript = nix-update-script { };
86+
87+
meta = {
88+
description = "Provides a user-friendly way to configure Waydroid and install extensions";
89+
homepage = "https://github.com/ayasa520/waydroid-helper";
90+
changelog = "https://github.com/ayasa520/waydroid-helper/releases/tag/${src.tag}";
91+
mainProgram = "waydroid-helper";
92+
platforms = lib.platforms.linux;
93+
license = with lib.licenses; [ gpl3Plus ];
94+
maintainers = with lib.maintainers; [ nayeko ];
95+
};
96+
}

0 commit comments

Comments
 (0)