Skip to content

Commit 2b993d3

Browse files
committed
twrp: Add support for the android-10 based branch
Note that while it is deprecated by upstream, it may still be needed for some device trees that have not been updated to support the android-11 based builds. This has been verified to correctly build a `sofiar` (Moto g(8)) TWRP image that boots and works seemingly correctly.
1 parent 86d6c9f commit 2b993d3

File tree

2 files changed

+3699
-0
lines changed

2 files changed

+3699
-0
lines changed

flavors/twrp/default.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let
1111
;
1212
androidVersionToTWRPBranch = {
1313
"9" = "twrp-9.0";
14+
"10" = "twrp-10.0-deprecated";
1415
};
1516
TWRPBranch = androidVersionToTWRPBranch.${toString config.androidVersion};
1617
repoDirs = lib.importJSON (./. + "/${TWRPBranch}/repo.json");
@@ -66,3 +67,21 @@ in mkIf (config.flavor == "twrp")
6667
}
6768
]);
6869
})
70+
(mkIf (config.androidVersion == 10) {
71+
# It seems to want a lot of packages normally present in androidVersion == 9...
72+
envPackages = with pkgs; [
73+
openssl.dev
74+
bison
75+
flex
76+
perl
77+
which
78+
];
79+
80+
# Ugh, something really wants `ccache` in these repos.
81+
# :/
82+
ccache.enable = lib.mkForce true;
83+
envVars = {
84+
CCACHE_DIR = lib.mkForce "/tmp"; # Make configurable?
85+
};
86+
})
87+
])

0 commit comments

Comments
 (0)