Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions pkgs/by-name/kc/kcc/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
stdenv,
lib,
qt6,
fetchFromGitHub,
p7zip,
versionCheckHook,
nix-update-script,
python3,
archiveSupport ? true,
}:
python3.pkgs.buildPythonApplication rec {
pname = "kcc";
version = "7.3.3";

src = fetchFromGitHub {
owner = "ciromattia";
repo = "kcc";
tag = "v${version}";
hash = "sha256-6zHUV4s1bOdARsTwNRxFM+s0p+6FLJhqJ9qG5BaBgas=";
};

nativeBuildInputs = [ qt6.wrapQtAppsHook ];

buildInputs = [ qt6.qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt6.qtwayland ];
propagatedBuildInputs = with python3.pkgs; [
packaging
pillow
psutil
python-slugify
raven
requests
natsort
mozjpeg_lossless_optimization
distro
pyside6
numpy
];
Comment thread
adfaure marked this conversation as resolved.
Outdated

qtWrapperArgs = lib.optionals archiveSupport [ ''--prefix PATH : ${lib.makeBinPath [ p7zip ]}'' ];

nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/kcc-c2e";

Comment thread
FliegendeWurst marked this conversation as resolved.
Outdated
Comment thread
FliegendeWurst marked this conversation as resolved.
passthru = {
updateScript = nix-update-script { };
};

meta = {
description = "Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ";
homepage = "https://kcc.iosphe.re";
mainProgram = "kcc";
changelog = "https://github.com/ciromattia/kcc/releases/tag/v${version}";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [
dawidsowa
adfaure
];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
python3Packages,
fetchFromGitHub,
buildPythonPackage,
mozjpeg,
pytestCheckHook,
setuptools,
cmake,
nix-update-script,
cffi,
}:
buildPythonPackage rec {
pname = "mozjpeg_lossless_optimization";
version = "1.1.3";
Comment thread
FliegendeWurst marked this conversation as resolved.
pyproject = true;

src = fetchFromGitHub {
owner = "wanadev";
repo = "mozjpeg-lossless-optimization";
# https://github.com/NixOS/nixpkgs/issues/26302
rev = "refs/tags/v${version}";
hash = "sha256-OKNt9XtfZ6hhRJN1Asn1T2dVjyXKQAsnFvXKYnrRZ98=";
fetchSubmodules = true;
};

# This package needs cmake, but it is not the default builder
dontUseCmakeConfigure = true;

Comment thread
FliegendeWurst marked this conversation as resolved.
buildInputs = [ mozjpeg ];
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ cffi ];

Comment thread
FliegendeWurst marked this conversation as resolved.
# https://github.com/NixOS/nixpkgs/issues/255262
preCheck = ''
rm -r mozjpeg_lossless_optimization
'';

build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];

Comment thread
FliegendeWurst marked this conversation as resolved.
Outdated
passthru = {
updateScript = nix-update-script { };
};

meta = {
description = "Python library to optimize JPEGs losslessly using MozJPEG";
homepage = "https://github.com/wanadev/mozjpeg-lossless-optimization";
Comment thread
adfaure marked this conversation as resolved.
Outdated
changelog = "https://github.com/wanadev/mozjpeg-lossless-optimization/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.adfaure ];
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7420,8 +7420,6 @@ with pkgs;

jenkins-job-builder = with python3Packages; toPythonApplication jenkins-job-builder;

kcc = callPackage ../applications/graphics/kcc { };

kustomize = callPackage ../development/tools/kustomize { };

kustomize_3 = callPackage ../development/tools/kustomize/3.nix { };
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9154,6 +9154,10 @@ self: super: with self; {

mozilla-django-oidc = callPackage ../development/python-modules/mozilla-django-oidc { };

mozjpeg_lossless_optimization =
callPackage ../development/python-modules/mozjpeg_lossless_optimization
{ };

mpd2 = callPackage ../development/python-modules/mpd2 { };

mpegdash = callPackage ../development/python-modules/mpegdash { };
Expand Down