Merge pull request #140200 from CajuM/waydroid
This commit is contained in:
commit
ceb3636770
45
pkgs/development/libraries/libgbinder/default.nix
Normal file
45
pkgs/development/libraries/libgbinder/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv, lib, fetchFromGitHub, pkg-config, glib, libglibutil }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libgbinder";
|
||||
version = "1.1.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mer-hybris";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "03p5ala9lnfcizh7832ax5phdvfzrdxw6acw8zib8wj0s133wyhb";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
libglibutil
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"LIBDIR=$(out)/lib"
|
||||
"INSTALL_INCLUDE_DIR=$(dev)/include/gbinder"
|
||||
"INSTALL_PKGCONFIG_DIR=$(dev)/lib/pkgconfig"
|
||||
];
|
||||
|
||||
installTargets = [ "install" "install-dev" ];
|
||||
|
||||
postInstall = ''
|
||||
sed -i -e "s@includedir=/usr@includedir=$dev@g" $dev/lib/pkgconfig/$pname.pc
|
||||
sed -i -e "s@Cflags: @Cflags: $($PKG_CONFIG --cflags libglibutil) @g" $dev/lib/pkgconfig/$pname.pc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GLib-style interface to binder";
|
||||
homepage = "https://github.com/mer-hybris/libgbinder";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mcaju ];
|
||||
};
|
||||
}
|
45
pkgs/development/libraries/libglibutil/default.nix
Normal file
45
pkgs/development/libraries/libglibutil/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv, lib, fetchFromGitLab, pkg-config, glib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libglibutil";
|
||||
version = "1.0.55";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "git.sailfishos.org";
|
||||
owner = "mer-core";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0zrxccpyfz4jf14zr6fj9b88p340s66lw5cnqkapfa72kl1rnp4q";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"LIBDIR=$(out)/lib"
|
||||
"INSTALL_INCLUDE_DIR=$(dev)/include/gutil"
|
||||
"INSTALL_PKGCONFIG_DIR=$(dev)/lib/pkgconfig"
|
||||
];
|
||||
|
||||
installTargets = [ "install" "install-dev" ];
|
||||
|
||||
postInstall = ''
|
||||
sed -i -e "s@includedir=/usr@includedir=$dev@g" $dev/lib/pkgconfig/$pname.pc
|
||||
sed -i -e "s@Cflags: @Cflags: $($PKG_CONFIG --cflags glib-2.0) @g" $dev/lib/pkgconfig/$pname.pc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library of glib utilities.";
|
||||
homepage = "https://git.sailfishos.org/mer-core/libglibutil";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mcaju ];
|
||||
};
|
||||
}
|
39
pkgs/development/python-modules/gbinder-python/default.nix
Normal file
39
pkgs/development/python-modules/gbinder-python/default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, cython
|
||||
, pkg-config
|
||||
, libgbinder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gbinder-python";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "erfanoabdi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0jgblzakjgsy0cj93bmh5gr7qnl2xgsrm0wzc6xjvzry9lrbs360";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
libgbinder
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
pkg-config
|
||||
];
|
||||
|
||||
setupPyGlobalFlags = [ "--cython" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for libgbinder";
|
||||
homepage = "https://github.com/erfanoabdi/gbinder-python";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ mcaju ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
58
pkgs/os-specific/linux/waydroid/default.nix
Normal file
58
pkgs/os-specific/linux/waydroid/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, python3Packages
|
||||
, dnsmasq
|
||||
, lxc
|
||||
, nftables
|
||||
, python
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "waydroid";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0cabh7rysh2v15wrxg250370mw26s5d073yxmczxsarbp4ri2pl4";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
gbinder-python
|
||||
pygobject3
|
||||
];
|
||||
|
||||
dontUseSetuptoolsBuild = true;
|
||||
dontUsePipInstall = true;
|
||||
dontUseSetuptoolsCheck = true;
|
||||
dontWrapPythonPrograms = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/${python3Packages.python.sitePackages}
|
||||
|
||||
cp -ra tools $out/${python3Packages.python.sitePackages}/tools
|
||||
|
||||
cp -ra data $out/${python3Packages.python.sitePackages}/data
|
||||
wrapProgram $out/${python3Packages.python.sitePackages}/data/scripts/waydroid-net.sh \
|
||||
--prefix PATH ":" ${lib.makeBinPath [ dnsmasq nftables ]}
|
||||
|
||||
mkdir -p $out/share/waydroid/gbinder.d
|
||||
cp gbinder/anbox.conf $out/share/waydroid/gbinder.d/anbox.conf
|
||||
|
||||
mkdir $out/bin
|
||||
cp -a waydroid.py $out/${python3Packages.python.sitePackages}/waydroid.py
|
||||
ln -s $out/${python3Packages.python.sitePackages}/waydroid.py $out/bin/waydroid
|
||||
|
||||
wrapPythonProgramsIn $out/${python3Packages.python.sitePackages} "$out ${python3Packages.gbinder-python} ${python3Packages.pygobject3} ${lxc}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.";
|
||||
homepage = "https://github.com/waydroid/waydroid";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mcaju ];
|
||||
};
|
||||
}
|
@ -1828,6 +1828,8 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) Carbon;
|
||||
};
|
||||
|
||||
waydroid = callPackage ../os-specific/linux/waydroid { };
|
||||
|
||||
wiiload = callPackage ../development/tools/wiiload { };
|
||||
|
||||
wiimms-iso-tools = callPackage ../tools/filesystems/wiimms-iso-tools { };
|
||||
@ -17073,6 +17075,8 @@ with pkgs;
|
||||
|
||||
libgadu = callPackage ../development/libraries/libgadu { };
|
||||
|
||||
libgbinder = callPackage ../development/libraries/libgbinder { };
|
||||
|
||||
libgda = callPackage ../development/libraries/libgda { };
|
||||
|
||||
libgda6 = callPackage ../development/libraries/libgda/6.x.nix { };
|
||||
@ -17087,6 +17091,8 @@ with pkgs;
|
||||
|
||||
libgig = callPackage ../development/libraries/libgig { };
|
||||
|
||||
libglibutil = callPackage ../development/libraries/libglibutil { };
|
||||
|
||||
libgnome-keyring = callPackage ../development/libraries/libgnome-keyring { };
|
||||
libgnome-keyring3 = gnome.libgnome-keyring;
|
||||
|
||||
|
@ -2892,6 +2892,8 @@ in {
|
||||
|
||||
garages-amsterdam = callPackage ../development/python-modules/garages-amsterdam { };
|
||||
|
||||
gbinder-python = callPackage ../development/python-modules/gbinder-python { };
|
||||
|
||||
gcovr = callPackage ../development/python-modules/gcovr { };
|
||||
|
||||
gcsfs = callPackage ../development/python-modules/gcsfs { };
|
||||
|
Loading…
Reference in New Issue
Block a user