| 20 Oct 2021 |
sterni | and there is a flag where you can pass either a tuple or a LLVM triple | 21:17:08 |
sterni | So I thought I'd be strict about the tuple and otherwise fall back to cabal's triple parsing code | 21:17:31 |
sterni | but that doesn't work if the kernel part has a dash | 21:17:42 |
sterni | I want to avoid actually checking against a list | 21:17:55 |
sterni | and the problem is cabal also doesn't do that | 21:18:20 |
Alyssa Ross | you could use mkSystemFromString, but that would only work if it was a double or a GNU triple I think | 21:18:51 |
sterni | don't want to call nix from haskell for this | 21:19:10 |
Alyssa Ross | oh i see | 21:19:20 |
sterni | needs to work in ifd for example | 21:19:20 |
Alyssa Ross | is armv7a-linux-androideabi really a Nix double? | 21:19:52 |
sterni | and reimplementing it won't work because it checks against a list of known kernels and arches right? | 21:19:56 |
Alyssa Ross | yes | 21:20:03 |
sterni | lib.systems.elaborate parsed it correctly | 21:20:18 |
sterni | but I suppose it's not a real one | 21:20:25 |
sterni | the question is also if nix itself would accept it | 21:20:35 |
Alyssa Ross | I think the double would just be armv7a-linux | 21:21:21 |
Alyssa Ross | configure.ac is the source of truth | 21:21:26 |
sterni | I think actually lib.platforms is my source of truth and it can parse everything in there | 21:22:28 |
sterni | because this code is mostly for populating badPlatforms and platforms in meta | 21:22:45 |
sterni | and the other place where I'll use it accepts LLVM triples, so if someone needs some crazy platform, they can just use that | 21:23:22 |
Alyssa Ross | When I say configure.ac is the source of truth, I say that because it's what generates these values | 21:23:53 |
Alyssa Ross | lib.platforms is a static list. | 21:23:56 |
Alyssa Ross | and sometimes I need to add things to lib.platforms | 21:24:08 |
Alyssa Ross | so configure.ac is how you figure out what those should be | 21:24:17 |
sterni | yeah, I understand what you were getting at | 21:24:27 |
sterni | I just was trying to reign myself in | 21:24:45 |
sterni | I should make this overly complicated for the sake of correctness | 21:24:55 |
sterni | Alyssa Ross: okay so armv7a-linux-androideabi is possible in theory | 21:31:33 |
sterni | configure.ac only strips version numbers from the kernel and gnu/musl suffixes it seems | 21:32:03 |
sterni | probably the best solution would be to be more lenient with the system tuple | 21:33:40 |