kazumi: 1.7.4 -> 1.7.6

This commit is contained in:
qzylinra 2025-08-14 18:37:18 +08:00 committed by Masum Reza
parent d0dd9e1c3a
commit 403fb390ad
4 changed files with 338 additions and 125 deletions

View File

@ -0,0 +1,12 @@
{
"desktop_webview_window": "sha256-Z9ehzDKe1W3wGa2AcZoP73hlSwydggO6DaXd9mop+cM=",
"media_kit": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_android_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_ios_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_linux": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_macos_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_libs_windows_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"media_kit_video": "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=",
"webview_windows": "sha256-9oWTvEoFeF7djEVA3PSM72rOmOMUhV8ZYuV6+RreNzE="
}

View File

@ -1,50 +1,38 @@
{
lib,
fetchFromGitHub,
flutter332,
webkitgtk_4_1,
alsa-lib,
libayatana-appindicator,
autoPatchelfHook,
gst_all_1,
stdenv,
flutter332,
fetchFromGitHub,
autoPatchelfHook,
alsa-lib,
gst_all_1,
libayatana-appindicator,
mimalloc,
mpv,
mpv-unwrapped,
runCommand,
yq,
kazumi,
webkitgtk_4_1,
_experimental-update-script-combinators,
gitUpdater,
runCommand,
yq-go,
}:
flutter332.buildFlutterApplication rec {
pname = "kazumi";
version = "1.7.4";
let
version = "1.7.6";
src = fetchFromGitHub {
owner = "Predidit";
repo = "Kazumi";
tag = version;
hash = "sha256-Tzg8vFu2/ZLHQ1Ijp4et+qNPX0ytTZ//zVqQHJ6QBxs=";
hash = "sha256-avZ0IxxJO9e0xWE58QYkTspDqgwu+nCwzzvV+4rCLOk=";
};
in
flutter332.buildFlutterApplication {
pname = "kazumi";
inherit version src;
pubspecLock = lib.importJSON ./pubspec.lock.json;
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
webkitgtk_4_1
alsa-lib
libayatana-appindicator
mpv
gst_all_1.gstreamer
gst_all_1.gst-vaapi
gst_all_1.gst-libav
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
];
gitHashes = lib.importJSON ./gitHashes.json;
customSourceBuilders = {
# unofficial media_kit_libs_linux
@ -63,7 +51,7 @@ flutter332.buildFlutterApplication rec {
installPhase = ''
runHook preInstall
cp -r . $out
cp -r . "$out"
runHook postInstall
'';
@ -79,56 +67,58 @@ flutter332.buildFlutterApplication rec {
postPatch = ''
sed -i '/set(LIBMPV_ZIP_URL/,/if(MEDIA_KIT_LIBS_AVAILABLE)/{//!d; /set(LIBMPV_ZIP_URL/d}' media_kit_video/linux/CMakeLists.txt
sed -i '/if(MEDIA_KIT_LIBS_AVAILABLE)/i set(LIBMPV_HEADER_UNZIP_DIR "${mpv-unwrapped.dev}/include/mpv")' media_kit_video/linux/CMakeLists.txt
sed -i '/if(MEDIA_KIT_LIBS_AVAILABLE)/i set(LIBMPV_PATH "${mpv}/lib")' media_kit_video/linux/CMakeLists.txt
sed -i '/if(MEDIA_KIT_LIBS_AVAILABLE)/i set(LIBMPV_UNZIP_DIR "${mpv}/lib")' media_kit_video/linux/CMakeLists.txt
sed -i '/if(MEDIA_KIT_LIBS_AVAILABLE)/i set(LIBMPV_PATH "${mpv-unwrapped}/lib")' media_kit_video/linux/CMakeLists.txt
sed -i '/if(MEDIA_KIT_LIBS_AVAILABLE)/i set(LIBMPV_UNZIP_DIR "${mpv-unwrapped}/lib")' media_kit_video/linux/CMakeLists.txt
'';
installPhase = ''
runHook preInstall
cp -r . $out
cp -r . "$out"
runHook postInstall
'';
};
};
gitHashes =
let
media_kit-hash = "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=";
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;
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
alsa-lib
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-vaapi
gst_all_1.gstreamer
libayatana-appindicator
mpv-unwrapped
webkitgtk_4_1
];
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
ln -snf ${mpv-unwrapped}/lib/libmpv.so.2 $out/app/$pname/lib/libmpv.so.2
install -Dm 0644 assets/linux/io.github.Predidit.Kazumi.desktop -t $out/share/applications/
install -Dm 0644 assets/images/logo/logo_linux.png $out/share/icons/hicolor/512x512/apps/io.github.Predidit.Kazumi.png
'';
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
nativeBuildInputs = [ yq ];
inherit (kazumi) src;
inherit src;
nativeBuildInputs = [ yq-go ];
}
''
cat $src/pubspec.lock | yq > $out
yq eval --output-format=json --prettyPrint $src/pubspec.lock > "$out"
'';
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { })
(_experimental-update-script-combinators.copyAttrOutputToFile "kazumi.pubspecSource" ./pubspec.lock.json)
{
command = [ ./update-gitHashes.py ];
supportedFeatures = [ "silent" ];
}
];
};
@ -136,8 +126,8 @@ flutter332.buildFlutterApplication rec {
description = "Watch Animes online with danmaku support";
homepage = "https://github.com/Predidit/Kazumi";
mainProgram = "kazumi";
license = with lib.licenses; [ gpl3Plus ];
maintainers = with lib.maintainers; [ ];
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@ -90,11 +90,11 @@
"dependency": "transitive",
"description": {
"name": "auto_injector",
"sha256": "ad7a95d7c381363d48b54e00cb680f024fd97009067244454e9b4850337608e8",
"sha256": "1fc2624898e92485122eb2b1698dd42511d7ff6574f84a3a8606fc4549a1e8f8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
"version": "2.1.1"
},
"boolean_selector": {
"dependency": "transitive",
@ -110,11 +110,11 @@
"dependency": "transitive",
"description": {
"name": "build",
"sha256": "cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0",
"sha256": "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.2"
"version": "2.5.4"
},
"build_config": {
"dependency": "transitive",
@ -140,31 +140,31 @@
"dependency": "transitive",
"description": {
"name": "build_resolvers",
"sha256": "b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0",
"sha256": "ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.4"
"version": "2.5.4"
},
"build_runner": {
"dependency": "direct dev",
"description": {
"name": "build_runner",
"sha256": "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99",
"sha256": "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.15"
"version": "2.5.4"
},
"build_runner_core": {
"dependency": "transitive",
"description": {
"name": "build_runner_core",
"sha256": "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021",
"sha256": "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "8.0.0"
"version": "9.1.2"
},
"built_collection": {
"dependency": "transitive",
@ -180,11 +180,11 @@
"dependency": "transitive",
"description": {
"name": "built_value",
"sha256": "ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4",
"sha256": "0b1b12a0a549605e5f04476031cd0bc91ead1d7c8e830773a18ee54179b3cb62",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "8.9.5"
"version": "8.11.0"
},
"cached_network_image": {
"dependency": "direct main",
@ -250,11 +250,11 @@
"dependency": "transitive",
"description": {
"name": "checked_yaml",
"sha256": "feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff",
"sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.3"
"version": "2.0.4"
},
"cli_util": {
"dependency": "transitive",
@ -411,21 +411,21 @@
"dependency": "direct main",
"description": {
"name": "device_info_plus",
"sha256": "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53",
"sha256": "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "11.4.0"
"version": "11.5.0"
},
"device_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "device_info_plus_platform_interface",
"sha256": "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2",
"sha256": "e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.0.2"
"version": "7.0.3"
},
"dio": {
"dependency": "direct main",
@ -573,15 +573,65 @@
"source": "hosted",
"version": "0.6.0"
},
"flutter_inappwebview_android": {
"dependency": "direct main",
"description": {
"name": "flutter_inappwebview_android",
"sha256": "62557c15a5c2db5d195cb3892aab74fcaec266d7b86d59a6f0027abd672cddba",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.3"
},
"flutter_inappwebview_internal_annotations": {
"dependency": "transitive",
"description": {
"name": "flutter_inappwebview_internal_annotations",
"sha256": "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.0"
},
"flutter_inappwebview_ios": {
"dependency": "direct main",
"description": {
"name": "flutter_inappwebview_ios",
"sha256": "5818cf9b26cf0cbb0f62ff50772217d41ea8d3d9cc00279c45f8aabaa1b4025d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.2"
},
"flutter_inappwebview_macos": {
"dependency": "direct main",
"description": {
"name": "flutter_inappwebview_macos",
"sha256": "c1fbb86af1a3738e3541364d7d1866315ffb0468a1a77e34198c9be571287da1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.2"
},
"flutter_inappwebview_platform_interface": {
"dependency": "direct main",
"description": {
"name": "flutter_inappwebview_platform_interface",
"sha256": "cf5323e194096b6ede7a1ca808c3e0a078e4b33cc3f6338977d75b4024ba2500",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.0+1"
},
"flutter_launcher_icons": {
"dependency": "direct dev",
"description": {
"name": "flutter_launcher_icons",
"sha256": "bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c",
"sha256": "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.14.3"
"version": "0.14.4"
},
"flutter_lints": {
"dependency": "direct dev",
@ -613,11 +663,11 @@
"dependency": "direct main",
"description": {
"name": "flutter_modular",
"sha256": "bc17a1eb1da676b9111e59d27834fb6673bdea01aead12f0803a0847ff9d451c",
"sha256": "33a63d9fe61429d12b3dfa04795ed890f17d179d3d38e988ba7969651fcd5586",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.3.4"
"version": "6.4.1"
},
"flutter_native_splash": {
"dependency": "direct dev",
@ -653,11 +703,11 @@
"dependency": "direct main",
"description": {
"name": "flutter_svg",
"sha256": "d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1",
"sha256": "cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
"version": "2.2.0"
},
"flutter_test": {
"dependency": "direct dev",
@ -695,11 +745,11 @@
"dependency": "transitive",
"description": {
"name": "get_it",
"sha256": "d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1",
"sha256": "f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.7.0"
"version": "8.0.3"
},
"glob": {
"dependency": "transitive",
@ -885,11 +935,11 @@
"dependency": "direct main",
"description": {
"name": "logger",
"sha256": "be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1",
"sha256": "55d6c23a6c15db14920e037fe7e0dc32e7cdaf3b64b4b25df2d541b5b6b81c0c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.0"
"version": "2.6.1"
},
"logging": {
"dependency": "transitive",
@ -1063,31 +1113,31 @@
"dependency": "direct dev",
"description": {
"name": "mobx_codegen",
"sha256": "990da80722f7d7c0017dec92040b31545d625b15d40204c36a1e63d167c73cdc",
"sha256": "e0abbbc651a69550440f6b65c99ec222a1e2a4afd7baec8ba0f3088c7ca582a8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.7.0"
"version": "2.7.1"
},
"modular_core": {
"dependency": "transitive",
"description": {
"name": "modular_core",
"sha256": "bd60317c81cff3a510aca19d6ddd661c7c79e3cba97b9f39e9ad199156ff255d",
"sha256": "1db0420a0dfb8a2c6dca846e7cbaa4ffeb778e247916dbcb27fb25aa566e5436",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.3.3"
"version": "3.4.1"
},
"msix": {
"dependency": "direct dev",
"description": {
"name": "msix",
"sha256": "edde648a8133bf301883c869d19d127049683037c65ff64173ba526ac7a8af2f",
"sha256": "bbb9b3ff4a9f8e7e7507b2a22dc0517fd1fe3db44e72de7ab052cb6b362406ee",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.16.9"
"version": "3.16.10"
},
"nested": {
"dependency": "transitive",
@ -1119,6 +1169,26 @@
"source": "hosted",
"version": "2.1.0"
},
"open_filex": {
"dependency": "direct main",
"description": {
"name": "open_filex",
"sha256": "9976da61b6a72302cf3b1efbce259200cd40232643a467aac7370addf94d6900",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.7.0"
},
"os_detect": {
"dependency": "transitive",
"description": {
"name": "os_detect",
"sha256": "7d87c0dd98c6faf110d5aa498e9a6df02ffce4bb78cc9cfc8ad02929be9bb71f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.3"
},
"package_config": {
"dependency": "transitive",
"description": {
@ -1273,11 +1343,11 @@
"dependency": "transitive",
"description": {
"name": "posix",
"sha256": "f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62",
"sha256": "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.0.2"
"version": "6.0.3"
},
"provider": {
"dependency": "direct main",
@ -1323,11 +1393,11 @@
"dependency": "transitive",
"description": {
"name": "result_dart",
"sha256": "3c69c864a08df0f413a86be211d07405e9a53cc1ac111e3cc8365845a0fb5288",
"sha256": "0666b21fbdf697b3bdd9986348a380aa204b3ebe7c146d8e4cdaa7ce735e6054",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
"version": "2.1.1"
},
"rxdart": {
"dependency": "transitive",
@ -1363,21 +1433,21 @@
"dependency": "transitive",
"description": {
"name": "screen_brightness_android",
"sha256": "6ba1b5812f66c64e9e4892be2d36ecd34210f4e0da8bdec6a2ea34f1aa42683e",
"sha256": "fb5fa43cb89d0c9b8534556c427db1e97e46594ac5d66ebdcf16063b773d54ed",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
"version": "2.1.2"
},
"screen_brightness_ios": {
"dependency": "transitive",
"description": {
"name": "screen_brightness_ios",
"sha256": "bfd9bfd0ac852e7aa170e7e356cc27195b2a75037b72c8c6336cf6fb2115cffb",
"sha256": "2493953340ecfe8f4f13f61db50ce72533a55b0bbd58ba1402893feecf3727f5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
"version": "2.1.2"
},
"screen_brightness_platform_interface": {
"dependency": "direct main",
@ -1459,6 +1529,76 @@
"source": "hosted",
"version": "1.26.1"
},
"shared_preferences": {
"dependency": "transitive",
"description": {
"name": "shared_preferences",
"sha256": "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.3"
},
"shared_preferences_android": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_android",
"sha256": "5bcf0772a761b04f8c6bf814721713de6f3e5d9d89caf8d3fe031b02a342379e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.11"
},
"shared_preferences_foundation": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_foundation",
"sha256": "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.4"
},
"shared_preferences_linux": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_linux",
"sha256": "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.1"
},
"shared_preferences_platform_interface": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_platform_interface",
"sha256": "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.1"
},
"shared_preferences_web": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_web",
"sha256": "c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.3"
},
"shared_preferences_windows": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_windows",
"sha256": "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.1"
},
"shelf": {
"dependency": "transitive",
"description": {
@ -1493,11 +1633,11 @@
"dependency": "direct main",
"description": {
"name": "skeletonizer",
"sha256": "c34a48b3f7ec460bad2d5623ce5dc227042a6dee639c5e3a8e32ab08188426fe",
"sha256": "eebc03dc86b298e2d7f61e0ebce5713e9dbbc3e786f825909b4591756f196eb6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.0-pre"
"version": "2.1.0+1"
},
"sky_engine": {
"dependency": "transitive",
@ -1569,11 +1709,11 @@
"dependency": "transitive",
"description": {
"name": "sqflite_common",
"sha256": "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b",
"sha256": "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.5"
"version": "2.5.6"
},
"sqflite_darwin": {
"dependency": "transitive",
@ -1639,11 +1779,11 @@
"dependency": "direct main",
"description": {
"name": "synchronized",
"sha256": "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6",
"sha256": "c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.3.1"
"version": "3.4.0"
},
"term_glyph": {
"dependency": "transitive",
@ -1715,6 +1855,16 @@
"source": "hosted",
"version": "1.1.0"
},
"upgrader": {
"dependency": "direct main",
"description": {
"name": "upgrader",
"sha256": "60293b391f4146ce1e381ed6198b6374559a4aadf885d313e94e6c7d454d03ca",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "11.4.0"
},
"uri_parser": {
"dependency": "transitive",
"description": {
@ -1729,11 +1879,11 @@
"dependency": "direct main",
"description": {
"name": "url_launcher",
"sha256": "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603",
"sha256": "f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.3.1"
"version": "6.3.2"
},
"url_launcher_android": {
"dependency": "transitive",
@ -1819,11 +1969,11 @@
"dependency": "transitive",
"description": {
"name": "vector_graphics",
"sha256": "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de",
"sha256": "a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.18"
"version": "1.1.19"
},
"vector_graphics_codec": {
"dependency": "transitive",
@ -1839,11 +1989,11 @@
"dependency": "transitive",
"description": {
"name": "vector_graphics_compiler",
"sha256": "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad",
"sha256": "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.16"
"version": "1.1.17"
},
"vector_math": {
"dependency": "transitive",
@ -1855,6 +2005,16 @@
"source": "hosted",
"version": "2.1.4"
},
"version": {
"dependency": "transitive",
"description": {
"name": "version",
"sha256": "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.2"
},
"vm_service": {
"dependency": "transitive",
"description": {
@ -1899,11 +2059,11 @@
"dependency": "transitive",
"description": {
"name": "watcher",
"sha256": "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104",
"sha256": "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
"version": "1.1.2"
},
"web": {
"dependency": "transitive",
@ -1949,41 +2109,41 @@
"dependency": "direct main",
"description": {
"name": "webview_flutter",
"sha256": "62d763c27ce7f6cef04b3bec01c85a28d60149bffd155884aa4b8fd4941ea2e4",
"sha256": "c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.12.0"
"version": "4.13.0"
},
"webview_flutter_android": {
"dependency": "transitive",
"description": {
"name": "webview_flutter_android",
"sha256": "f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678",
"sha256": "414174cacd339046a1a6dbf93cac62422194c676fed11119ccf228b81640e887",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.7.0"
"version": "4.9.1"
},
"webview_flutter_platform_interface": {
"dependency": "transitive",
"description": {
"name": "webview_flutter_platform_interface",
"sha256": "7cb32b21825bd65569665c32bb00a34ded5779786d6201f5350979d2d529940d",
"sha256": "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.13.0"
"version": "2.14.0"
},
"webview_flutter_wkwebview": {
"dependency": "transitive",
"description": {
"name": "webview_flutter_wkwebview",
"sha256": "a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3",
"sha256": "fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.22.0"
"version": "3.23.0"
},
"webview_windows": {
"dependency": "direct main",
@ -2000,11 +2160,11 @@
"dependency": "transitive",
"description": {
"name": "win32",
"sha256": "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba",
"sha256": "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "5.13.0"
"version": "5.14.0"
},
"win32_registry": {
"dependency": "transitive",
@ -2078,7 +2238,7 @@
}
},
"sdks": {
"dart": ">=3.7.0 <4.0.0",
"flutter": ">=3.32.5"
"dart": ">=3.8.0 <4.0.0",
"flutter": ">=3.32.8"
}
}

View File

@ -0,0 +1,51 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3 nix-prefetch-git
import json
import subprocess
import sys
from pathlib import Path
THIS_FOLDER = Path(__file__).parent.resolve()
PUBSPEC_LOCK = THIS_FOLDER / "pubspec.lock.json"
GIT_HASHES = THIS_FOLDER / "gitHashes.json"
def fetch_git_hash(url: str, rev: str) -> str:
result = subprocess.run(
["nix-prefetch-git", "--url", url, "--rev", rev],
capture_output=True,
text=True,
check=True,
)
return json.loads(result.stdout)["hash"]
def main() -> None:
if not PUBSPEC_LOCK.exists():
sys.exit(1)
try:
data = json.loads(PUBSPEC_LOCK.read_text())
except json.JSONDecodeError:
sys.exit(1)
output: dict[str, str] = {}
for name, info in data.get("packages", {}).items():
if info.get("source") != "git":
continue
desc = info.get("description")
if not isinstance(desc, dict):
continue
url = desc.get("url")
rev = desc.get("resolved-ref")
if not (isinstance(url, str) and isinstance(rev, str)):
continue
try:
package_hash = fetch_git_hash(url, rev)
except subprocess.CalledProcessError:
continue
output[name] = package_hash
GIT_HASHES.write_text(json.dumps(output, indent=2) + "\n")
if __name__ == "__main__":
main()