2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, kernel, fetchFromGitHub }:
|
2018-11-03 19:33:58 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2018-11-03 19:33:58 +01:00
|
|
|
pname = "anbox-modules";
|
2021-05-09 17:59:06 +02:00
|
|
|
version = "2020-06-14-${kernel.version}";
|
2018-11-03 19:33:58 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anbox";
|
|
|
|
repo = "anbox-modules";
|
2021-05-09 17:59:06 +02:00
|
|
|
rev = "98f0f3b3b1eeb5a6954ca15ec43e150b76369086";
|
|
|
|
sha256 = "sha256-6xDJQ4YItdbYqle/9VNfOc7D80yFGd9cFyF+CuABaF0=";
|
2018-11-03 19:33:58 +01: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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-11-03 19:33:58 +01:00
|
|
|
description = "Anbox ashmem and binder drivers.";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/anbox/anbox-modules";
|
2021-05-09 17:59:06 +02:00
|
|
|
license = licenses.gpl2Only;
|
2018-11-03 19:33:58 +01:00
|
|
|
platforms = platforms.linux;
|
2022-03-30 20:57:15 +02:00
|
|
|
broken = kernel.kernelAtLeast "5.5";
|
2018-11-03 19:33:58 +01:00
|
|
|
maintainers = with maintainers; [ edwtjo ];
|
|
|
|
};
|
|
|
|
}
|