sideswap: init updateScript, 1.8.0 -> 1.8.2 (#430117)

authored by pyrox.dev and committed by GitHub 66e4a3a1 4e11b7fa

+184 -66
+7
pkgs/by-name/si/sideswap/gitHashes.json
···
··· 1 + { 2 + "permission_handler": "sha256-b2igh231BkLe/vkCACVyWg8SxR5V6wjmhPljEs9Ue3o=", 3 + "permission_handler_windows": "sha256-b2igh231BkLe/vkCACVyWg8SxR5V6wjmhPljEs9Ue3o=", 4 + "sideswap_logger": "sha256-cTJfSODRmIJXctLQ++BfvJ6OKflau94AjQdXg7j95B0=", 5 + "sideswap_websocket": "sha256-vsG5eUFu/WJvY3y6jaWD/5GfULwpqh3bO4EZmmBSkbs=", 6 + "window_size": "sha256-+lqY46ZURT0qcqPvHFXUnd83Uvfq79Xr+rw1AHqrpak=" 7 + }
+4 -4
pkgs/by-name/si/sideswap/libsideswap-client.nix
··· 9 10 rustPlatform.buildRustPackage (finalAttrs: { 11 pname = "libsideswap-client"; 12 - version = "0-unstable-2025-06-05"; 13 14 # This version is pinned in https://github.com/sideswap-io/sideswapclient/blob/v1.8.0/deploy/build_linux.sh 15 src = fetchFromGitHub { 16 owner = "sideswap-io"; 17 repo = "sideswap_rust"; 18 - rev = "0ba7485f77c86d1a6ae64a0cfedba22afe4ed98a"; 19 - hash = "sha256-6qfFpCE6DMZlKuhQbXjJmmb8rPxFB2TA7CpOk06tuDk="; 20 }; 21 22 - cargoHash = "sha256-ecftCyNMRWdFP5SDEmLnssTVSfg9mo/TQEqyeDj4VpQ="; 23 24 # sideswap_client uses vergen to detect Git commit hash at build time. It 25 # tries to access .git directory which is not present in Nix build dir.
··· 9 10 rustPlatform.buildRustPackage (finalAttrs: { 11 pname = "libsideswap-client"; 12 + version = "0-unstable-2025-06-24"; 13 14 # This version is pinned in https://github.com/sideswap-io/sideswapclient/blob/v1.8.0/deploy/build_linux.sh 15 src = fetchFromGitHub { 16 owner = "sideswap-io"; 17 repo = "sideswap_rust"; 18 + rev = "91791efbceb3fac4774d1e42a519e70b14b876cf"; 19 + hash = "sha256-SUAmmKnL/thGLfPU22UxzO+LVXgrHh+lZVdXuAJ4q1E="; 20 }; 21 22 + cargoHash = "sha256-bbNFi0cmFFf66IDKi0V8HC/lSU3JLRpgZ+NHeMJog8c="; 23 24 # sideswap_client uses vergen to detect Git commit hash at build time. It 25 # tries to access .git directory which is not present in Nix build dir.
+45 -13
pkgs/by-name/si/sideswap/package.nix
··· 2 lib, 3 fetchFromGitHub, 4 flutter332, 5 - mesa, 6 - libglvnd, 7 callPackage, 8 makeDesktopItem, 9 copyDesktopItems, 10 }: 11 12 let ··· 16 17 flutter332.buildFlutterApplication rec { 18 pname = "sideswap"; 19 - version = "1.8.0"; 20 21 src = fetchFromGitHub { 22 owner = "sideswap-io"; 23 repo = "sideswapclient"; 24 tag = "v${version}"; 25 - hash = "sha256-IUUMlaEIUil07nhjep1I+F1WEWakQZfhy42ZlnyRLcQ="; 26 }; 27 28 pubspecLock = lib.importJSON ./pubspec.lock.json; 29 - 30 - gitHashes = { 31 - sideswap_logger = "sha256-cTJfSODRmIJXctLQ++BfvJ6OKflau94AjQdXg7j95B0="; 32 - sideswap_websocket = "sha256-vsG5eUFu/WJvY3y6jaWD/5GfULwpqh3bO4EZmmBSkbs="; 33 - window_size = "sha256-+lqY46ZURT0qcqPvHFXUnd83Uvfq79Xr+rw1AHqrpak="; 34 - }; 35 36 # Provide OpenGL and libsideswap_client.so for the Flutter application. 37 extraWrapProgramArgs = '' 38 - --set LD_LIBRARY_PATH ${ 39 lib.makeLibraryPath [ 40 - mesa 41 - libglvnd 42 libsideswap-client 43 ] 44 } ··· 71 nativeBuildInputs = [ 72 copyDesktopItems 73 ]; 74 75 meta = { 76 description = "Cross‑platform, non‑custodial wallet and atomic swap marketplace for the Liquid Network";
··· 2 lib, 3 fetchFromGitHub, 4 flutter332, 5 callPackage, 6 makeDesktopItem, 7 copyDesktopItems, 8 + 9 + # Needed for update script. 10 + _experimental-update-script-combinators, 11 + gitUpdater, 12 + runCommand, 13 + sideswap, 14 + yq, 15 }: 16 17 let ··· 21 22 flutter332.buildFlutterApplication rec { 23 pname = "sideswap"; 24 + version = "1.8.2"; 25 26 src = fetchFromGitHub { 27 owner = "sideswap-io"; 28 repo = "sideswapclient"; 29 tag = "v${version}"; 30 + hash = "sha256-+zaQJCMKQZOrZ7i6CzgGTa+rJqpglaufUvYWSWMWTEw="; 31 }; 32 33 pubspecLock = lib.importJSON ./pubspec.lock.json; 34 + gitHashes = lib.importJSON ./gitHashes.json; 35 36 # Provide OpenGL and libsideswap_client.so for the Flutter application. 37 extraWrapProgramArgs = '' 38 + --prefix LD_LIBRARY_PATH : ${ 39 lib.makeLibraryPath [ 40 libsideswap-client 41 ] 42 } ··· 69 nativeBuildInputs = [ 70 copyDesktopItems 71 ]; 72 + 73 + passthru = { 74 + # Expose lib to access it via sideswap.lib from the update script. 75 + lib = libsideswap-client; 76 + 77 + pubspecSource = 78 + runCommand "pubspec.lock.json" 79 + { 80 + nativeBuildInputs = [ yq ]; 81 + inherit (sideswap) src; 82 + } 83 + '' 84 + cat $src/pubspec.lock | yq > $out 85 + ''; 86 + 87 + # Usage: nix-shell maintainers/scripts/update.nix --argstr package sideswap 88 + updateScript = _experimental-update-script-combinators.sequence [ 89 + # Update sideswap to new release. 90 + (gitUpdater { rev-prefix = "v"; }) 91 + 92 + # Update pubspec.lock.json file and related gitHashes attribute. 93 + (_experimental-update-script-combinators.copyAttrOutputToFile "sideswap.pubspecSource" ./pubspec.lock.json) 94 + { 95 + command = [ ./update-gitHashes.py ]; 96 + supportedFeatures = [ "silent" ]; 97 + } 98 + 99 + # Update libsideswap-client sub-package. 100 + { 101 + command = [ ./update-libsideswap-client.sh ]; 102 + supportedFeatures = [ "silent" ]; 103 + } 104 + ]; 105 + }; 106 107 meta = { 108 description = "Cross‑platform, non‑custodial wallet and atomic swap marketplace for the Liquid Network";
+51 -49
pkgs/by-name/si/sideswap/pubspec.lock.json
··· 14 "dependency": "transitive", 15 "description": { 16 "name": "_flutterfire_internals", 17 - "sha256": "214e6f07e2a44f45972e0365c7b537eaeaddb4598db0778dd4ac64b4acd3f5b1", 18 "url": "https://pub.dev" 19 }, 20 "source": "hosted", 21 - "version": "1.3.55" 22 }, 23 "analyzer": { 24 "dependency": "transitive", ··· 154 "dependency": "transitive", 155 "description": { 156 "name": "build", 157 - "sha256": "cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0", 158 "url": "https://pub.dev" 159 }, 160 "source": "hosted", 161 - "version": "2.4.2" 162 }, 163 "build_config": { 164 "dependency": "transitive", ··· 184 "dependency": "transitive", 185 "description": { 186 "name": "build_resolvers", 187 - "sha256": "b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0", 188 "url": "https://pub.dev" 189 }, 190 "source": "hosted", 191 - "version": "2.4.4" 192 }, 193 "build_runner": { 194 "dependency": "direct dev", 195 "description": { 196 "name": "build_runner", 197 - "sha256": "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99", 198 "url": "https://pub.dev" 199 }, 200 "source": "hosted", 201 - "version": "2.4.15" 202 }, 203 "build_runner_core": { 204 "dependency": "transitive", 205 "description": { 206 "name": "build_runner_core", 207 - "sha256": "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021", 208 "url": "https://pub.dev" 209 }, 210 "source": "hosted", 211 - "version": "8.0.0" 212 }, 213 "built_collection": { 214 "dependency": "transitive", ··· 263 "dependency": "transitive", 264 "description": { 265 "name": "checked_yaml", 266 - "sha256": "feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff", 267 "url": "https://pub.dev" 268 }, 269 "source": "hosted", 270 - "version": "2.0.3" 271 }, 272 "ci": { 273 "dependency": "transitive", ··· 433 "dependency": "direct main", 434 "description": { 435 "name": "decimal", 436 - "sha256": "28239b8b929c1bd8618702e6dbc96e2618cf99770bbe9cb040d6cf56a11e4ec3", 437 "url": "https://pub.dev" 438 }, 439 "source": "hosted", 440 - "version": "3.2.1" 441 }, 442 "delayed_display": { 443 "dependency": "direct main", ··· 453 "dependency": "transitive", 454 "description": { 455 "name": "device_info_plus", 456 - "sha256": "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53", 457 "url": "https://pub.dev" 458 }, 459 "source": "hosted", 460 - "version": "11.4.0" 461 }, 462 "device_info_plus_platform_interface": { 463 "dependency": "transitive", 464 "description": { 465 "name": "device_info_plus_platform_interface", 466 - "sha256": "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2", 467 "url": "https://pub.dev" 468 }, 469 "source": "hosted", 470 - "version": "7.0.2" 471 }, 472 "dotted_line": { 473 "dependency": "direct main", ··· 653 "dependency": "transitive", 654 "description": { 655 "name": "firebase_core", 656 - "sha256": "8cfe3c900512399ce8d50fcc817e5758ff8615eeb6fa5c846a4cc47bbf6353b6", 657 "url": "https://pub.dev" 658 }, 659 "source": "hosted", 660 - "version": "3.13.1" 661 }, 662 "firebase_core_platform_interface": { 663 "dependency": "transitive", ··· 683 "dependency": "transitive", 684 "description": { 685 "name": "firebase_messaging", 686 - "sha256": "38111089e511f03daa2c66b4c3614c16421b7d78c84ee04331a0a65b47df4542", 687 "url": "https://pub.dev" 688 }, 689 "source": "hosted", 690 - "version": "15.2.6" 691 }, 692 "firebase_messaging_platform_interface": { 693 "dependency": "transitive", 694 "description": { 695 "name": "firebase_messaging_platform_interface", 696 - "sha256": "ba254769982e5f439e534eed68856181c74e2b3f417c8188afad2bb440807cc7", 697 "url": "https://pub.dev" 698 }, 699 "source": "hosted", 700 - "version": "4.6.6" 701 }, 702 "firebase_messaging_web": { 703 "dependency": "transitive", 704 "description": { 705 "name": "firebase_messaging_web", 706 - "sha256": "dba89137272aac39e95f71408ba25c33fb8ed903cd5fa8d1e49b5cd0d96069e0", 707 "url": "https://pub.dev" 708 }, 709 "source": "hosted", 710 - "version": "3.10.6" 711 }, 712 "fixnum": { 713 "dependency": "direct main", ··· 925 "dependency": "direct main", 926 "description": { 927 "name": "flutter_svg", 928 - "sha256": "d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1", 929 "url": "https://pub.dev" 930 }, 931 "source": "hosted", 932 - "version": "2.1.0" 933 }, 934 "flutter_switch": { 935 "dependency": "direct main", ··· 1397 "dependency": "direct main", 1398 "description": { 1399 "name": "mobile_scanner", 1400 - "sha256": "72f06a071aa8b14acea3ab43ea7949eefe4a2469731ae210e006ba330a033a8c", 1401 "url": "https://pub.dev" 1402 }, 1403 "source": "hosted", 1404 - "version": "7.0.0" 1405 }, 1406 "mocktail": { 1407 "dependency": "direct main", ··· 1526 "permission_handler": { 1527 "dependency": "transitive", 1528 "description": { 1529 - "name": "permission_handler", 1530 - "sha256": "2d070d8684b68efb580a5997eb62f675e8a885ef0be6e754fb9ef489c177470f", 1531 - "url": "https://pub.dev" 1532 }, 1533 - "source": "hosted", 1534 "version": "12.0.0+1" 1535 }, 1536 "permission_handler_android": { ··· 1576 "permission_handler_windows": { 1577 "dependency": "transitive", 1578 "description": { 1579 - "name": "permission_handler_windows", 1580 - "sha256": "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e", 1581 - "url": "https://pub.dev" 1582 }, 1583 - "source": "hosted", 1584 "version": "0.2.1" 1585 }, 1586 "petitparser": { ··· 1991 "relative": true 1992 }, 1993 "source": "path", 1994 - "version": "0.1.22" 1995 }, 1996 "sideswap_notifications_platform_interface": { 1997 "dependency": "direct main", ··· 2000 "relative": true 2001 }, 2002 "source": "path", 2003 - "version": "0.0.25" 2004 }, 2005 "sideswap_permissions": { 2006 "dependency": "direct main", ··· 2009 "relative": true 2010 }, 2011 "source": "path", 2012 - "version": "0.0.18" 2013 }, 2014 "sideswap_protobuf": { 2015 "dependency": "direct main", ··· 2018 "relative": true 2019 }, 2020 "source": "path", 2021 - "version": "0.0.14" 2022 }, 2023 "sideswap_websocket": { 2024 "dependency": "direct main", ··· 2381 "dependency": "transitive", 2382 "description": { 2383 "name": "vector_graphics", 2384 - "sha256": "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de", 2385 "url": "https://pub.dev" 2386 }, 2387 "source": "hosted", 2388 - "version": "1.1.18" 2389 }, 2390 "vector_graphics_codec": { 2391 "dependency": "transitive", ··· 2431 "dependency": "transitive", 2432 "description": { 2433 "name": "watcher", 2434 - "sha256": "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104", 2435 "url": "https://pub.dev" 2436 }, 2437 "source": "hosted", 2438 - "version": "1.1.1" 2439 }, 2440 "web": { 2441 "dependency": "transitive", ··· 2481 "dependency": "transitive", 2482 "description": { 2483 "name": "win32", 2484 - "sha256": "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba", 2485 "url": "https://pub.dev" 2486 }, 2487 "source": "hosted", 2488 - "version": "5.13.0" 2489 }, 2490 "win32_registry": { 2491 "dependency": "transitive", ··· 2561 }, 2562 "sdks": { 2563 "dart": ">=3.8.1 <4.0.0", 2564 - "flutter": ">=3.32.1" 2565 } 2566 }
··· 14 "dependency": "transitive", 15 "description": { 16 "name": "_flutterfire_internals", 17 + "sha256": "dda4fd7909a732a014239009aa52537b136f8ce568de23c212587097887e2307", 18 "url": "https://pub.dev" 19 }, 20 "source": "hosted", 21 + "version": "1.3.56" 22 }, 23 "analyzer": { 24 "dependency": "transitive", ··· 154 "dependency": "transitive", 155 "description": { 156 "name": "build", 157 + "sha256": "486337d40a48d75049f2a01efceefc1412e3a6d6342d39624753e7d5a4e70016", 158 "url": "https://pub.dev" 159 }, 160 "source": "hosted", 161 + "version": "2.5.1" 162 }, 163 "build_config": { 164 "dependency": "transitive", ··· 184 "dependency": "transitive", 185 "description": { 186 "name": "build_resolvers", 187 + "sha256": "abe6e4b5b36ce2bf01aec8f2a59424d1ecfc3cb340e7145a64359adc7233a0d1", 188 "url": "https://pub.dev" 189 }, 190 "source": "hosted", 191 + "version": "2.5.1" 192 }, 193 "build_runner": { 194 "dependency": "direct dev", 195 "description": { 196 "name": "build_runner", 197 + "sha256": "398ec7898b9b60be126067835a8202240b26dc54aa34d91d0198a539dcd5942e", 198 "url": "https://pub.dev" 199 }, 200 "source": "hosted", 201 + "version": "2.5.1" 202 }, 203 "build_runner_core": { 204 "dependency": "transitive", 205 "description": { 206 "name": "build_runner_core", 207 + "sha256": "9821dbf604ed74a6dabeaba0c33ac58190332ea238862a62cdf25fc8eba226b8", 208 "url": "https://pub.dev" 209 }, 210 "source": "hosted", 211 + "version": "9.0.1" 212 }, 213 "built_collection": { 214 "dependency": "transitive", ··· 263 "dependency": "transitive", 264 "description": { 265 "name": "checked_yaml", 266 + "sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f", 267 "url": "https://pub.dev" 268 }, 269 "source": "hosted", 270 + "version": "2.0.4" 271 }, 272 "ci": { 273 "dependency": "transitive", ··· 433 "dependency": "direct main", 434 "description": { 435 "name": "decimal", 436 + "sha256": "6c2041df7caefc9393ae0b0dcc4abc700831014a2c252dd10e3952499673f0b2", 437 "url": "https://pub.dev" 438 }, 439 "source": "hosted", 440 + "version": "3.2.2" 441 }, 442 "delayed_display": { 443 "dependency": "direct main", ··· 453 "dependency": "transitive", 454 "description": { 455 "name": "device_info_plus", 456 + "sha256": "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a", 457 "url": "https://pub.dev" 458 }, 459 "source": "hosted", 460 + "version": "11.5.0" 461 }, 462 "device_info_plus_platform_interface": { 463 "dependency": "transitive", 464 "description": { 465 "name": "device_info_plus_platform_interface", 466 + "sha256": "e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f", 467 "url": "https://pub.dev" 468 }, 469 "source": "hosted", 470 + "version": "7.0.3" 471 }, 472 "dotted_line": { 473 "dependency": "direct main", ··· 653 "dependency": "transitive", 654 "description": { 655 "name": "firebase_core", 656 + "sha256": "420d9111dcf095341f1ea8fdce926eef750cf7b9745d21f38000de780c94f608", 657 "url": "https://pub.dev" 658 }, 659 "source": "hosted", 660 + "version": "3.14.0" 661 }, 662 "firebase_core_platform_interface": { 663 "dependency": "transitive", ··· 683 "dependency": "transitive", 684 "description": { 685 "name": "firebase_messaging", 686 + "sha256": "758461f67b96aa5ad27625aaae39882fd6d1961b1c7e005301f9a74b6336100b", 687 "url": "https://pub.dev" 688 }, 689 "source": "hosted", 690 + "version": "15.2.7" 691 }, 692 "firebase_messaging_platform_interface": { 693 "dependency": "transitive", 694 "description": { 695 "name": "firebase_messaging_platform_interface", 696 + "sha256": "614db1b0df0f53e541e41cc182b6d7ede5763c400f6ba232a5f8d0e1b5e5de32", 697 "url": "https://pub.dev" 698 }, 699 "source": "hosted", 700 + "version": "4.6.7" 701 }, 702 "firebase_messaging_web": { 703 "dependency": "transitive", 704 "description": { 705 "name": "firebase_messaging_web", 706 + "sha256": "b5fbbcdd3e0e7f3fde72b0c119410f22737638fed5fc428b54bba06bc1455d81", 707 "url": "https://pub.dev" 708 }, 709 "source": "hosted", 710 + "version": "3.10.7" 711 }, 712 "fixnum": { 713 "dependency": "direct main", ··· 925 "dependency": "direct main", 926 "description": { 927 "name": "flutter_svg", 928 + "sha256": "cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845", 929 "url": "https://pub.dev" 930 }, 931 "source": "hosted", 932 + "version": "2.2.0" 933 }, 934 "flutter_switch": { 935 "dependency": "direct main", ··· 1397 "dependency": "direct main", 1398 "description": { 1399 "name": "mobile_scanner", 1400 + "sha256": "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95", 1401 "url": "https://pub.dev" 1402 }, 1403 "source": "hosted", 1404 + "version": "7.0.1" 1405 }, 1406 "mocktail": { 1407 "dependency": "direct main", ··· 1526 "permission_handler": { 1527 "dependency": "transitive", 1528 "description": { 1529 + "path": "permission_handler", 1530 + "ref": "main", 1531 + "resolved-ref": "0486bb15754240c1b8bc79e78f68c9f6ef9e9b92", 1532 + "url": "https://github.com/malcolmpl/flutter-permission-handler" 1533 }, 1534 + "source": "git", 1535 "version": "12.0.0+1" 1536 }, 1537 "permission_handler_android": { ··· 1577 "permission_handler_windows": { 1578 "dependency": "transitive", 1579 "description": { 1580 + "path": "permission_handler_windows", 1581 + "ref": "main", 1582 + "resolved-ref": "0486bb15754240c1b8bc79e78f68c9f6ef9e9b92", 1583 + "url": "https://github.com/malcolmpl/flutter-permission-handler" 1584 }, 1585 + "source": "git", 1586 "version": "0.2.1" 1587 }, 1588 "petitparser": { ··· 1993 "relative": true 1994 }, 1995 "source": "path", 1996 + "version": "0.1.24" 1997 }, 1998 "sideswap_notifications_platform_interface": { 1999 "dependency": "direct main", ··· 2002 "relative": true 2003 }, 2004 "source": "path", 2005 + "version": "0.0.27" 2006 }, 2007 "sideswap_permissions": { 2008 "dependency": "direct main", ··· 2011 "relative": true 2012 }, 2013 "source": "path", 2014 + "version": "0.0.20" 2015 }, 2016 "sideswap_protobuf": { 2017 "dependency": "direct main", ··· 2020 "relative": true 2021 }, 2022 "source": "path", 2023 + "version": "0.0.15" 2024 }, 2025 "sideswap_websocket": { 2026 "dependency": "direct main", ··· 2383 "dependency": "transitive", 2384 "description": { 2385 "name": "vector_graphics", 2386 + "sha256": "a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6", 2387 "url": "https://pub.dev" 2388 }, 2389 "source": "hosted", 2390 + "version": "1.1.19" 2391 }, 2392 "vector_graphics_codec": { 2393 "dependency": "transitive", ··· 2433 "dependency": "transitive", 2434 "description": { 2435 "name": "watcher", 2436 + "sha256": "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a", 2437 "url": "https://pub.dev" 2438 }, 2439 "source": "hosted", 2440 + "version": "1.1.2" 2441 }, 2442 "web": { 2443 "dependency": "transitive", ··· 2483 "dependency": "transitive", 2484 "description": { 2485 "name": "win32", 2486 + "sha256": "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03", 2487 "url": "https://pub.dev" 2488 }, 2489 "source": "hosted", 2490 + "version": "5.14.0" 2491 }, 2492 "win32_registry": { 2493 "dependency": "transitive", ··· 2563 }, 2564 "sdks": { 2565 "dart": ">=3.8.1 <4.0.0", 2566 + "flutter": ">=3.32.5" 2567 } 2568 }
+51
pkgs/by-name/si/sideswap/update-gitHashes.py
···
··· 1 + #! /usr/bin/env nix-shell 2 + #! nix-shell -i python3 -p python3 nix-prefetch-git 3 + 4 + import json 5 + import subprocess 6 + import sys 7 + from pathlib import Path 8 + 9 + THIS_FOLDER = Path(__file__).parent.resolve() 10 + PUBSPEC_LOCK = THIS_FOLDER / "pubspec.lock.json" 11 + GIT_HASHES = THIS_FOLDER / "gitHashes.json" 12 + 13 + 14 + def fetch_git_hash(url: str, rev: str) -> str: 15 + result = subprocess.run( 16 + ["nix-prefetch-git", "--url", url, "--rev", rev], 17 + capture_output=True, 18 + text=True, 19 + check=True, 20 + ) 21 + return json.loads(result.stdout)["hash"] 22 + 23 + 24 + def main() -> None: 25 + if not PUBSPEC_LOCK.exists(): 26 + sys.exit(1) 27 + try: 28 + data = json.loads(PUBSPEC_LOCK.read_text()) 29 + except json.JSONDecodeError: 30 + sys.exit(1) 31 + output: dict[str, str] = {} 32 + for name, info in data.get("packages", {}).items(): 33 + if info.get("source") != "git": 34 + continue 35 + desc = info.get("description") 36 + if not isinstance(desc, dict): 37 + continue 38 + url = desc.get("url") 39 + rev = desc.get("resolved-ref") 40 + if not (isinstance(url, str) and isinstance(rev, str)): 41 + continue 42 + try: 43 + package_hash = fetch_git_hash(url, rev) 44 + except subprocess.CalledProcessError: 45 + continue 46 + output[name] = package_hash 47 + GIT_HASHES.write_text(json.dumps(output, indent=2) + "\n") 48 + 49 + 50 + if __name__ == "__main__": 51 + main()
+26
pkgs/by-name/si/sideswap/update-libsideswap-client.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p nix-update gnugrep gnused curl 3 + 4 + set -eu -o pipefail 5 + 6 + mainfile="$(nix-instantiate --eval -E "with import ./. {}; (builtins.unsafeGetAttrPos \"version\" sideswap).file" | tr -d '"')" 7 + libfile="$(dirname -- "$mainfile")/libsideswap-client.nix" 8 + 9 + mainversion="$(nix-instantiate --eval -E "with import ./. {}; sideswap.version" | tr -d '"')" 10 + 11 + # Update the comment in libsideswap-client.nix. 12 + sed -i "s@sideswapclient/blob/v[^\/]+/deploy@sideswapclient/blob/v${mainversion}/deploy@" $libfile 13 + 14 + # Find libsideswap_client commit used in sideswap/deploy/build_linux.sh. 15 + libversion=$(curl --show-error --silent ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} "https://raw.githubusercontent.com/sideswap-io/sideswapclient/refs/tags/v${mainversion}/deploy/build_linux.sh" | grep -A 1 'pushd sideswap_rust' | grep 'git checkout' | sed 's/git checkout //') 16 + 17 + # Update revision of the lib. 18 + sed -i "/rev =/s/[0-9a-f]\{40\}/${libversion}/" $libfile 19 + 20 + # Find the date of the commit to use as 0-unstable-YYYY-MM-DD version of the lib. 21 + libdate=$(curl --show-error --silent "https://github.com/sideswap-io/sideswap_rust/commit/${libversion}.patch" | grep '^Date: ' | head -1) 22 + libunstableversion=$(date -d "${libdate#Date: }" +"%Y-%m-%d") 23 + sed -i "/version =/s/0-unstable-....-..-../0-unstable-${libunstableversion}/" $libfile 24 + 25 + # Update hash and cargoHash of the lib. Send output to /dev/null not to break "update.nix" which expects JSON here. 26 + nix-update sideswap.lib --version=skip > /dev/null