python312Packages.mandown: refactor

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2025-01-15 09:46:19 +01:00
parent 210b2262a9
commit 479b592b84
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951
2 changed files with 18 additions and 19 deletions

View File

@ -6,9 +6,7 @@
}: }:
let let
mandown' = python3Packages.mandown.overridePythonAttrs (prev: { mandown' = python3Packages.mandown.overridePythonAttrs (prev: {
propagatedBuildInputs = dependencies = prev.dependencies ++ lib.optionals withGUI prev.optional-dependencies.gui;
prev.propagatedBuildInputs
++ lib.optionals withGUI prev.optional-dependencies.gui;
}); });
mandownApp = python3Packages.toPythonApplication mandown'; mandownApp = python3Packages.toPythonApplication mandown';
in in

View File

@ -1,20 +1,20 @@
{ {
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
beautifulsoup4, beautifulsoup4,
buildPythonPackage,
comicon, comicon,
feedparser, feedparser,
fetchFromGitHub,
filetype, filetype,
lib,
lxml, lxml,
natsort, natsort,
nix-update-script, nix-update-script,
pillow, pillow,
poetry-core,
pyside6,
python-slugify, python-slugify,
requests, requests,
typer, typer,
pyside6,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -29,16 +29,11 @@ buildPythonPackage rec {
hash = "sha256-xoRUGtZMM1l3gCtF1wFHBo3vTEGJcNxqkO/yeTuEke8="; hash = "sha256-xoRUGtZMM1l3gCtF1wFHBo3vTEGJcNxqkO/yeTuEke8=";
}; };
nativeBuildInputs = [ build-system = [
poetry-core poetry-core
]; ];
pythonRelaxDeps = [ dependencies = [
"pillow"
"typer"
];
propagatedBuildInputs = [
beautifulsoup4 beautifulsoup4
comicon comicon
feedparser feedparser
@ -51,18 +46,24 @@ buildPythonPackage rec {
typer typer
]; ];
pythonRelaxDeps = [
"pillow"
"typer"
];
optional-dependencies = { optional-dependencies = {
gui = [ pyside6 ]; gui = [ pyside6 ];
updateScript = nix-update-script { };
}; };
pythonImportsCheck = [ "mandown" ]; pythonImportsCheck = [ "mandown" ];
meta = with lib; { passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/potatoeggy/mandown/releases/tag/v${version}"; changelog = "https://github.com/potatoeggy/mandown/releases/tag/v${version}";
description = "Comic/manga/webtoon downloader and CBZ/EPUB/MOBI/PDF converter"; description = "Comic/manga/webtoon downloader and CBZ/EPUB/MOBI/PDF converter";
homepage = "https://github.com/potatoeggy/mandown"; homepage = "https://github.com/potatoeggy/mandown";
license = licenses.agpl3Only; license = lib.licenses.agpl3Only;
maintainers = with maintainers; [ Scrumplex ]; maintainers = with lib.maintainers; [ Scrumplex ];
}; };
} }