From 465159200bad5e25424801015f54e9c0ac7898f1 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:20:14 +0100 Subject: [PATCH] add some stuff --- modules/graphical/shared.nix | 1 + modules/services/kavita.nix | 6 ++++++ overlays.nix | 8 +++++++- pkgs/patches/mangal.diff | 13 +++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pkgs/patches/mangal.diff diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index f846b58..40f5069 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -87,6 +87,7 @@ in { logseq # notes xarchiver # archive tool ani-cli + mangal ]; }; } diff --git a/modules/services/kavita.nix b/modules/services/kavita.nix index 31e5a67..808dfc1 100644 --- a/modules/services/kavita.nix +++ b/modules/services/kavita.nix @@ -95,6 +95,12 @@ in { ${mangal} inline -S Mangapill --query "revenge_of_the_iron_blooded" --manga first --download ${mangal} inline -S Mangapill --query "northern_blade" --manga first --download ${mangal} inline -S Mangapill --query "Dungeon_reset" --manga first --download + ${mangal} inline -S Mangapill --query "iruma-kun" --manga first --download + ${mangal} inline -S Manganato --query "grand_blue" --manga first --download + ${mangal} inline -S Manganato --query "sss-class_suicide" --manga first --download + ${mangal} inline -S Manganato --query "cultivation_chat" --manga first --download + ${mangal} inline -S Manganato --query "gokushufudo" --manga first --download + ${mangal} inline -S Manganato --query "slime" --manga first --download ''; serviceConfig = { PrivateTmp = true; diff --git a/overlays.nix b/overlays.nix index 6a0f08b..4ffc8aa 100644 --- a/overlays.nix +++ b/overlays.nix @@ -1,5 +1,10 @@ # This file defines overlays -{ inputs, ... }: { +{ inputs, ... }: +let + addPatches = pkg: patches: + pkg.overrideAttrs + (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ patches; }); +in { # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ./pkgs { pkgs = final; }; @@ -39,6 +44,7 @@ # example = prev.example.overrideAttrs (oldAttrs: rec { # ... # }); + mangal = addPatches prev.mangal [ ./pkgs/patches/mangal.diff ]; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will diff --git a/pkgs/patches/mangal.diff b/pkgs/patches/mangal.diff new file mode 100644 index 0000000..80f006f --- /dev/null +++ b/pkgs/patches/mangal.diff @@ -0,0 +1,13 @@ +diff --git a/provider/manganato/manganato.go b/provider/manganato/manganato.go +index e7d0c62..7af6542 100644 +--- a/provider/manganato/manganato.go ++++ b/provider/manganato/manganato.go +@@ -20,7 +20,7 @@ var Config = &generic.Configuration{ + query = strings.TrimSpace(query) + query = strings.ToLower(query) + query = url.QueryEscape(query) +- template := "https://chapmanganato.com/https://manganato.com/search/story/%s" ++ template := "https://manganato.com/search/story/%s" + return fmt.Sprintf(template, query) + }, + MangaExtractor: &generic.Extractor{