2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
2021-10-04 12:37:57 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, dnsmasq
|
2022-10-21 18:38:19 +00:00
|
|
|
, gawk
|
2021-12-06 16:07:01 +00:00
|
|
|
, getent
|
2023-02-02 18:25:31 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
2021-12-06 16:07:01 +00:00
|
|
|
, kmod
|
2021-10-04 12:37:57 +00:00
|
|
|
, lxc
|
2021-12-06 16:07:01 +00:00
|
|
|
, iproute2
|
2021-10-04 12:37:57 +00:00
|
|
|
, nftables
|
2021-12-06 16:07:01 +00:00
|
|
|
, util-linux
|
|
|
|
, which
|
2023-02-02 18:25:31 +00:00
|
|
|
, wrapGAppsHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, xclip
|
2021-10-04 12:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "waydroid";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.3.4";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "other";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-0GBob9BUwiE5cFGdK8AdwsTjTOdc+AIWqUGN/gFfOqI=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
gbinder-python
|
2021-12-06 16:07:01 +00:00
|
|
|
pyclip
|
2021-10-04 12:37:57 +00:00
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseSetuptoolsBuild = true;
|
|
|
|
dontUsePipInstall = true;
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
dontWrapPythonPrograms = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
dontWrapGApps = true;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
make install PREFIX=$out USE_SYSTEMD=0 USE_NFTABLES=1
|
2023-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
wrapProgram $out/lib/waydroid/data/scripts/waydroid-net.sh \
|
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ dnsmasq getent iproute2 nftables ]}
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
wrapPythonProgramsIn $out/lib/waydroid/ "${lib.concatStringsSep " " [
|
2021-12-06 16:07:01 +00:00
|
|
|
"$out"
|
|
|
|
python3Packages.gbinder-python
|
|
|
|
python3Packages.pygobject3
|
|
|
|
python3Packages.pyclip
|
2022-10-21 18:38:19 +00:00
|
|
|
gawk
|
2021-12-06 16:07:01 +00:00
|
|
|
kmod
|
|
|
|
lxc
|
|
|
|
util-linux
|
|
|
|
which
|
|
|
|
xclip
|
|
|
|
]}"
|
2021-10-04 12:37:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu";
|
2021-10-04 12:37:57 +00:00
|
|
|
homepage = "https://github.com/waydroid/waydroid";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ mcaju ];
|
|
|
|
};
|
|
|
|
}
|