mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
python3Packages.mpv: 1.0.6 -> 1.0.7 (#394298)
This commit is contained in:
@@ -3,34 +3,44 @@
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pythonOlder,
|
||||
mpv,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mpv";
|
||||
version = "1.0.6";
|
||||
version = "1.0.7";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jaseg";
|
||||
repo = "python-mpv";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-1axVJ8XXs0ZPgsVux3+6YUm1KttLceZyyHOuUEHIFl4=";
|
||||
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=";
|
||||
})
|
||||
];
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
||||
buildInputs = [ mpv ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace mpv.py \
|
||||
--replace "sofile = ctypes.util.find_library('mpv')" \
|
||||
'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||
--replace-fail "sofile = ctypes.util.find_library('mpv')" \
|
||||
'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||
'';
|
||||
|
||||
# tests impure, will error if it can't load libmpv.so
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "mpv" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user