Previously kodi.withPackages constructed its own kodiPackages set
instead of using the one exposed through kodi.passthru.packages,
preventing the use of overridden kodi packages in kodi.withPackages.
This change package overrides such that they are observed by both addon
selection and wrapper path construction.
kodi has a mainProgram:
```
nix-repl> kodi.meta.mainProgram
"kodi"
```
But when wrapping it, we'd lose its mainProgram:
```
nix-repl> (kodi.withPackages (_: [])).meta.mainProgram
error:
… while evaluating the attribute 'meta.mainProgram'
...
error: attribute 'mainProgram' missing
at «string»:1:1:
1| (kodi.withPackages (_: [])).meta.mainProgram
| ^
```
This fixes that. Please let me know if there's a better pattern
to follow for inheriting meta information when wrapping. I intentionally
didn't inherit the full `meta` attribute as it has some other
information (such as `position`) that I think are better *not*
inherited.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
This adds a backport of
a6dedce7ba
to Kodi 19.4 Matrix. This can be removed once a new release of Kodi comes
out and we upgrade to it.
What's nice about this approach is that it doesn't special case
webinterface.default. I've never actually tried using a non-default web
interface with Kodi, but I bet it wouldn't have worked before this
change, and I think it would work after this change =)
See and
https://github.com/NixOS/nixpkgs/pull/152675#issuecomment-1003442175 and
https://forum.kodi.tv/showthread.php?tid=366338&pid=3079493 for some
discussion about this approach.
Kodi refuses to follow symlinks that lead outside of a small whitelist
of allowed directories. See
[`CFileUtils::CheckFileAccessAllowed`](4ac445c4a9/xbmc/utils/FileUtils.cpp (L252))
for the relevant code.
This feels like a pretty brittle workaround, but I can't think of a
better solution, so I'm going to say that this fixes
https://github.com/NixOS/nixpkgs/issues/145116.