summary refs log tree commit diff
path: root/pkgs/os-specific/linux/anbox
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-06-03 16:39:33 -0400
committerrnhmjoj <rnhmjoj@inventati.org>2023-09-04 08:51:53 +0200
commit12b9e2b25903049f5dddbc4f03751134dda3777f (patch)
tree30c64628c342a22cf35dc266709d4bddad81f39c /pkgs/os-specific/linux/anbox
parent0a9b1bebe605bea14e3a38ef41184b0f24e095f6 (diff)
downloadnixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar.gz
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar.bz2
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar.lz
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar.xz
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.tar.zst
nixpkgs-12b9e2b25903049f5dddbc4f03751134dda3777f.zip
anbox: fix compatibility with LXC 4
This patch is used actively by postmarketOS, which in turn *just* uses
Alpine Linux packages for anbox.
Diffstat (limited to 'pkgs/os-specific/linux/anbox')
-rw-r--r--pkgs/os-specific/linux/anbox/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix
index d843db6359a..aa5f362665e 100644
--- a/pkgs/os-specific/linux/anbox/default.nix
+++ b/pkgs/os-specific/linux/anbox/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchFromGitHub, fetchurl
+, fetchpatch
 , cmake, pkg-config, dbus, makeWrapper
 , boost
 , elfutils # for libdw
@@ -90,7 +91,7 @@ stdenv.mkDerivation rec {
     "-Wno-error=mismatched-new-delete"
   ]);
 
-  patchPhase = ''
+  prePatch = ''
     patchShebangs scripts
 
     cat >cmake/FindGMock.cmake <<'EOF'
@@ -118,6 +119,14 @@ stdenv.mkDerivation rec {
     EOF
   '';
 
+  patches = [
+    # Fixes compatibility with lxc 4
+    (fetchpatch {
+      url = "https://git.alpinelinux.org/aports/plain/community/anbox/lxc4.patch?id=64243590a16aee8d4e72061886fc1b15256492c3";
+      sha256 = "1da5xyzyjza1g2q9nbxb4p3njj2sf3q71vkpvmmdphia5qnb0gk5";
+    })
+  ];
+
   postInstall = ''
     wrapProgram $out/bin/anbox \
       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libGL libglvnd]} \