forked from mirrors/nixpkgs
mcomix3: manpage location, app icon (#105450)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
f01161226a
commit
5c0b0f33e4
|
@ -1,13 +1,15 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
, installShellFiles
|
||||
, python3
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, gdk-pixbuf
|
||||
|
||||
# Recommended Dependencies:
|
||||
, unrarSupport ? false
|
||||
, unrarSupport ? false # unfree software
|
||||
, unrar
|
||||
, p7zip
|
||||
, lhasa
|
||||
|
@ -18,7 +20,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
pname = "mcomix3";
|
||||
version = "unstable-2020-11-23";
|
||||
|
||||
# fetch from github because no official release on pypi/github and no build system
|
||||
# no official release on pypi/github and no build system
|
||||
src = fetchFromGitHub {
|
||||
repo = "${pname}";
|
||||
owner = "multiSnow";
|
||||
|
@ -27,7 +29,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
};
|
||||
|
||||
buildInputs = [ gobject-introspection gtk3 gdk-pixbuf ];
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
nativeBuildInputs = [ wrapGAppsHook installShellFiles ];
|
||||
propagatedBuildInputs = (with python3.pkgs; [ pillow pygobject3 pycairo ]);
|
||||
|
||||
format = "other";
|
||||
|
@ -55,7 +57,8 @@ python3.pkgs.buildPythonApplication rec {
|
|||
|
||||
postInstall = ''
|
||||
rmdir $libdir/mcomix/mcomix
|
||||
cp man/* $out/share/man/man1/
|
||||
mv man/mcomix.1 man/${pname}.1
|
||||
installManPage man/*
|
||||
cp -r mime/icons/* $out/share/icons/hicolor/
|
||||
cp mime/*.desktop $out/share/applications/
|
||||
cp mime/*.appdata.xml $out/share/metainfo/
|
||||
|
@ -63,12 +66,13 @@ python3.pkgs.buildPythonApplication rec {
|
|||
for folder in $out/share/icons/hicolor/*; do
|
||||
mkdir $folder/{apps,mimetypes}
|
||||
mv $folder/*.png $folder/mimetypes
|
||||
cp $libdir/mcomix/images/$(basename $folder)/mcomix.png $folder/apps/${pname}.png
|
||||
cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbr.png
|
||||
cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbz.png
|
||||
done
|
||||
'';
|
||||
|
||||
# to prevent double wrapping
|
||||
# prevent double wrapping
|
||||
dontWrapGApps = true;
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
|
@ -77,7 +81,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
)
|
||||
'';
|
||||
|
||||
# real pytests seem to be broken upstream
|
||||
# real pytests broken upstream
|
||||
checkPhase = ''
|
||||
$out/bin/comicthumb --help > /dev/null
|
||||
$out/bin/${pname} --help > /dev/null
|
||||
|
|
Loading…
Reference in a new issue