Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python mpv module #119194

Closed
wants to merge 2 commits into from
Closed

Conversation

sumnerevans
Copy link
Member

@sumnerevans sumnerevans commented Apr 11, 2021

Motivation for this change

When the python3Packages.mpv package is included in another package via buildInputs (for example, from Sublime Music: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/audio/sublime-music/default.nix#L39), the postPatch hook wasn't actually causing the necessary replacement to occur.

This PR fixes that by moving the substitution to the patchPhase. This PR also adds myself as the maintainer of the python-mpv module.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -16,10 +16,10 @@ buildPythonPackage rec {

buildInputs = [ mpv ];

postPatch = ''
patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
patchPhase = ''
postPatch = ''

otherwise patches breaks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postPatch wasn't applying correctly when included in Sublime Music (I inspected the mpv.py file manually in the /nix store and it wasn't correctly updated...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postPatch is run in patchPhase when it isn't overwriten. There shouldn't be any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants