File tree Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Original file line number Diff line number Diff line change 99 mkIf
1010 mkMerge
1111 ;
12- TWRPBranch = "twrp-9.0" ;
12+ androidVersionToTWRPBranch = {
13+ "9" = "twrp-9.0" ;
14+ } ;
15+ TWRPBranch = androidVersionToTWRPBranch . ${ toString config . androidVersion } ;
1316 repoDirs = lib . importJSON ( ./. + "/${ TWRPBranch } /repo.json" ) ;
1417in mkIf ( config . flavor == "twrp" )
18+ ( mkMerge [
1519{
16- androidVersion = mkDefault 9 ;
20+ # Defaults elsewhere makes it default to `12` if unset.
21+ androidVersion = mkDefault ( builtins . throw "androidVersion needs to be set according to your device tree." ) ;
1722
1823 # product names start with "omni_"
1924 # → lunch omni_sailfish-eng
@@ -26,18 +31,6 @@ in mkIf (config.flavor == "twrp")
2631
2732 source . dirs = mkMerge ( [
2833 repoDirs
29- {
30- "bootable/recovery" = {
31- patches = [
32- ./patches/android_bootable_recovery/0001-gui-Don-t-preserve-mode-owner-when-copying-files.patch
33- ] ;
34- } ;
35- "build/make" = {
36- patches = [
37- ./patches/android_build/0001-Work-around-source-files-being-read-only.patch
38- ] ;
39- } ;
40- }
4134 ] ) ;
4235
4336 source . manifest . url = mkDefault "https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git" ;
@@ -56,3 +49,20 @@ in mkIf (config.flavor == "twrp")
5649 } ;
5750 } ;
5851}
52+ ( mkIf ( config . androidVersion == 9 ) {
53+ source . dirs = mkMerge ( [
54+ repoDirs
55+ {
56+ "bootable/recovery" = {
57+ patches = [
58+ ./patches/android_bootable_recovery/0001-gui-Don-t-preserve-mode-owner-when-copying-files.patch
59+ ] ;
60+ } ;
61+ "build/make" = {
62+ patches = [
63+ ./patches/android_build/0001-Work-around-source-files-being-read-only.patch
64+ ] ;
65+ } ;
66+ }
67+ ] ) ;
68+ } )
You can’t perform that action at this time.
0 commit comments