2021-10-04 12:37:57 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, dnsmasq
|
2022-10-21 18:38:19 +00:00
|
|
|
, gawk
|
2021-12-06 16:07:01 +00:00
|
|
|
, getent
|
|
|
|
, kmod
|
2021-10-04 12:37:57 +00:00
|
|
|
, lxc
|
2021-12-06 16:07:01 +00:00
|
|
|
, iproute2
|
|
|
|
, iptables
|
2021-10-04 12:37:57 +00:00
|
|
|
, nftables
|
2021-12-06 16:07:01 +00:00
|
|
|
, util-linux
|
|
|
|
, which
|
|
|
|
, xclip
|
2021-10-04 12:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "waydroid";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "1.3.3";
|
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;
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-av1kcOSViUV2jsFiTE21N6sAJIL6K+zKkpPHjx6iYVk=";
|
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;
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
make install PREFIX=$out USE_SYSTEMD=0 USE_NFTABLES=1
|
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 ];
|
|
|
|
};
|
|
|
|
}
|