Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

105 lines
1.9 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
setuptools,
# nativeBuildInputs
pkg-config,
# buildInputs
ffmpeg-headless,
# dependencies
fetchurl,
linkFarm,
numpy,
pillow,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "av";
version = "15.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-VeF6Sti1Ide2LchiCuPut/bdbJUv+5eTH2q0YMcniyA=";
};
build-system = [
cython
setuptools
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ffmpeg-headless ];
preCheck =
let
# Update with `./update-test-samples.bash` if necessary.
testSamples = linkFarm "pyav-test-samples" (
lib.mapAttrs (_: fetchurl) (lib.importTOML ./test-samples.toml)
);
in
''
# ensure we import the built version
rm -r av
ln -s ${testSamples} tests/assets
'';
nativeCheckInputs = [
numpy
pillow
pytestCheckHook
];
# `__darwinAllowLocalNetworking` doesnt work for these; not sure why.
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
"tests/test_timeout.py"
];
pythonImportsCheck = [
"av"
"av.audio"
"av.buffer"
"av.bytesource"
"av.codec"
"av.container"
"av._core"
"av.datasets"
"av.descriptor"
"av.dictionary"
"av.error"
"av.filter"
"av.format"
"av.frame"
"av.logging"
"av.option"
"av.packet"
"av.plane"
"av.stream"
"av.subtitles"
"av.utils"
"av.video"
];
meta = {
description = "Pythonic bindings for FFmpeg";
mainProgram = "pyav";
homepage = "https://github.com/PyAV-Org/PyAV";
changelog = "https://github.com/PyAV-Org/PyAV/blob/v${version}/CHANGELOG.rst";
license = lib.licenses.bsd2;
maintainers = [ ];
};
}