derive `buildDateTime` from JSON contents
Opened this issue · 0 comments
Atemu commented
Currently buildDateTime
must be specified and updated separately. It's the same for all androidVersions and makes updates non-deterministic because it either updates every time an update is done or is set arbitrarily by the user to likely their current time.
To rectify this, it ought to be possible to extract the timestamps out of the version's JSON files and then take the newest.
For the repo, this is actually quite trivial as you can simply do:
buildDateTime = lib.sort (p: q: p > q) (lib.mapAttrsToList (n: v: v.dateTime or 0) repoDirs);
For LineageOS this is a bit harder as we also have device and vendor dir sources. These do have timestamps in them too but they're in ISO8601 rather than UNIX epoch (which we need). We'd have to patch nix-prefetch-git to use unix epoch.