python3Packages.manim: don't override av (#461602)

This commit is contained in:
Martin Weinelt
2025-11-15 13:16:24 +00:00
committed by GitHub
8 changed files with 125 additions and 41 deletions
+3 -13
View File
@@ -3,7 +3,7 @@
stdenv,
fetchFromGitHub,
installShellFiles,
python312,
python3,
# Override Python packages using
# self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); }
@@ -13,21 +13,11 @@
let
defaultOverrides = [
(self: super: {
av = (
super.av.overridePythonAttrs rec {
version = "13.1.0";
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60=";
};
}
);
av = self.av_13;
})
];
python = python312.override {
python = python3.override {
self = python;
packageOverrides = lib.composeManyExtensions (defaultOverrides ++ [ packageOverrides ]);
};
+14
View File
@@ -0,0 +1,14 @@
{
python3Packages,
}:
let
pythonPackages = python3Packages.overrideScope (
self: super: {
av = self.av_13;
}
);
in
(pythonPackages.toPythonApplication pythonPackages.manim-slides).overridePythonAttrs (oldAttrs: {
dependencies = oldAttrs.dependencies ++ oldAttrs.optional-dependencies.pyqt6-full;
})
+12
View File
@@ -0,0 +1,12 @@
{
python3Packages,
}:
let
pythonPackages = python3Packages.overrideScope (
self: super: {
av = self.av_13;
}
);
in
pythonPackages.toPythonApplication pythonPackages.manim
@@ -0,0 +1,90 @@
{
buildPythonPackage,
cython,
fetchFromGitHub,
fetchurl,
ffmpeg_7-headless,
lib,
linkFarm,
numpy,
pillow,
pkg-config,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "av";
version = "13.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60=";
};
build-system = [
cython
setuptools
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ffmpeg_7-headless ];
preCheck =
let
testSamples = linkFarm "pyav-test-samples" (
lib.mapAttrs (_: fetchurl) (lib.importTOML ../av/test-samples.toml)
);
in
''
# ensure we import the built version
rm -r av
ln -s ${testSamples} tests/assets
'';
nativeCheckInputs = [
numpy
pillow
pytestCheckHook
];
__darwinAllowLocalNetworking = true;
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 = {
changelog = "https://github.com/PyAV-Org/PyAV/blob/${src.tag}/CHANGELOG.rst";
description = "Pythonic bindings for FFmpeg";
homepage = "https://github.com/PyAV-Org/PyAV";
license = lib.licenses.bsd2;
mainProgram = "pyav";
maintainers = [ lib.maintainers.dotlambda ];
};
}
@@ -183,16 +183,6 @@ let
cbfonts-fd
]
);
# https://github.com/ManimCommunity/manim/pull/4037
av_13_1 = av.overridePythonAttrs rec {
version = "13.1.0";
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60=";
};
};
in
buildPythonPackage rec {
pname = "manim";
@@ -216,7 +206,7 @@ buildPythonPackage rec {
buildInputs = [ cairo ];
dependencies = [
av_13_1
av
beautifulsoup4
click
cloup
@@ -278,6 +268,8 @@ buildPythonPackage rec {
pythonImportsCheck = [ "manim" ];
meta = {
# https://github.com/ManimCommunity/manim/pull/4037
broken = lib.versionAtLeast av.version "14";
description = "Animation engine for explanatory math videos - Community version";
longDescription = ''
Manim is an animation engine for explanatory math videos. It's used to
+1 -9
View File
@@ -86,15 +86,7 @@ let
];
});
av = (super.av.override { ffmpeg-headless = ffmpeg_7-headless; }).overridePythonAttrs rec {
version = "13.1.0";
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60=";
};
};
av = self.av_13;
imageio = super.imageio.overridePythonAttrs (oldAttrs: {
disabledTests = oldAttrs.disabledTests or [ ] ++ [
-8
View File
@@ -11155,14 +11155,6 @@ with pkgs;
m32edit = callPackage ../applications/audio/midas/m32edit.nix { };
manim = python3Packages.toPythonApplication python3Packages.manim;
manim-slides =
(python3Packages.toPythonApplication python3Packages.manim-slides).overridePythonAttrs
(oldAttrs: {
dependencies = oldAttrs.dependencies ++ oldAttrs.optional-dependencies.pyqt6-full;
});
manuskript = libsForQt5.callPackage ../applications/editors/manuskript { };
minari = python3Packages.toPythonApplication python3Packages.minari;
+2
View File
@@ -1208,6 +1208,8 @@ self: super: with self; {
av = callPackage ../development/python-modules/av { };
av_13 = callPackage ../development/python-modules/av_13 { };
avahi = toPythonModule (
pkgs.avahi.override {
inherit python;