-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Init katrain #408590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Init katrain #408590
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me
x86_64-linux
✅ 10 packages built:
- katrain
- katrain.dist
- python312Packages.ffpyplayer
- python312Packages.ffpyplayer.dist
- python312Packages.kivymd
- python312Packages.kivymd.dist
- python313Packages.ffpyplayer
- python313Packages.ffpyplayer.dist
- python313Packages.kivymd
- python313Packages.kivymd.dist
version = "v4.5.2"; | ||
format = "wheel"; | ||
|
||
src = fetchurl { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, easier to bump versions in the future. updated + linted commits
else | ||
"sha256-+6aibWImMvNe6GNP/JSos0QQJq8NZ7X4v+MwpC4BPFw="; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im pretty sure it would fail to build on linux/aarch64, so it would be good to build in support for arm64, with something like this. I will later test if it builds on aarch64.
url =
if stdenv.isDarwin then
"https://github.com/matham/ffpyplayer/releases/download/v${version}/ffpyplayer-${version}-cp313-cp313-macosx_10_13_universal2.whl"
if stdenv.isAarch64 then
"/link/to/arch64.whl"
else
"https://github.com/matham/ffpyplayer/releases/download/v${version}/ffpyplayer-${version}-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
hash =
if stdenv.isDarwin then
"sha256-mPvggPi8KbOCuLqHxxHPcvqSt3BGWVgsLlTIFU8mlsU="
if stdenv.isAarch64 then
"sha256-Foooooooooooooooooooooooooooooooooooooooo="
else
"sha256-+6aibWImMvNe6GNP/JSos0QQJq8NZ7X4v+MwpC4BPFw=";
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately the project doesn't offer linux arm64 wheels, and they have a custom CI setup to build deps that I haven't had luck replicating in nix and would rather not chase. I could open an issue over there to start supporting arm64 wheels and circle back to nixpkgs when that's complete, if that's an acceptable workaround?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on a PR to add arm64 wheels over at ffpyplayer and will circle back here when those are available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pilz0 I've added ffpyplayer arm64 wheels upstream and referenced them in this PR, would you like to take another look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for adding arm wheel builds upstream, im going to to take a look at the PR later today. Im also pretty new to nixpkgs so i cant find all issues.
64c7c9c
to
9bd2692
Compare
Hey, ive looked over the PR again, and at least for me KivyMD doesnt work (amd64). ffpyplayer seems to work on both arm and amd64. Otherwise i haved noticed any issues :) |
Hey, can you describe what exactly is not working for kivymd? For me it builds and katrain can use it fine. |
Im getting this error when im running katrain via nixpkgs-review
|
Python gives me this error:
|
41a2cbc
to
e041be4
Compare
|
4947c5f
to
194b639
Compare
Katrain currently fails to build :/ (https://github.com/NixOS/nixpkgs/pull/408590/checks?check_run_id=44305902174) |
e5548e1
to
728884f
Compare
Sorry about that! All is well in |
builds for me now, too, without error the import error as seen in #408590 (comment) does still persist, though |
d93302f
to
47b8ae6
Compare
9352efb
to
9f4ed0e
Compare
Adds a module for pkgs.katrain to govern katago patching behavior and additional dependencies
Can you describe how you're reaching the import error in #408590 (comment)? I'm using the following flake to test importing each python package without issue: {
inputs = {
nixpkgs.url = "github:iofq/nixpkgs/init_katrain";
};
outputs = {
self,
nixpkgs,
}: {
devShells.x86_64-linux.default = let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
in
pkgs.mkShell {
packages = [
pkgs.katrain
(
pkgs.python3.withPackages
(ps:
with ps; [
kivymd
asyncgui
asynckivy
ffpyplayer
])
)
];
};
};
} iofq@nix ~/d/nixreview> nix develop --command python -c "import asyncgui,asynckivy,kivymd,ffpyplayer"
[INFO ] [Kivy ] v2.3.1
[INFO ] [Kivy ] Installed at "/nix/store/a0y8hih1b2c2n0jpy7agk3kxrbfdikgk-python3.13-kivy-2.3.1/lib/python3.13/site-packages/
kivy/__init__.py"
[INFO ] [Python ] v3.13.5 (main, Jun 11 2025, 15:36:57) [GCC 14.3.0]
[INFO ] [Python ] Interpreter at "/nix/store/djck7mx6jad1w0yy6zings96dyxanls6-python3-3.13.5/bin/python"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Factory ] 195 symbols loaded
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'4.6 (Compatibility Profile) Mesa 25.1.1'>
[INFO ] [GL ] OpenGL vendor <b'AMD'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.63, 6.15.0)'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [KivyMD ] v0.104.1 |
Adding katrain as it's becoming difficult to build on a modern Linux system such as ubuntu and nix could help :)
To do so, I had to add 2 new python modules, kivymd and ffpyplayer. ffpyplayer was difficult because the project needs ffmpeg C bindings; after troubleshooting for a few hours, I still wasn't able to get it to compile against any version of ffmpeg, and fell back to the wheel from pypi (which appears to be built with ffmpeg 6).
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.