nixpkgs/pkgs/os-specific/linux/waydroid/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.4 KiB
Nix
Raw Normal View History

2021-10-01 21:16:36 +01:00
{ stdenv
, lib
, fetchFromGitHub
, python3Packages
, bash
2021-10-01 21:16:36 +01:00
, dnsmasq
2022-10-10 08:43:59 +01:00
, gawk
, getent
, kmod
2021-10-01 21:16:36 +01:00
, lxc
, iproute2
, iptables
2021-10-01 21:16:36 +01:00
, nftables
, util-linux
, which
, xclip
2021-10-01 21:16:36 +01:00
}:
python3Packages.buildPythonApplication rec {
pname = "waydroid";
version = "1.3.4";
2022-09-19 03:06:11 +01:00
format = "other";
2021-10-01 21:16:36 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-0GBob9BUwiE5cFGdK8AdwsTjTOdc+AIWqUGN/gFfOqI=";
2021-10-01 21:16:36 +01:00
};
propagatedBuildInputs = with python3Packages; [
gbinder-python
pyclip
2021-10-01 21:16:36 +01:00
pygobject3
];
dontUseSetuptoolsBuild = true;
dontUsePipInstall = true;
dontUseSetuptoolsCheck = true;
dontWrapPythonPrograms = true;
installPhase = ''
2022-10-10 08:43:59 +01:00
make install PREFIX=$out USE_SYSTEMD=0 USE_NFTABLES=1
2021-10-01 21:16:36 +01:00
2022-08-10 23:04:10 +01:00
wrapProgram $out/lib/waydroid/data/scripts/waydroid-net.sh \
--prefix PATH ":" ${lib.makeBinPath [ dnsmasq getent iproute2 nftables ]}
2021-10-01 21:16:36 +01:00
2022-08-10 23:04:10 +01:00
wrapPythonProgramsIn $out/lib/waydroid/ "${lib.concatStringsSep " " [
"$out"
python3Packages.gbinder-python
python3Packages.pygobject3
python3Packages.pyclip
2022-10-10 08:43:59 +01:00
gawk
kmod
lxc
util-linux
which
xclip
]}"
2021-10-01 21:16:36 +01:00
'';
meta = with lib; {
description = "Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu";
2021-10-01 21:16:36 +01:00
homepage = "https://github.com/waydroid/waydroid";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ mcaju ];
};
}