From f139c0cbbab6f552e91b66685d11d238d51201da Mon Sep 17 00:00:00 2001 From: emaryn <197520219+emaryn@users.noreply.github.com> Date: Tue, 25 Feb 2025 20:40:35 +0000 Subject: [PATCH 1/3] kazumi: fix broken symlink --- pkgs/by-name/ka/kazumi/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/ka/kazumi/package.nix b/pkgs/by-name/ka/kazumi/package.nix index dea6fd9658b6..78f27e9730dc 100644 --- a/pkgs/by-name/ka/kazumi/package.nix +++ b/pkgs/by-name/ka/kazumi/package.nix @@ -103,6 +103,7 @@ flutter327.buildFlutterApplication rec { }; postInstall = '' + ln -snf ${mpv}/lib/libmpv.so.2 $out/app/kazumi/lib/libmpv.so.2 install -Dm0644 ./assets/linux/io.github.Predidit.Kazumi.desktop $out/share/applications/io.github.Predidit.Kazumi.desktop install -Dm0644 ./assets/images/logo/logo_linux.png $out/share/icons/hicolor/512x512/apps/io.github.Predidit.Kazumi.png ''; From 61689a5e41caf6f086f60d07e646b9b0528de775 Mon Sep 17 00:00:00 2001 From: emaryn <197520219+emaryn@users.noreply.github.com> Date: Tue, 25 Feb 2025 20:41:59 +0000 Subject: [PATCH 2/3] kazumi: update updateScript --- pkgs/by-name/ka/kazumi/package.nix | 30 ++++++++++++++++++++++++------ pkgs/by-name/ka/kazumi/update.sh | 19 ------------------- 2 files changed, 24 insertions(+), 25 deletions(-) delete mode 100755 pkgs/by-name/ka/kazumi/update.sh diff --git a/pkgs/by-name/ka/kazumi/package.nix b/pkgs/by-name/ka/kazumi/package.nix index 78f27e9730dc..edff401d69fe 100644 --- a/pkgs/by-name/ka/kazumi/package.nix +++ b/pkgs/by-name/ka/kazumi/package.nix @@ -11,7 +11,13 @@ mimalloc, mpv, mpv-unwrapped, + runCommand, + yq, + kazumi, + _experimental-update-script-combinators, + gitUpdater, }: + flutter327.buildFlutterApplication rec { pname = "kazumi"; version = "1.5.4"; @@ -25,9 +31,7 @@ flutter327.buildFlutterApplication rec { pubspecLock = lib.importJSON ./pubspec.lock.json; - nativeBuildInputs = [ - autoPatchelfHook - ]; + nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ webkitgtk_4_1 @@ -104,11 +108,25 @@ flutter327.buildFlutterApplication rec { postInstall = '' ln -snf ${mpv}/lib/libmpv.so.2 $out/app/kazumi/lib/libmpv.so.2 - install -Dm0644 ./assets/linux/io.github.Predidit.Kazumi.desktop $out/share/applications/io.github.Predidit.Kazumi.desktop - install -Dm0644 ./assets/images/logo/logo_linux.png $out/share/icons/hicolor/512x512/apps/io.github.Predidit.Kazumi.png + install -Dm0644 assets/linux/io.github.Predidit.Kazumi.desktop $out/share/applications/io.github.Predidit.Kazumi.desktop + install -Dm0644 assets/images/logo/logo_linux.png $out/share/icons/hicolor/512x512/apps/io.github.Predidit.Kazumi.png ''; - passthru.updateScript = ./update.sh; + passthru = { + pubspecSource = + runCommand "pubspec.lock.json" + { + nativeBuildInputs = [ yq ]; + inherit (kazumi) src; + } + '' + cat $src/pubspec.lock | yq > $out + ''; + updateScript = _experimental-update-script-combinators.sequence [ + (gitUpdater { }) + (_experimental-update-script-combinators.copyAttrOutputToFile "kazumi.pubspecSource" ./pubspec.lock.json) + ]; + }; meta = { description = "Watch Animes online with danmaku support"; diff --git a/pkgs/by-name/ka/kazumi/update.sh b/pkgs/by-name/ka/kazumi/update.sh deleted file mode 100755 index a63eea668a66..000000000000 --- a/pkgs/by-name/ka/kazumi/update.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=./. -i bash -p curl jq yq nixVersions.latest bash coreutils nix-update - -set -eou pipefail - -ROOT="$(dirname "$(readlink -f "$0")")" - -latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/Predidit/Kazumi/releases/latest | jq --raw-output .tag_name) - -currentVersion=$(nix-instantiate --eval -E "with import ./. {}; kazumi.version or (lib.getVersion kazumi)" | tr -d '"') - -if [[ "$currentVersion" == "$latestVersion" ]]; then - echo "package is up-to-date: $currentVersion" - exit 0 -fi - -nix-update kazumi - -curl https://raw.githubusercontent.com/Predidit/Kazumi/${latestVersion}/pubspec.lock | yq . >$ROOT/pubspec.lock.json From c5a489962fb4c90711697638729f1a8aa51ee080 Mon Sep 17 00:00:00 2001 From: emaryn <197520219+emaryn@users.noreply.github.com> Date: Tue, 25 Feb 2025 20:42:54 +0000 Subject: [PATCH 3/3] kazumi: 1.5.4 -> 1.5.6 --- pkgs/by-name/ka/kazumi/package.nix | 32 +++++++++++++----------- pkgs/by-name/ka/kazumi/pubspec.lock.json | 32 ++++++++---------------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/pkgs/by-name/ka/kazumi/package.nix b/pkgs/by-name/ka/kazumi/package.nix index edff401d69fe..7f179dd28e39 100644 --- a/pkgs/by-name/ka/kazumi/package.nix +++ b/pkgs/by-name/ka/kazumi/package.nix @@ -20,13 +20,13 @@ flutter327.buildFlutterApplication rec { pname = "kazumi"; - version = "1.5.4"; + version = "1.5.6"; src = fetchFromGitHub { owner = "Predidit"; repo = "Kazumi"; tag = version; - hash = "sha256-OVMJnSaIL0mm+Uf8tnGkbszYcQxf4vl9B+RwQVvzHbA="; + hash = "sha256-UBylNN6UViYuUn70eV0VSsnfN6/kGAFIaa9GU/OV9Zo="; }; pubspecLock = lib.importJSON ./pubspec.lock.json; @@ -93,18 +93,22 @@ flutter327.buildFlutterApplication rec { }; }; - gitHashes = { - desktop_webview_window = "sha256-Z9ehzDKe1W3wGa2AcZoP73hlSwydggO6DaXd9mop+cM="; - webview_windows = "sha256-9oWTvEoFeF7djEVA3PSM72rOmOMUhV8ZYuV6+RreNzE="; - media_kit = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_android_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_ios_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_linux = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_macos_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_libs_windows_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - media_kit_video = "sha256-ciznKvZedg2poq377zkyjwyeGRxq0N7b/Rh4upCoths="; - }; + gitHashes = + let + media_kit-hash = "sha256-6V4ZTRsExm8TidznnvAZRXGbkxTLDs7YFNutNh7tLK8="; + in + { + desktop_webview_window = "sha256-Z9ehzDKe1W3wGa2AcZoP73hlSwydggO6DaXd9mop+cM="; + webview_windows = "sha256-9oWTvEoFeF7djEVA3PSM72rOmOMUhV8ZYuV6+RreNzE="; + media_kit = media_kit-hash; + media_kit_libs_android_video = media_kit-hash; + media_kit_libs_ios_video = media_kit-hash; + media_kit_libs_linux = media_kit-hash; + media_kit_libs_macos_video = media_kit-hash; + media_kit_libs_video = media_kit-hash; + media_kit_libs_windows_video = media_kit-hash; + media_kit_video = media_kit-hash; + }; postInstall = '' ln -snf ${mpv}/lib/libmpv.so.2 $out/app/kazumi/lib/libmpv.so.2 diff --git a/pkgs/by-name/ka/kazumi/pubspec.lock.json b/pkgs/by-name/ka/kazumi/pubspec.lock.json index 92f08ffb0c3c..4b80849aa863 100644 --- a/pkgs/by-name/ka/kazumi/pubspec.lock.json +++ b/pkgs/by-name/ka/kazumi/pubspec.lock.json @@ -36,6 +36,16 @@ "source": "hosted", "version": "2.0.3" }, + "antlr4": { + "dependency": "direct main", + "description": { + "name": "antlr4", + "sha256": "752b4a6e4ad97953652a2b2bbf5377f46c94b579d3372b50080c7e5858234a05", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.13.2" + }, "archive": { "dependency": "transitive", "description": { @@ -1565,16 +1575,6 @@ "source": "hosted", "version": "1.3.0" }, - "styled_text": { - "dependency": "direct main", - "description": { - "name": "styled_text", - "sha256": "fd624172cf629751b4f171dd0ecf9acf02a06df3f8a81bb56c0caa4f1df706c3", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "8.1.0" - }, "synchronized": { "dependency": "transitive", "description": { @@ -1956,16 +1956,6 @@ "source": "hosted", "version": "6.5.0" }, - "xmlstream": { - "dependency": "transitive", - "description": { - "name": "xmlstream", - "sha256": "cfc14e3f256997897df9481ae630d94c2d85ada5187ebeb868bb1aabc2c977b4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.1.1" - }, "xpath_selector": { "dependency": "direct main", "description": { @@ -1999,6 +1989,6 @@ }, "sdks": { "dart": ">=3.5.0 <4.0.0", - "flutter": ">=3.27.3" + "flutter": ">=3.27.4" } }