summary refs log tree commit diff
path: root/pkgs/os-specific/linux/anbox
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2018-11-03 19:33:58 +0100
committerGabriel Ebner <gebner@gebner.org>2019-03-18 09:23:08 +0100
commitdfa314c38212cc462e64761c2c476d984da99e4c (patch)
tree8006db6135add0f3a57679438d1fa96dc483182c /pkgs/os-specific/linux/anbox
parentff43f0a7b51a21b06086cfc91de1c81512cfa0e1 (diff)
downloadnixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar.gz
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar.bz2
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar.lz
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar.xz
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.tar.zst
nixpkgs-dfa314c38212cc462e64761c2c476d984da99e4c.zip
linuxPackages.anbox: init at 2018-09-08
Co-authored-by: Luke Adams <luke.adams@belljar.io>
Co-authored-by: Volth <volth@webmaster.ms>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Co-authored-by: Edward Tjörnhammar <ed@cflags.cc>
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
Diffstat (limited to 'pkgs/os-specific/linux/anbox')
-rw-r--r--pkgs/os-specific/linux/anbox/kmod.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/anbox/kmod.nix b/pkgs/os-specific/linux/anbox/kmod.nix
new file mode 100644
index 00000000000..8a102996cab
--- /dev/null
+++ b/pkgs/os-specific/linux/anbox/kmod.nix
@@ -0,0 +1,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 ];
+  };
+
+}