1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ffmpeg-headless
5}:
6
7buildPythonPackage rec {
8 pname = "get-video-properties";
9 version = "0.1.1";
10
11 src = fetchFromGitHub {
12 owner = "mvasilkov";
13 repo = "python-get-video-properties";
14 rev = "944c68addbc27e320ebc6313d3f016fb69b5e880";
15 sha256 = "18aslx7amaiw31bl9gambmvzry7hp5nqab6kgp8sg3mz9ih4lzal";
16 };
17
18 # no tests
19 doCheck = false;
20
21 postPatch = ''
22 substituteInPlace videoprops/__init__.py \
23 --replace "which('ffprobe')" "'${ffmpeg-headless}/bin/ffprobe'"
24
25 # unused and vulnerable to various CVEs
26 rm -r videoprops/binary_dependencies
27 '';
28
29 pythonImportsCheck = [ "videoprops" ];
30
31 meta = with lib; {
32 description = "Get video properties";
33 homepage = "https://github.com/mvasilkov/python-get-video-properties";
34 license = licenses.mit;
35 maintainers = with maintainers; [ globin ];
36 };
37
38}