-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
memento: 1.6.0 -> 1.7.0 + moved to by-name + OCR (optional) support #476399
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
Conversation
donovanglover
left a comment
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.
Otherwise LGTM
pkgs/by-name/me/memento/package.nix
Outdated
| let | ||
| libmocr = stdenv.mkDerivation { | ||
| pname = "libmocr"; | ||
| version = "unstable-2023-11-15"; # Placeholder version |
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.
| version = "unstable-2023-11-15"; # Placeholder version | |
| version = "0-unstable-2023-11-15"; |
pkgs/by-name/me/memento/package.nix
Outdated
| meta = with lib; { | ||
| description = "A library for Manga OCR"; | ||
| homepage = "https://github.com/ripose-jp/libmocr"; | ||
| license = licenses.gpl2; | ||
| platforms = platforms.linux; | ||
| }; |
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.
| meta = with lib; { | |
| description = "A library for Manga OCR"; | |
| homepage = "https://github.com/ripose-jp/libmocr"; | |
| license = licenses.gpl2; | |
| platforms = platforms.linux; | |
| }; | |
| meta = { | |
| description = "Library for Manga OCR"; | |
| homepage = "https://github.com/ripose-jp/libmocr"; | |
| license = lib.licenses.gpl2; | |
| platforms = lib.platforms.linux; | |
| }; |
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.
done
pkgs/by-name/me/memento/package.nix
Outdated
| in | ||
| '' | ||
| wrapProgram "$out/bin/memento" \ | ||
| --prefix PATH : "${yt-dlp}/bin" ${lib.optionalString withOcr "--suffix PYTHONPATH : \"${pyEnv}/${pyEnv.sitePackages}\""} |
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.
Do we need to use pyEnv.sitePackages instead of python.sitePackages? Would be the first time pyEnv.sitePackages is used in nixpkgs
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.
nope. I found pyEnv made more sense but I changed it to python3.sitePackages as requested.
Added optional support for OCR. Off by default because it doubles closure size plus one needs to download the model imperatively. Some stats: 1.6 weighs: /nix/store/86kmz0zc87hg1v3nwxgf0zd2839d539c-memento-1.6.0 1.3 GiB 1.7 without Ocr : /nix/store/ygd1zr809v5apyjvmydw6nccx1ycc2mh-memento-1.7.0 1.3 GiB 1.7 with ocr: /nix/store/19g1qk5g9kirsqgw1s0nasb676hj8qia-memento-1.7.0 3.3 GiB Amon the novelties, it now builds with system qcoro.
b7b330c to
809daf1
Compare
donovanglover
left a comment
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.
LGTM (not tested)
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.