2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, ffmpeg-headless
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "get-video-properties";
|
|
|
|
version = "0.1.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvasilkov";
|
|
|
|
repo = "python-get-video-properties";
|
|
|
|
rev = "944c68addbc27e320ebc6313d3f016fb69b5e880";
|
|
|
|
sha256 = "18aslx7amaiw31bl9gambmvzry7hp5nqab6kgp8sg3mz9ih4lzal";
|
|
|
|
};
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace videoprops/__init__.py \
|
2023-10-09 19:29:22 +00:00
|
|
|
--replace "which('ffprobe')" "'${ffmpeg-headless}/bin/ffprobe'"
|
|
|
|
|
|
|
|
# unused and vulnerable to various CVEs
|
|
|
|
rm -r videoprops/binary_dependencies
|
2021-05-28 09:39:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "videoprops" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Get video properties";
|
|
|
|
homepage = "https://github.com/mvasilkov/python-get-video-properties";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ globin ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|