2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, fetchurl
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, mcomix
|
|
|
|
, python3
|
2022-07-14 12:49:19 +00:00
|
|
|
, testers
|
2022-06-16 17:23:12 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# Recommended Dependencies:
|
2022-06-16 17:23:12 +00:00
|
|
|
, p7zip
|
|
|
|
, unrar
|
2024-01-13 08:15:51 +00:00
|
|
|
, chardetSupport ? true
|
|
|
|
, pdfSupport ? true
|
2022-06-16 17:23:12 +00:00
|
|
|
, unrarSupport ? false # unfree software
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "mcomix";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "3.1.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-01-13 08:15:51 +00:00
|
|
|
url = "mirror://sourceforge/mcomix/mcomix-${version}.tar.gz";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-+Shuun/7w86VKBNamTmCPEJfO76fdKY5+HBvzCi0xCc=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
python3.pkgs.setuptools
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pillow
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
]
|
|
|
|
++ lib.optionals chardetSupport [ chardet ]
|
|
|
|
++ lib.optionals pdfSupport [ pymupdf ];
|
|
|
|
|
|
|
|
# No tests included in .tar.gz
|
2022-06-16 17:23:12 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# Prevent double wrapping
|
2022-06-16 17:23:12 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2024-01-13 08:15:51 +00:00
|
|
|
"--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip ] ++ lib.optional unrarSupport unrar)}"
|
2022-06-16 17:23:12 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postInstall = ''
|
|
|
|
cp -a share $out/
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-06-16 17:23:12 +00:00
|
|
|
package = mcomix;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Comic book reader and image viewer";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|