NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.49k stars 12.99k forks source link

Package request: manim #60284

Closed matthew-piziak closed 3 years ago

matthew-piziak commented 5 years ago

Manim - Mathematical Animation Engine

Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at 3Blue1Brown.

Upstream repository: https://github.com/3b1b/manim

This is a state-of-the-art mathematics animation utility installed with Python.

JohnAZoidberg commented 5 years ago

It's not trivial... I'm trying. They don't have a setup.py and it tries to write to the installation location, which is not possible in the nix-store.

In the meantime you can get a nix-shell with the dependencies like this: nix-shell -p cairo sox ffmpeg xdg_utils "python3.withPackages(ps: with ps; [ colour opencv numpy pillow progressbar scipy tqdm pycairo pydub ])"

JohnAZoidberg commented 5 years ago

Got it! https://github.com/JohnAZoidberg/nixpkgs/commit/17463b9c40411cbc001f52205998a688607ea0b9 I'll wait for feedback from upstream until I proceed with a PR here. I'm not sure if I packaged all python scripts.

ajs124 commented 4 years ago

What happened to this after the PR was merged upstream?

JohnAZoidberg commented 4 years ago

I was going to write some documentation on how the usage is different than upstream, as they expect it to be run from a git clone. I'll try it out again and make a PR to nixpkgs ASAP.

sorokin commented 4 years ago

I tried using this package and got this error message:

sh: latex: команда не найдена
Traceback (most recent call last):
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/extract_scene.py", line 150, in main
    scene = SceneClass(**scene_kwargs)
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/scene/scene.py", line 52, in __init__
    self.construct()
  File "1.py", line 20, in construct
    title = TextMobject("This is some \\LaTeX")
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/mobject/svg/tex_mobject.py", line 144, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/mobject/svg/tex_mobject.py", line 44, in __init__
    self.template_tex_file_body
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/utils/tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "/nix/store/z0y0vajvszj398n2i9vz6njzd73fim2i-manim-0.1.10/lib/python3.7/site-packages/manimlib/utils/tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: Tex/081b5f87a6472151.log

Apparently manim tries to execute command latex without specifying absolute path to /nix/store/.../bin/latex.

Update: As I understand now texlive.combined.scheme-full is omitted from propagatedBuildInputs intentionally to reduce the size of the dependencies. Adding it fixed the problem. Do you think manim has many usages without tex? My understanding is that users of manim will have tex installed anyway.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.