Conversation
This pattern allows for easier overriding of the derivations attributes like described and discussed in NixOS#119942. In this context - adapt the handling of the version and revision handling so overriding it gets reflected in the version string that kodi displays in the UI - make the bundled dependencies available for overriding
Using withPackage on a kodi derivation that was modified with overrideAttrs lead to the modifications being discarded. With the previous adaptions to the kodi derivation we can now modify the wrapper that allows using both overrideAttrs and withPackage to form a custom kodi derivation with plugins.
ofborg
Bot
requested review from
aanderse,
cpages,
edwtjo,
minijackson,
peterhoeg and
sephalon
January 7, 2023 23:22
Member
|
@dwagenk thanks for contributing this. I'll try and get back to it as soon as I can, though I'm going to prioritize getting the new |
Member
|
Linking |
6 of 13 tasks
Member
|
Proposed changes merged in #304097, thanks! |
Contributor
Author
|
Oh, wow, thank you for updating and getting this merged! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
When using a kodi derivation modified with
overrideAttrsand adding extensions to it withwithPackagesthe changes were discarded and the original unmodified kodi derivation was wrapped together with the extensions.Fix this by switching kodi to use the
mkDerivationwithfinalAttrspattern (described in #119942 and https://nixos.org/manual/nixpkgs/stable/#mkderivation-recursive-attributes).Things done
For testing I've assebled a little flake
Test-Flake (expand)
The resulting
kodi-with-addonsderivation includes both, thepnamechanged viaoverrideAttrsas well as thepostBuildwrapping for theinputstreamplugin added viawithPackages.Running it is possible, finds the plugin and doesn't have any signs of anything being wrong.
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes