Kindle Comic Converter (kcc) : 5.5.1 -> 7.3.3#323382
Conversation
There was a problem hiding this comment.
Thanks for updating kcc. See below for some suggestions to improve the package definition.
diff --git a/pkgs/applications/graphics/kcc/default.nix b/pkgs/applications/graphics/kcc/default.nix
index abbb9a5500c3..2103a2a1e146 100644
--- a/pkgs/applications/graphics/kcc/default.nix
+++ b/pkgs/applications/graphics/kcc/default.nix
@@ -1,33 +1,31 @@
{ lib
-, mkDerivationWith
-, python3
+, stdenv
, python3Packages
-, fetchPypi
, fetchFromGitHub
, p7zip
, archiveSupport ? true
-, cmake
, mozjpeg
+, qt6
}:
-mkDerivationWith python3Packages.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
pname = "kcc";
- version = "6.1.0";
+ version = "6.2.0";
src = fetchFromGitHub {
owner = "ciromattia";
repo = "${pname}";
rev = "v${version}";
- hash = "sha256-CU068e7fLPn0hW+yfm1qRp8bX8/jvAYz2g715CIHa/Q=";
+ hash = "sha256-61P4rsPRUJVrqv0xegxohRu7Yr8goSk7ElFV37GAYe8=";
};
nativeBuildInputs = with python3Packages; [
- pip
+ qt6.wrapQtAppsHook
];
- propagatedBuildInputs = with python3Packages ; [
- p7zip
+ buildInputs = lib.optional stdenv.hostPlatform.isLinux qt6.qtwayland;
+
+ propagatedBuildInputs = with python3Packages; [
pillow
- pyqt5
psutil
python-slugify
raven
@@ -36,12 +34,11 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
mozjpeg_lossless_optimization
distro
pyside6
+ packaging
];
- qtWrapperArgs = lib.optionals archiveSupport [ "--prefix" "PATH" ":" "${ lib.makeBinPath [ p7zip ] }" ];
-
- postFixup = ''
- wrapProgram $out/bin/kcc "''${qtWrapperArgs[@]}"
+ preFixup = lib.optionalString archiveSupport ''
+ qtWrapperArgs+=(--prefix PATH : "${ lib.makeBinPath [ p7zip ] }")
'';
meta = with lib; {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 181ac0979518..5af125c3d7a5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17804,7 +17804,7 @@ with pkgs;
kcat = callPackage ../development/tools/kcat { };
- kcc = libsForQt5.callPackage ../applications/graphics/kcc { };
+ kcc = callPackage ../applications/graphics/kcc { };
kcgi = callPackage ../development/web/kcgi { };
There was a problem hiding this comment.
| version = "6.1.0"; | |
| version = "6.2.0"; |
10e2167 to
d37a166
Compare
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
|
Also please squash your commits where it makes sense to do so. |
Thx for the review, squashed. |
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Show resolved
Hide resolved
503c3a3 to
203553a
Compare
jwillikers
left a comment
There was a problem hiding this comment.
Thanks for working on this! I just wanted to play around with kcc and saw it was in sore need of an update. Much appreciated!
I don't think anything in my review is a blocker, just some improvements.
It would be nice to add auto-update passthru sections for both packages and a passthru version test for kcc, which would look like this for kcc.
passthru = {
tests.version = testers.testVersion {
package = kcc;
};
updateScript = nix-update-script { };
};
| meta = with lib; { | ||
| description = "Python library to optimize JPEGs losslessly using MozJPEG"; | ||
| homepage = "https://github.com/wanadev/mozjpeg-lossless-optimization"; | ||
| license = licenses.bsd3; | ||
| maintainers = with maintainers; [ adfaure ]; | ||
| }; |
There was a problem hiding this comment.
You can remove with lib here. Not a blocker. See #208242.
| meta = with lib; { | |
| description = "Python library to optimize JPEGs losslessly using MozJPEG"; | |
| homepage = "https://github.com/wanadev/mozjpeg-lossless-optimization"; | |
| license = licenses.bsd3; | |
| maintainers = with maintainers; [ adfaure ]; | |
| }; | |
| meta = { | |
| description = "Python library to optimize JPEGs losslessly using MozJPEG"; | |
| homepage = "https://github.com/wanadev/mozjpeg-lossless-optimization"; | |
| license = lib.licenses.bsd3; | |
| maintainers = with lib.maintainers; [ adfaure ]; | |
| }; |
| }; | ||
|
|
||
| propagatedBuildInputs = with python3Packages ; [ | ||
| nativeBuildInputs = [ qt6.wrapQtAppsHook ]; |
There was a problem hiding this comment.
I think you can update the call to libsForQt5.callPackage to just be callPAckage for kcc in all-packages.nix now that you've added this.
You could just drop that line in all-packages.nix and move the package to pkgs/by-name/kc/kcc/package.nix, which is something that should probably be done eventually anyways.
| }: | ||
|
|
||
| mkDerivationWith python3Packages.buildPythonApplication rec { | ||
| { stdenv, lib, qt6, python3Packages, fetchFromGitHub, p7zip |
There was a problem hiding this comment.
It would be nice to have this file formatted.
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
|
Hi. The current version (5.5.1) doesn't run. 5.5.1 crash log: |
|
The merge conflict needs to be resolved (#395247), and the commits squashed. That's all I think |
|
Hi, I am resolving the conflicts now. But now I have the following error. I am trying to fix it, but we can expect a bit of delay. |
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozjpeg_lossless_optimization/default.nix
Outdated
Show resolved
Hide resolved
4a02104 to
f490aae
Compare
Co-authored-by: Arne Keller <[email protected]>
Co-authored-by: Arne Keller <[email protected]>
|
Hi @FliegendeWurst, I lost track of what the next step is. |
|
I think the PR is in good shape. You can un-draft it, if you believe it is ready. |
|
Yeah it is a bit weird that the button to mark it as ready is somewhere completely different than the 'mark draft' button |
|
a bit sad this wont work on wayland but it has been a year, let's keep the contributor sane and merge. |
Indeed, I didn't notice since despite using wayland, kcc runs on my laptop. It is maybe worth opening an issue. And thank you for the merge :) |
|
thanks for your patience and the bump. Thanks to you, I could use my remarkable on an especially long trip. |
Thank you, have a nice trip! Okay, thank you for the tip. I will fix that when I have a bit of time. |
|
I noticed that this PR forgot to remove the old I'll open a PR that removes it. Also, for whatever reason, wrapQtAppsHook doesn't try to wrap executables that are not binaries. nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh Lines 84 to 85 in f6e9250 So by taking out the explicit wrapping logic, (Maybe this is why the wayland problem was showing up) And also because of this I'll open a version bump PR in which I'll try to fix these things. |
|
Opened #426382 |
Description of changes
Update of https://github.com/ciromattia/kcc (changelog is outdated).
This PR also adds this python package: https://github.com/wanadev/mozjpeg-lossless-optimization, which is a dependency for kcc.
I added myself as a maintainer. Since I am already involved in another PR (python3Packages.tree-sitter-grammars: init at 0.22.5 #320783) that add my profile as a contributor, I cherry-picked the commit (maybe it is a bad idea 😅 )
Fixes #219115
Fixes #396679
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.