nixpkgs-suyu/pkgs/development/python-modules/pymediainfo/default.nix
R. RyanTM e0f4b29c35 python37Packages.pymediainfo: 4.0 -> 4.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-pymediainfo/versions
2019-09-28 05:56:23 -07:00

40 lines
1.2 KiB
Nix

{ stdenv, fetchPypi, buildPythonPackage
, libmediainfo
, setuptools_scm
, pytest, glibcLocales }:
buildPythonPackage rec {
pname = "pymediainfo";
version = "4.1";
src = fetchPypi {
inherit pname version;
sha256 = "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd";
};
postPatch = ''
substituteInPlace pymediainfo/__init__.py \
--replace "libmediainfo.0.dylib" \
"${libmediainfo}/lib/libmediainfo.0${stdenv.hostPlatform.extensions.sharedLibrary}" \
--replace "libmediainfo.dylib" \
"${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}" \
--replace "libmediainfo.so.0" \
"${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0"
'';
nativeBuildInputs = [ setuptools_scm ];
checkInputs = [ glibcLocales pytest ];
checkPhase = ''
export LC_ALL=en_US.UTF-8
py.test -k 'not test_parse_url' tests
'';
meta = with stdenv.lib; {
description = "Python wrapper for the mediainfo library";
homepage = https://github.com/sbraz/pymediainfo;
license = licenses.mit;
maintainers = with maintainers; [ jfrankenau ];
};
}