1{
2 deployAndroidPackage,
3 lib,
4 package,
5 os,
6 arch,
7 autoPatchelfHook,
8 makeWrapper,
9 pkgs,
10 meta,
11}:
12
13deployAndroidPackage {
14 inherit package os arch;
15 nativeBuildInputs = [ makeWrapper ] ++ lib.optionals (os == "linux") [ autoPatchelfHook ];
16 buildInputs = lib.optionals (os == "linux") (
17 with pkgs;
18 [
19 llvmPackages.libcxx
20 SDL2
21 ]
22 );
23
24 patchInstructions = lib.optionalString (os == "linux") ''
25 autoPatchelf --no-recurse $packageBaseDir
26
27 if [ -f $PWD/desktop-head-unit ]; then
28 echo "desktop-head-unit exists"
29 wrapProgram $PWD/desktop-head-unit \
30 --prefix LD_LIBRARY_PATH : ${
31 lib.makeLibraryPath (
32 with pkgs;
33 [
34 xorg.libX11
35 xorg.libXrandr
36 ]
37 )
38 }
39 fi
40 '';
41
42 inherit meta;
43}