nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 87 lines 1.8 kB view raw
1{ 2 lib, 3 fetchurl, 4 gdk-pixbuf, 5 gobject-introspection, 6 gtk3, 7 mcomix, 8 python3, 9 testers, 10 wrapGAppsHook3, 11 12 # Recommended Dependencies: 13 p7zip, 14 unrar, 15 chardetSupport ? true, 16 pdfSupport ? true, 17 unrarSupport ? false, # unfree software 18}: 19 20python3.pkgs.buildPythonApplication rec { 21 pname = "mcomix"; 22 version = "3.1.1"; 23 pyproject = true; 24 25 src = fetchurl { 26 url = "mirror://sourceforge/mcomix/mcomix-${version}.tar.gz"; 27 hash = "sha256-oQqq7XvAfet0796Tv5qKJ+G8vxgkoFGbJkz+5YK+zvg="; 28 }; 29 30 buildInputs = [ 31 gtk3 32 gdk-pixbuf 33 ]; 34 35 nativeBuildInputs = [ 36 gobject-introspection 37 python3.pkgs.setuptools 38 wrapGAppsHook3 39 ]; 40 41 propagatedBuildInputs = 42 with python3.pkgs; 43 [ 44 pillow 45 pycairo 46 pygobject3 47 ] 48 ++ lib.optionals chardetSupport [ chardet ] 49 ++ lib.optionals pdfSupport [ pymupdf ]; 50 51 # No tests included in .tar.gz 52 doCheck = false; 53 54 # Prevent double wrapping 55 dontWrapGApps = true; 56 57 preFixup = '' 58 makeWrapperArgs+=( 59 "''${gappsWrapperArgs[@]}" 60 "--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip ] ++ lib.optional unrarSupport unrar)}" 61 ) 62 ''; 63 64 postInstall = '' 65 cp -a share $out/ 66 ''; 67 68 passthru.tests.version = testers.testVersion { 69 package = mcomix; 70 }; 71 72 meta = { 73 description = "Comic book reader and image viewer"; 74 mainProgram = "mcomix"; 75 longDescription = '' 76 User-friendly, customizable image viewer, specifically designed to handle 77 comic books and manga supporting a variety of container formats 78 (including CBR, CBZ, CB7, CBT, LHA and PDF) 79 ''; 80 homepage = "https://sourceforge.net/projects/mcomix/"; 81 license = lib.licenses.gpl2Plus; 82 maintainers = with lib.maintainers; [ 83 confus 84 thiagokokada 85 ]; 86 }; 87}