Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waydroid: 1.4.2 -> 1.4.3; add update script, move to by-name, format, and other cleanup #346270

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions pkgs/by-name/wa/waydroid/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
lib,
fetchFromGitHub,
fetchpatch,
python3Packages,
dnsmasq,
gawk,
getent,
gobject-introspection,
gtk3,
kmod,
lxc,
iproute2,
iptables,
util-linux,
wrapGAppsHook3,
wl-clipboard,
runtimeShell,
nix-update-script,
}:

python3Packages.buildPythonApplication rec {
pname = "waydroid";
version = "1.4.3";
format = "other";

src = fetchFromGitHub {
owner = "waydroid";
repo = "waydroid";
rev = "refs/tags/${version}";
hash = "sha256-LejyuGYgW46++95XROuWc13Q+w0l+AzGAl9ekfmAIEk=";
};

nativeBuildInputs = [
gobject-introspection
wrapGAppsHook3
];

buildInputs = [
gtk3
];

propagatedBuildInputs = with python3Packages; [
dbus-python
gbinder-python
pyclip
pygobject3
];

dontUseSetuptoolsBuild = true;
dontUsePipInstall = true;
dontUseSetuptoolsCheck = true;
dontWrapPythonPrograms = true;
dontWrapGApps = true;

installFlags = [
"PREFIX=$(out)"
"USE_SYSTEMD=0"
"SYSCONFDIR=$(out)/etc"
];

preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")

patchShebangs --host $out/lib/waydroid/data/scripts
wrapProgram $out/lib/waydroid/data/scripts/waydroid-net.sh \
--prefix PATH ":" ${
lib.makeBinPath [
dnsmasq
getent
iproute2
iptables
]
}

wrapPythonProgramsIn $out/lib/waydroid/ "${
lib.concatStringsSep " " (
[
"$out"
]
++ propagatedBuildInputs
++ [
gawk
kmod
lxc
util-linux
wl-clipboard
]
)
}"

substituteInPlace $out/lib/waydroid/tools/helpers/*.py \
--replace '"sh"' '"${runtimeShell}"'
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Container-based approach to boot a full Android system on a regular GNU/Linux system";
mainProgram = "waydroid";
homepage = "https://github.com/waydroid/waydroid";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ mcaju ];
};
}
95 changes: 0 additions & 95 deletions pkgs/os-specific/linux/waydroid/default.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3840,8 +3840,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Carbon;
};

waydroid = callPackage ../os-specific/linux/waydroid { };

wgo = callPackage ../development/tools/wgo { };

wiiload = callPackage ../development/tools/wiiload { };
Expand Down