mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
8c70bfb9f2
Conflicts: pkgs/development/libraries/librsvg/default.nix pkgs/development/python-modules/r2pipe/default.nix
35 lines
859 B
Nix
35 lines
859 B
Nix
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, python, isPy27
|
|
, mpv
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mpv";
|
|
version = "1.0.1";
|
|
disabled = isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jaseg";
|
|
repo = "python-mpv";
|
|
rev = "v${version}";
|
|
hash = "sha256-UCJ1PknnWQiFciTEMxTUqDzz0Z8HEWycLuQqYeyQhoM=";
|
|
};
|
|
|
|
buildInputs = [ mpv ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace mpv.py \
|
|
--replace "sofile = ctypes.util.find_library('mpv')" \
|
|
'sofile = "${mpv}/lib/libmpv${stdenv.targetPlatform.extensions.sharedLibrary}"'
|
|
'';
|
|
|
|
# tests impure, will error if it can't load libmpv.so
|
|
doCheck = false;
|
|
pythonImportsCheck = [ "mpv" ];
|
|
|
|
meta = with lib; {
|
|
description = "A python interface to the mpv media player";
|
|
homepage = "https://github.com/jaseg/python-mpv";
|
|
license = licenses.agpl3Plus;
|
|
};
|
|
}
|