nixpkgs/pkgs/development/python-modules/get-video-properties/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

40 lines
919 B
Nix

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