Files
nixpkgs/pkgs/development/python-modules/mpv/default.nix
T
Michael Daniels 075e8c2c4f treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

50 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
mpv,
setuptools,
}:
buildPythonPackage rec {
pname = "mpv";
version = "1.0.7";
pyproject = true;
src = fetchFromGitHub {
owner = "jaseg";
repo = "python-mpv";
rev = "v${version}";
hash = "sha256-2sYWTzj7+ozezNX0uFdJW+A0K6bwAmiVvqo/lr9UToA=";
};
patches = [
# https://github.com/jellyfin/jellyfin-mpv-shim/issues/448
(fetchpatch {
url = "https://github.com/jaseg/python-mpv/commit/12850b34bd3b64704f8abd30341a647a73719267.patch";
hash = "sha256-2O7w8PeWinCzrigGX3IV+9PVCtU9KCM2UJ32Y1kE6m0=";
})
];
nativeBuildInputs = [ setuptools ];
buildInputs = [ mpv ];
postPatch = ''
substituteInPlace mpv.py \
--replace-fail "sofile = ctypes.util.find_library('mpv')" \
'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
pythonImportsCheck = [ "mpv" ];
meta = {
description = "Python interface to the mpv media player";
homepage = "https://github.com/jaseg/python-mpv";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ onny ];
};
}