Files
nixpkgs/pkgs/by-name/mc/mcomix/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

85 lines
1.8 KiB
Nix

{
lib,
fetchurl,
gdk-pixbuf,
gobject-introspection,
gtk3,
mcomix,
python312, # TODO: Revert to python3 when upgrading past 3.1.0
testers,
wrapGAppsHook3,
# Recommended Dependencies:
p7zip,
unrar,
chardetSupport ? true,
pdfSupport ? true,
unrarSupport ? false, # unfree software
}:
python312.pkgs.buildPythonApplication rec {
pname = "mcomix";
version = "3.1.0";
pyproject = true;
src = fetchurl {
url = "mirror://sourceforge/mcomix/mcomix-${version}.tar.gz";
hash = "sha256-+Shuun/7w86VKBNamTmCPEJfO76fdKY5+HBvzCi0xCc=";
};
buildInputs = [
gtk3
gdk-pixbuf
];
nativeBuildInputs = [
gobject-introspection
python312.pkgs.setuptools
wrapGAppsHook3
];
propagatedBuildInputs =
with python312.pkgs;
[
pillow
pycairo
pygobject3
]
++ lib.optionals chardetSupport [ chardet ]
++ lib.optionals pdfSupport [ pymupdf ];
# No tests included in .tar.gz
doCheck = false;
# Prevent double wrapping
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
"--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip ] ++ lib.optional unrarSupport unrar)}"
)
'';
postInstall = ''
cp -a share $out/
'';
passthru.tests.version = testers.testVersion {
package = mcomix;
};
meta = with lib; {
description = "Comic book reader and image viewer";
mainProgram = "mcomix";
longDescription = ''
User-friendly, customizable image viewer, specifically designed to handle
comic books and manga supporting a variety of container formats
(including CBR, CBZ, CB7, CBT, LHA and PDF)
'';
homepage = "https://sourceforge.net/projects/mcomix/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ thiagokokada ];
};
}