mangayomi: 0.3.8 -> 0.5.2 (#382094)

This commit is contained in:
Donovan Glover
2025-03-08 01:13:20 +00:00
committed by GitHub
3 changed files with 782 additions and 276 deletions
+40 -25
View File
@@ -1,8 +1,7 @@
{
lib,
fetchFromGitHub,
flutter324,
pkg-config,
flutter327,
webkitgtk_4_1,
mpv,
rustPlatform,
@@ -11,27 +10,42 @@
makeDesktopItem,
replaceVars,
}:
let
pname = "mangayomi";
version = "0.3.8";
version = "0.5.2";
src = fetchFromGitHub {
owner = "kodjodevf";
repo = "mangayomi";
tag = "v${version}";
hash = "sha256-TOCDGmJ5tlpcGS8NeVdIdx946rM1/ItQVY9OnDS6uZ0=";
hash = "sha256-xF3qvmEGctYXE7HWka89G4W6ytMTVGw75o26h/Ql0Aw=";
};
metaCommon = {
changelog = "https://github.com/kodjodevf/mangayomi/releases/tag/v${version}";
description = "Reading manga, novels, and watching animes";
homepage = "https://github.com/kodjodevf/mangayomi";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.linux;
};
rustDep = rustPlatform.buildRustPackage {
inherit pname version src;
sourceRoot = "${src.name}/rust";
useFetchCargoVendor = true;
cargoHash = "sha256-Qzq1FyWtUy1533/S1KS8XEou5nAnq0O0Vxxlt+Iv8OQ=";
cargoHash = "sha256-WkWNgjTA50cOztuF9ZN6v8l38kldarqUOMXNFJDI0Ds=";
passthru.libraryPath = "lib/librust_lib_mangayomi.so";
meta = metaCommon;
};
in
flutter324.buildFlutterApplication {
flutter327.buildFlutterApplication {
inherit pname version src;
pubspecLock = lib.importJSON ./pubspec.lock.json;
@@ -60,18 +74,20 @@ flutter324.buildFlutterApplication {
};
};
gitHashes = {
desktop_webview_window = "sha256-wRxQPlJZZe4t2C6+G5dMx3+w8scxWENLwII08dlZ4IA=";
flutter_qjs = "sha256-m+Z0bCswylfd1E2Y6X6bdPivkSlXUxO4J0Icbco+/0A=";
media_kit_libs_windows_video = "sha256-SYVVOR6vViAsDH5MclInJk8bTt/Um4ccYgYDFrb5LBk=";
media_kit_native_event_loop = "sha256-SYVVOR6vViAsDH5MclInJk8bTt/Um4ccYgYDFrb5LBk=";
media_kit_video = "sha256-SYVVOR6vViAsDH5MclInJk8bTt/Um4ccYgYDFrb5LBk=";
};
gitHashes =
let
media_kit-hash = "sha256-bRwDrK6YdQGuXnxyIaNtvRoubl3i42ksaDsggAwgB80=";
in
{
desktop_webview_window = "sha256-wRxQPlJZZe4t2C6+G5dMx3+w8scxWENLwII08dlZ4IA=";
flutter_qjs = "sha256-m+Z0bCswylfd1E2Y6X6bdPivkSlXUxO4J0Icbco+/0A=";
media_kit_libs_windows_video = media_kit-hash;
media_kit_video = media_kit-hash;
media_kit = media_kit-hash;
flutter_web_auth_2 = "sha256-3aci73SP8eXg6++IQTQoyS+erUUuSiuXymvR32sxHFw=";
};
nativeBuildInputs = [
pkg-config
copyDesktopItems
];
nativeBuildInputs = [ copyDesktopItems ];
buildInputs = [
webkitgtk_4_1
@@ -101,16 +117,15 @@ flutter324.buildFlutterApplication {
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : "$out/app/${pname}/lib"
--prefix LD_LIBRARY_PATH : $out/app/mangayomi/lib
'';
meta = {
changelog = "https://github.com/kodjodevf/mangayomi/releases/tag/v${version}";
description = "Read manga and stream anime from a variety of sources including BitTorrent";
homepage = "https://github.com/kodjodevf/mangayomi";
passthru = {
inherit rustDep;
updateScript = ./update.sh;
};
meta = metaCommon // {
mainProgram = "mangayomi";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.linux;
};
}
File diff suppressed because it is too large Load Diff
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq yq nix bash coreutils nix-update
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/kodjodevf/mangayomi/releases/latest | jq --raw-output .tag_name)
latestVersion=$(echo "$latestTag" | sed 's/^v//')
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; mangayomi.version or (lib.getVersion mangayomi)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
nix-update --subpackage rustDep mangayomi
curl https://raw.githubusercontent.com/kodjodevf/mangayomi/${latestTag}/pubspec.lock | yq . >$ROOT/pubspec.lock.json