2019-06-16 19:59:06 +00:00
|
|
|
{ stdenv, kernel, fetchFromGitHub }:
|
2018-11-03 18:33:58 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2018-11-03 18:33:58 +00:00
|
|
|
pname = "anbox-modules";
|
2019-07-23 13:44:04 +00:00
|
|
|
version = "2019-07-13-" + kernel.version;
|
2018-11-03 18:33:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anbox";
|
|
|
|
repo = "anbox-modules";
|
2019-07-23 13:44:04 +00:00
|
|
|
rev = "816dd4d6e702cf77a44cfe208659af6c39e02b57";
|
|
|
|
sha256 = "115xrv3fz5bk51hz8cwb61h0xnrsnv217fxmbpw35a6hjrk7gslc";
|
2018-11-03 18:33:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
KERNEL_SRC="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
for d in ashmem binder;do
|
|
|
|
cd $d
|
|
|
|
make
|
|
|
|
cd -
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
modDir=$out/lib/modules/${kernel.modDirVersion}/kernel/updates/
|
|
|
|
mkdir -p $modDir
|
|
|
|
for d in ashmem binder;do
|
|
|
|
mv $d/$d*.ko $modDir/.
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Anbox ashmem and binder drivers.";
|
|
|
|
homepage = https://github.com/anbox/anbox-modules;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
broken = (versionOlder kernel.version "4.4") || (kernel.features.grsecurity);
|
|
|
|
maintainers = with maintainers; [ edwtjo ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|