blob: 8a102996cab670da7c59a42509794440e76e972e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{ stdenv, lib, kernel, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "anbox-modules";
version = "2018-09-08-" + kernel.version;
src = fetchFromGitHub {
owner = "anbox";
repo = "anbox-modules";
rev = "27fd47e11ef6eef93738f8f3df3e42c88975544e";
sha256 = "1hnf5x5swjcws6mnxmd3byll8l7qsxxj9pgki2k31rbmqqf2sb0x";
};
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 ];
};
}
|