diff --git a/pkgs/applications/graphics/kcc/default.nix b/pkgs/applications/graphics/kcc/default.nix deleted file mode 100644 index 4806bfefd9a3d..0000000000000 --- a/pkgs/applications/graphics/kcc/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - lib, - python3Packages, - fetchPypi, - libsForQt5, - p7zip, - archiveSupport ? true, -}: - -python3Packages.buildPythonApplication rec { - pname = "kcc"; - version = "5.5.1"; - format = "setuptools"; - - src = fetchPypi { - inherit version; - pname = "KindleComicConverter"; - sha256 = "5dbee5dc5ee06a07316ae5ebaf21ffa1970094dbae5985ad735e2807ef112644"; - }; - - nativeBuildInputs = [ libsForQt5.wrapQtAppsHook ]; - - propagatedBuildInputs = with python3Packages; [ - pillow - pyqt5 - psutil - python-slugify - raven - ]; - - qtWrapperArgs = lib.optionals archiveSupport [ - "--prefix" - "PATH" - ":" - "${lib.makeBinPath [ p7zip ]}" - ]; - - postFixup = '' - wrapProgram $out/bin/kcc "''${qtWrapperArgs[@]}" - ''; - - meta = with lib; { - description = "Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ"; - homepage = "https://github.com/ciromattia/kcc"; - license = licenses.isc; - maintainers = with maintainers; [ dawidsowa ]; - }; -} diff --git a/pkgs/by-name/kc/kcc/package.nix b/pkgs/by-name/kc/kcc/package.nix index 9d3eac75c343d..737357e62116d 100644 --- a/pkgs/by-name/kc/kcc/package.nix +++ b/pkgs/by-name/kc/kcc/package.nix @@ -1,44 +1,58 @@ { - stdenv, lib, - qt6, + python3, fetchFromGitHub, + + qt6, + archiveSupport ? true, p7zip, + versionCheckHook, nix-update-script, - python3, - archiveSupport ? true, }: + python3.pkgs.buildPythonApplication rec { pname = "kcc"; - version = "7.5.1"; - format = "setuptools"; + version = "8.0.4"; + pyproject = true; src = fetchFromGitHub { owner = "ciromattia"; repo = "kcc"; tag = "v${version}"; - hash = "sha256-XB+xss/QiZuo6gWphyjFh9DO74O5tNqfX5LUzsa4gqo="; + hash = "sha256-8rnuSGlfwH5AVp8GQn3RTtiTYFdTNp7Wqq+ATibpkNA="; }; nativeBuildInputs = [ qt6.wrapQtAppsHook ]; - buildInputs = [ qt6.qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ]; - propagatedBuildInputs = with python3.pkgs; [ - packaging + buildInputs = [ qt6.qtbase ]; + + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ + packaging # undeclared dependency + pyside6 pillow psutil python-slugify raven requests - natsort mozjpeg_lossless_optimization + natsort distro - pyside6 numpy ]; - qtWrapperArgs = lib.optionals archiveSupport [ ''--prefix PATH : ${lib.makeBinPath [ p7zip ]}'' ]; + # Note: python scripts wouldn't get wrapped anyway, but let's be explicit about it + dontWrapQtApps = true; + + makeWrapperArgs = + [ + "\${qtWrapperArgs[@]}" + ] + ++ lib.optionals archiveSupport [ + ''--prefix PATH : ${lib.makeBinPath [ p7zip ]}'' + ]; nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgram = "${placeholder "out"}/bin/kcc-c2e";