From ad7d3ba023289f50ca50c26a63980f947c23fbc8 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Mon, 13 Jan 2025 01:09:32 +0800 Subject: [PATCH] jhentai: add update script --- pkgs/by-name/jh/jhentai/package.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/by-name/jh/jhentai/package.nix b/pkgs/by-name/jh/jhentai/package.nix index d13df30623fda..b9cb64906573d 100644 --- a/pkgs/by-name/jh/jhentai/package.nix +++ b/pkgs/by-name/jh/jhentai/package.nix @@ -4,6 +4,11 @@ fetchFromGitHub, flutter324, webkitgtk_4_1, + runCommand, + yq, + jhentai, + _experimental-update-script-combinators, + gitUpdater, }: flutter324.buildFlutterApplication rec { @@ -61,6 +66,22 @@ flutter324.buildFlutterApplication rec { --prefix LD_LIBRARY_PATH : $out/app/jhentai/lib ''; + passthru = { + pubspecSource = + runCommand "pubspec.lock.json" + { + buildInputs = [ yq ]; + inherit (jhentai) src; + } + '' + cat $src/pubspec.lock | yq > $out + ''; + updateScript = _experimental-update-script-combinators.sequence [ + (gitUpdater { rev-prefix = "v"; }) + (_experimental-update-script-combinators.copyAttrOutputToFile "jhentai.pubspecSource" ./pubspec.lock.json) + ]; + }; + meta = { description = "Cross-platform manga app made for e-hentai & exhentai by Flutter"; homepage = "https://github.com/jiangtian616/JHenTai";