Files
nixpkgs/pkgs/by-name/kc/kcc/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

101 lines
2.0 KiB
Nix

{
lib,
python3,
fetchFromGitHub,
makeDesktopItem,
copyDesktopItems,
qt6,
archiveSupport ? true,
p7zip,
versionCheckHook,
nix-update-script,
}:
python3.pkgs.buildPythonApplication rec {
pname = "kcc";
version = "9.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "ciromattia";
repo = "kcc";
tag = "v${version}";
hash = "sha256-FGRd2JVcz45KVjQCTEKIjKlkLJS/AsSsopeW9tXHWwk=";
};
nativeBuildInputs = [
qt6.wrapQtAppsHook
copyDesktopItems
];
buildInputs = [
qt6.qtbase
qt6.qtwayland
];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
packaging # undeclared dependency
pymupdf
pyside6
pillow
psutil
python-slugify
raven
requests
mozjpeg_lossless_optimization
natsort
distro
numpy
];
# 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";
postInstall = ''
install -Dm644 \
icons/comic2ebook.png \
"$out/share/icons/hicolor/256x256/apps/kcc.png"
'';
passthru = {
updateScript = nix-update-script { };
};
desktopItems = [
(makeDesktopItem {
name = "kcc";
exec = "kcc";
icon = "kcc";
desktopName = "Kindle Comic Converter";
comment = "A comic and manga converter for ebook readers";
categories = [ "Graphics" ];
})
];
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
];
};
}