about summary refs log tree commit diff
path: root/pkgs/development/python-modules/get-video-properties/default.nix
blob: 98fe8e9b1d424bd058a26ca1ce31b07f3322e61f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, buildPythonPackage
, fetchFromGitHub
, ffmpeg-headless
}:

buildPythonPackage rec {
  pname = "get-video-properties";
  version = "0.1.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "mvasilkov";
    repo = "python-get-video-properties";
    rev = "944c68addbc27e320ebc6313d3f016fb69b5e880";
    sha256 = "18aslx7amaiw31bl9gambmvzry7hp5nqab6kgp8sg3mz9ih4lzal";
  };

  # no tests
  doCheck = false;

  postPatch = ''
    substituteInPlace videoprops/__init__.py \
      --replace "which('ffprobe')" "'${ffmpeg-headless}/bin/ffprobe'"

    # unused and vulnerable to various CVEs
    rm -r videoprops/binary_dependencies
  '';

  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 ];
  };

}