Merge pull request #176424 from thiagokokada/mcomix-init

mcomix: init at 2.0.2; mcomix3: remove and alias it to mcomix

authored by Anderson Torres and committed by GitHub 49c4223e cc41e5a6

+66 -106
+64
pkgs/applications/graphics/mcomix/default.nix
···
··· 1 + { lib 2 + , fetchurl 3 + , gdk-pixbuf 4 + , gobject-introspection 5 + , gtk3 6 + , mcomix 7 + , python3 8 + , testVersion 9 + , wrapGAppsHook 10 + 11 + # Recommended Dependencies: 12 + , lhasa 13 + , mupdf 14 + , p7zip 15 + , unrar 16 + , unrarSupport ? false # unfree software 17 + }: 18 + 19 + python3.pkgs.buildPythonApplication rec { 20 + pname = "mcomix"; 21 + version = "2.0.2"; 22 + 23 + src = fetchurl { 24 + url = "mirror://sourceforge/mcomix/${pname}-${version}.tar.gz"; 25 + sha256 = "sha256-7zjQcT5WoHxy+YzCDJ6s2ngOOfO4L9exuqBqacecClg="; 26 + }; 27 + 28 + buildInputs = [ gobject-introspection gtk3 gdk-pixbuf ]; 29 + nativeBuildInputs = [ wrapGAppsHook ]; 30 + propagatedBuildInputs = (with python3.pkgs; [ pillow pygobject3 pycairo ]); 31 + 32 + # Tests are broken 33 + doCheck = false; 34 + 35 + # Correct wrapper behavior, see https://github.com/NixOS/nixpkgs/issues/56943 36 + # until https://github.com/NixOS/nixpkgs/pull/102613 37 + strictDeps = false; 38 + 39 + # prevent double wrapping 40 + dontWrapGApps = true; 41 + 42 + preFixup = '' 43 + makeWrapperArgs+=( 44 + "''${gappsWrapperArgs[@]}" 45 + "--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip lhasa mupdf ] ++ lib.optional (unrarSupport) unrar)}" 46 + ) 47 + ''; 48 + 49 + passthru.tests.version = testVersion { 50 + package = mcomix; 51 + }; 52 + 53 + meta = with lib; { 54 + description = "Comic book reader and image viewer"; 55 + longDescription = '' 56 + User-friendly, customizable image viewer, specifically designed to handle 57 + comic books and manga supporting a variety of container formats 58 + (including CBR, CBZ, CB7, CBT, LHA and PDF) 59 + ''; 60 + homepage = "https://sourceforge.net/projects/mcomix/"; 61 + license = licenses.gpl2Plus; 62 + maintainers = with maintainers; [ thiagokokada ]; 63 + }; 64 + }
-105
pkgs/applications/graphics/mcomix3/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , wrapGAppsHook 4 - , installShellFiles 5 - , python3 6 - , gobject-introspection 7 - , gtk3 8 - , gdk-pixbuf 9 - 10 - # Recommended Dependencies: 11 - , unrarSupport ? false # unfree software 12 - , unrar 13 - , p7zip 14 - , lhasa 15 - , mupdf 16 - }: 17 - 18 - python3.pkgs.buildPythonApplication rec { 19 - pname = "mcomix3"; 20 - version = "unstable-2021-04-23"; 21 - 22 - # no official release on pypi/github and no build system 23 - src = fetchFromGitHub { 24 - repo = "${pname}"; 25 - owner = "multiSnow"; 26 - rev = "139344e23898c28484328fc29fd0c6659affb12d"; 27 - sha256 = "0q9xgl60ryf7qmy5vgzgfry4rvw5j9rb4d1ilxmpjmvm7dd3fm2k"; 28 - }; 29 - 30 - buildInputs = [ gobject-introspection gtk3 gdk-pixbuf ]; 31 - nativeBuildInputs = [ wrapGAppsHook installShellFiles ]; 32 - propagatedBuildInputs = (with python3.pkgs; [ pillow pygobject3 pycairo ]); 33 - 34 - format = "other"; 35 - 36 - # Correct wrapper behavior, see https://github.com/NixOS/nixpkgs/issues/56943 37 - # until https://github.com/NixOS/nixpkgs/pull/102613 38 - strictDeps = false; 39 - 40 - preInstall = '' 41 - libdir=$out/lib/${python3.libPrefix}/site-packages 42 - mkdir -p $out/share/{icons/hicolor,man/man1,applications,metainfo,thumbnailers} 43 - mkdir -p $out/bin $libdir 44 - ''; 45 - 46 - installPhase = '' 47 - runHook preInstall 48 - 49 - substituteInPlace mime/*.desktop \ 50 - --replace "Exec=mcomix" "Exec=mcomix3" \ 51 - --replace "Icon=mcomix" "Icon=${pname}" 52 - ${python3.executable} installer.py --srcdir=mcomix --target=$libdir 53 - mv $libdir/mcomix/mcomixstarter.py $out/bin/${pname} 54 - mv $libdir/mcomix/comicthumb.py $out/bin/comicthumb 55 - mv $libdir/mcomix/mcomix/* $libdir/mcomix 56 - 57 - runHook postInstall 58 - ''; 59 - 60 - postInstall = '' 61 - rmdir $libdir/mcomix/mcomix 62 - mv man/mcomix.1 man/${pname}.1 63 - installManPage man/* 64 - cp -r mime/icons/* $out/share/icons/hicolor/ 65 - cp mime/*.desktop $out/share/applications/ 66 - cp mime/*.appdata.xml $out/share/metainfo/ 67 - cp mime/*.thumbnailer $out/share/thumbnailers/ 68 - for folder in $out/share/icons/hicolor/*; do 69 - mkdir $folder/{apps,mimetypes} 70 - mv $folder/*.png $folder/mimetypes 71 - cp $libdir/mcomix/images/$(basename $folder)/mcomix.png $folder/apps/${pname}.png 72 - cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbr.png 73 - cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbz.png 74 - done 75 - ''; 76 - 77 - # prevent double wrapping 78 - dontWrapGApps = true; 79 - preFixup = '' 80 - makeWrapperArgs+=( 81 - "''${gappsWrapperArgs[@]}" 82 - "--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip lhasa mupdf ] ++ lib.optional (unrarSupport) unrar)}" 83 - ) 84 - ''; 85 - 86 - # real pytests broken upstream 87 - checkPhase = '' 88 - $out/bin/comicthumb --help > /dev/null 89 - $out/bin/${pname} --help > /dev/null 90 - ''; 91 - 92 - meta = with lib; { 93 - description = "Comic book reader and image viewer; python3 fork of mcomix"; 94 - longDescription = '' 95 - User-friendly, customizable image viewer, specifically designed to handle 96 - comic books and manga supporting a variety of container formats 97 - (including CBR, CBZ, CB7, CBT, LHA and PDF) 98 - ''; 99 - homepage = "https://github.com/multiSnow/mcomix3"; 100 - changelog = "https://github.com/multiSnow/mcomix3/blob/gtk3/ChangeLog"; 101 - license = licenses.gpl2Plus; 102 - maintainers = with maintainers; [ confus ]; 103 - platforms = platforms.all; 104 - }; 105 - }
···
+1
pkgs/top-level/aliases.nix
··· 833 matrique = spectral; # Added 2020-01-27 834 maui-nota = libsForQt5.mauiPackages.nota; # added 2022-05-17 835 mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # Added 2020-05-23 836 mediatomb = throw "mediatomb is no longer maintained upstream, use gerbera instead"; # added 2022-01-04 837 meme = meme-image-generator; # Added 2021-04-21 838 memtest86 = throw "'memtest86' has been renamed to/replaced by 'memtest86plus'"; # Converted to throw 2022-02-22
··· 833 matrique = spectral; # Added 2020-01-27 834 maui-nota = libsForQt5.mauiPackages.nota; # added 2022-05-17 835 mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # Added 2020-05-23 836 + mcomix3 = mcomix; # Added 2022-06-05 837 mediatomb = throw "mediatomb is no longer maintained upstream, use gerbera instead"; # added 2022-01-04 838 meme = meme-image-generator; # Added 2021-04-21 839 memtest86 = throw "'memtest86' has been renamed to/replaced by 'memtest86plus'"; # Converted to throw 2022-02-22
+1 -1
pkgs/top-level/all-packages.nix
··· 28037 28038 mbrola = callPackage ../applications/audio/mbrola { }; 28039 28040 - mcomix3 = callPackage ../applications/graphics/mcomix3 {}; 28041 28042 mcpp = callPackage ../development/compilers/mcpp { }; 28043
··· 28037 28038 mbrola = callPackage ../applications/audio/mbrola { }; 28039 28040 + mcomix = callPackage ../applications/graphics/mcomix { }; 28041 28042 mcpp = callPackage ../development/compilers/mcpp { }; 28043