564255f230
The package set has been deprecated in https://github.com/NixOS/nixpkgs/pull/479724 and its usage is causing eval failures on staging. Signed-off-by: Marcin Serwin <marcin@serwin.dev>
52 lines
1.0 KiB
Nix
52 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
mpv,
|
|
setuptools,
|
|
pytestCheckHook,
|
|
pyvirtualdisplay,
|
|
xvfb,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mpv";
|
|
version = "1.0.8";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jaseg";
|
|
repo = "python-mpv";
|
|
tag = "v${version}";
|
|
hash = "sha256-MHdQnnjxnbOkIf56VLGi7vgNbrjhU/ODUBdZoXjxXxE=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace mpv.py \
|
|
--replace-fail "sofile = ctypes.util.find_library('mpv')" \
|
|
'sofile = "${mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [ mpv ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pyvirtualdisplay
|
|
]
|
|
++ lib.optionals stdenv.isLinux [
|
|
xvfb
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|