aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
new file mode 100644
index 000000000000..6eb74ca25f6b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/anbox/kmod.nix
@@ -0,0 +1,43 @@
+{ stdenv, kernel, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+ pname = "anbox-modules";
+ version = "2019-11-15-" + kernel.version;
+
+ src = fetchFromGitHub {
+ owner = "anbox";
+ repo = "anbox-modules";
+ rev = "e0a237e571989987806b32881044c539db25e3e1";
+ sha256 = "1km1nslp4f5znwskh4bb1b61r1inw1dlbwiyyq3rrh0f0agf8d0v";
+ };
+
+ 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 ];
+ };
+
+}