Fixes build after #274007
Without the street the build fails with:
downloadid is f38fc270c4c040bea4782182d0fbb367
resolveurl is Error: Must register to be able to perform the download
curl: (3) URL rejected: Malformed input to a URL function
Only needed for studio variant. Previously, `extraPreBwrapCmds` did not
exist. Now that it does, we can use it. See message in commit
fe45cd375a for context.
stdenv.targetPlatform really shouldn't be used by software that
doesn't generate or manipulate binaries. I reviewed all uses of
targetPlatform outside of pkgs/development/compilers and pkgs/stdenv
and replaced those which weren't involved in something which fits
these criteria.
The downloads.json also includes metadata for older versions, so this
should be durable unless upstream breaks things. Some older downloads
appear to not include the “Update” suffix in the name, so match with or
without it.
Resolve wants to write the license to `./.license` in the drv store
path. This obviously fails as it is read-only. Conveniently this is a
Bubblewrap-based FHS env, so we can bind-mount a reasonable dir from
$HOME to this path instead. Unfortunately, the dir needs to exist before
launching, so it must be manually created presently e.g.
mkdir -p ~/.local/share/DaVinciResolve/license
At least the error is fairly obvious:
> bwrap: Can't find source path /home/user/.local/share/DaVinciResolve/license: No such file or directory
Without making the license writable, license activation will always give
a generic error—the actual problem was found with strace.
Without libXt, shows popup on launch:
> Unable to load plugin: USD.plugin
>
> libXt.so.6: cannot open shared object file: No such file or directory
ultimately launches okay without it, but some feature would probably be
broken.