Revert "flutterPackages: refactor"

This reverts commit fe90d5a666.
This commit is contained in:
hacker1024
2026-04-12 20:41:26 +10:00
parent 6f26437428
commit 4a7fb2c8ea
64 changed files with 4447 additions and 4162 deletions

View File

@@ -466,8 +466,9 @@ nixos/tests/incus/ @adamcstephens
pkgs/by-name/in/incus/ @adamcstephens
pkgs/by-name/lx/lxc* @adamcstephens
# Flutter
# ExpidusOS, Flutter
/pkgs/development/compilers/flutter @RossComputerGuy
/pkgs/desktops/expidus @RossComputerGuy
# GNU Tar & Zip
/pkgs/tools/archivers/gnutar @RossComputerGuy

View File

@@ -194,10 +194,16 @@ lib.extendMkDerivation {
# Ensure that we inherit the propagated build inputs from the dependencies.
builtins.attrValues pubspecLockData.dependencySources;
preConfigure = args.preConfigure or "" + ''
ln -sf "$pubspecLockFilePath" pubspec.lock
'';
# When stripping, it seems some ELF information is lost and the dart VM cli
# runs instead of the expected program. Don't strip if it's an exe output.
dontStrip = args.dontStrip or (dartOutputType == "exe");
passAsFile = [ "pubspecLockFile" ];
passthru = {
pubspecLock = pubspecLockData;
}

View File

@@ -0,0 +1,58 @@
{
lib,
flutter,
fetchFromGitHub,
}:
flutter.buildFlutterApplication rec {
pname = "expidus-calculator";
version = "0.1.1-alpha";
src = fetchFromGitHub {
owner = "ExpidusOS";
repo = "calculator";
rev = version;
hash = "sha256-O3LHp10Fo3PW3zoN7mFSQEKh+AAaR+IqkRtc6nQrIZE=";
};
flutterBuildFlags = [
"--dart-define=COMMIT_HASH=a5d8f54404b9994f83beb367a1cd11e04a6420cb"
];
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
libtokyo = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU=";
libtokyo_flutter = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU=";
};
postInstall = ''
rm $out/bin/calculator
ln -s $out/app/$pname/calculator $out/bin/expidus-calculator
mkdir -p $out/share/applications
mv $out/app/$pname/data/com.expidusos.calculator.desktop $out/share/applications
mkdir -p $out/share/icons
mv $out/app/$pname/data/com.expidusos.calculator.png $out/share/icons
mkdir -p $out/share/metainfo
mv $out/app/$pname/data/com.expidusos.calculator.metainfo.xml $out/share/metainfo
substituteInPlace "$out/share/applications/com.expidusos.calculator.desktop" \
--replace "Exec=calculator" "Exec=$out/bin/expidus-calculator" \
--replace "Icon=com.expidusos.calculator" "Icon=$out/share/icons/com.expidusos.calculator.png"
'';
meta = {
broken = true;
description = "ExpidusOS Calculator";
homepage = "https://expidusos.com";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ RossComputerGuy ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
mainProgram = "expidus-calculator";
};
}

View File

@@ -0,0 +1,790 @@
{
"packages": {
"args": {
"dependency": "transitive",
"description": {
"name": "args",
"sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.2"
},
"async": {
"dependency": "transitive",
"description": {
"name": "async",
"sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.11.0"
},
"bitsdojo_window": {
"dependency": "direct main",
"description": {
"name": "bitsdojo_window",
"sha256": "1118bc1cd16e6f358431ca4473af57cc1b287d2ceab46dfab6d59a9463160622",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.5"
},
"bitsdojo_window_linux": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_linux",
"sha256": "d3804a30315fcbb43b28acc86d1180ce0be22c0c738ad2da9e5ade4d8dbd9655",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"bitsdojo_window_macos": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_macos",
"sha256": "d2a9886c74516c5b84c1dd65ab8ee5d1c52055b265ebf0e7d664dee28366b521",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"bitsdojo_window_platform_interface": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_platform_interface",
"sha256": "65daa015a0c6dba749bdd35a0f092e7a8ba8b0766aa0480eb3ef808086f6e27c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.2"
},
"bitsdojo_window_windows": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_windows",
"sha256": "8766a40aac84a6d7bdcaa716b24997e028fc9a9a1800495fc031721fd5a22ed0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.5"
},
"boolean_selector": {
"dependency": "transitive",
"description": {
"name": "boolean_selector",
"sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"characters": {
"dependency": "transitive",
"description": {
"name": "characters",
"sha256": "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.0"
},
"clock": {
"dependency": "transitive",
"description": {
"name": "clock",
"sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"collection": {
"dependency": "transitive",
"description": {
"name": "collection",
"sha256": "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.17.1"
},
"crypto": {
"dependency": "transitive",
"description": {
"name": "crypto",
"sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.3"
},
"fake_async": {
"dependency": "transitive",
"description": {
"name": "fake_async",
"sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.1"
},
"ffi": {
"dependency": "transitive",
"description": {
"name": "ffi",
"sha256": "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
},
"file": {
"dependency": "transitive",
"description": {
"name": "file",
"sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.4"
},
"filesize": {
"dependency": "transitive",
"description": {
"name": "filesize",
"sha256": "f53df1f27ff60e466eefcd9df239e02d4722d5e2debee92a87dfd99ac66de2af",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.1"
},
"flutter": {
"dependency": "direct main",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_adaptive_scaffold": {
"dependency": "direct main",
"description": {
"name": "flutter_adaptive_scaffold",
"sha256": "3e78be8b9c95b1c9832b2f8ec4a845adac205c4bb5e7bd3fb204b07990229167",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.7+1"
},
"flutter_lints": {
"dependency": "direct dev",
"description": {
"name": "flutter_lints",
"sha256": "a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.3"
},
"flutter_localizations": {
"dependency": "direct main",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_markdown": {
"dependency": "direct main",
"description": {
"name": "flutter_markdown",
"sha256": "d4a1cb250c4e059586af0235f32e02882860a508e189b61f2b31b8810c1e1330",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.17+2"
},
"flutter_test": {
"dependency": "direct dev",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_web_plugins": {
"dependency": "transitive",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"http": {
"dependency": "transitive",
"description": {
"name": "http",
"sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.13.6"
},
"http_parser": {
"dependency": "transitive",
"description": {
"name": "http_parser",
"sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.2"
},
"intl": {
"dependency": "transitive",
"description": {
"name": "intl",
"sha256": "a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.18.0"
},
"js": {
"dependency": "transitive",
"description": {
"name": "js",
"sha256": "f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.7"
},
"libtokyo": {
"dependency": "direct main",
"description": {
"path": "packages/libtokyo",
"ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"url": "https://github.com/ExpidusOS/libtokyo.git"
},
"source": "git",
"version": "0.1.0"
},
"libtokyo_flutter": {
"dependency": "direct main",
"description": {
"path": "packages/libtokyo_flutter",
"ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"url": "https://github.com/ExpidusOS/libtokyo.git"
},
"source": "git",
"version": "0.1.0"
},
"lints": {
"dependency": "transitive",
"description": {
"name": "lints",
"sha256": "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"markdown": {
"dependency": "direct main",
"description": {
"name": "markdown",
"sha256": "acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.1.1"
},
"matcher": {
"dependency": "transitive",
"description": {
"name": "matcher",
"sha256": "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.12.15"
},
"material_color_utilities": {
"dependency": "transitive",
"description": {
"name": "material_color_utilities",
"sha256": "d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"material_theme_builder": {
"dependency": "transitive",
"description": {
"name": "material_theme_builder",
"sha256": "380ab70835e01f4ee0c37904eebae9e36ed37b5cf8ed40d67412ea3244a2afd6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.4"
},
"math_expressions": {
"dependency": "direct main",
"description": {
"name": "math_expressions",
"sha256": "3576593617c3870d75728a751f6ec6e606706d44e363f088ac394b5a28a98064",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.0"
},
"meta": {
"dependency": "transitive",
"description": {
"name": "meta",
"sha256": "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.9.1"
},
"nested": {
"dependency": "transitive",
"description": {
"name": "nested",
"sha256": "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"package_info_plus": {
"dependency": "direct main",
"description": {
"name": "package_info_plus",
"sha256": "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"package_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "package_info_plus_platform_interface",
"sha256": "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.1"
},
"path": {
"dependency": "transitive",
"description": {
"name": "path",
"sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.8.3"
},
"path_provider_linux": {
"dependency": "transitive",
"description": {
"name": "path_provider_linux",
"sha256": "f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.1"
},
"path_provider_platform_interface": {
"dependency": "transitive",
"description": {
"name": "path_provider_platform_interface",
"sha256": "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"path_provider_windows": {
"dependency": "transitive",
"description": {
"name": "path_provider_windows",
"sha256": "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.1"
},
"platform": {
"dependency": "transitive",
"description": {
"name": "platform",
"sha256": "ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"plugin_platform_interface": {
"dependency": "transitive",
"description": {
"name": "plugin_platform_interface",
"sha256": "da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.6"
},
"provider": {
"dependency": "direct main",
"description": {
"name": "provider",
"sha256": "cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.0.5"
},
"pub_semver": {
"dependency": "direct main",
"description": {
"name": "pub_semver",
"sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"pubspec": {
"dependency": "direct main",
"description": {
"name": "pubspec",
"sha256": "f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"quiver": {
"dependency": "transitive",
"description": {
"name": "quiver",
"sha256": "b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.1"
},
"sentry": {
"dependency": "transitive",
"description": {
"name": "sentry",
"sha256": "39c23342fc96105da449914f7774139a17a0ca8a4e70d9ad5200171f7e47d6ba",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.9.0"
},
"sentry_flutter": {
"dependency": "direct main",
"description": {
"name": "sentry_flutter",
"sha256": "ff68ab31918690da004a42e20204242a3ad9ad57da7e2712da8487060ac9767f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.9.0"
},
"shared_preferences": {
"dependency": "direct main",
"description": {
"name": "shared_preferences",
"sha256": "b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.1"
},
"shared_preferences_android": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_android",
"sha256": "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.1"
},
"shared_preferences_foundation": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_foundation",
"sha256": "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.4"
},
"shared_preferences_linux": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_linux",
"sha256": "c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.1"
},
"shared_preferences_platform_interface": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_platform_interface",
"sha256": "d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.1"
},
"shared_preferences_web": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_web",
"sha256": "d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.1"
},
"shared_preferences_windows": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_windows",
"sha256": "f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.1"
},
"sky_engine": {
"dependency": "transitive",
"description": "flutter",
"source": "sdk",
"version": "0.0.99"
},
"source_span": {
"dependency": "transitive",
"description": {
"name": "source_span",
"sha256": "dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.9.1"
},
"stack_trace": {
"dependency": "transitive",
"description": {
"name": "stack_trace",
"sha256": "c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.11.0"
},
"stream_channel": {
"dependency": "transitive",
"description": {
"name": "stream_channel",
"sha256": "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"string_scanner": {
"dependency": "transitive",
"description": {
"name": "string_scanner",
"sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.0"
},
"term_glyph": {
"dependency": "transitive",
"description": {
"name": "term_glyph",
"sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.1"
},
"test_api": {
"dependency": "transitive",
"description": {
"name": "test_api",
"sha256": "eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.5.1"
},
"typed_data": {
"dependency": "transitive",
"description": {
"name": "typed_data",
"sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.2"
},
"uri": {
"dependency": "transitive",
"description": {
"name": "uri",
"sha256": "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"url_launcher": {
"dependency": "direct main",
"description": {
"name": "url_launcher",
"sha256": "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.14"
},
"url_launcher_android": {
"dependency": "transitive",
"description": {
"name": "url_launcher_android",
"sha256": "b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.0"
},
"url_launcher_ios": {
"dependency": "transitive",
"description": {
"name": "url_launcher_ios",
"sha256": "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.5"
},
"url_launcher_linux": {
"dependency": "transitive",
"description": {
"name": "url_launcher_linux",
"sha256": "b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.6"
},
"url_launcher_macos": {
"dependency": "transitive",
"description": {
"name": "url_launcher_macos",
"sha256": "b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.7"
},
"url_launcher_platform_interface": {
"dependency": "transitive",
"description": {
"name": "url_launcher_platform_interface",
"sha256": "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.5"
},
"url_launcher_web": {
"dependency": "transitive",
"description": {
"name": "url_launcher_web",
"sha256": "ba140138558fcc3eead51a1c42e92a9fb074a1b1149ed3c73e66035b2ccd94f2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.19"
},
"url_launcher_windows": {
"dependency": "transitive",
"description": {
"name": "url_launcher_windows",
"sha256": "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.8"
},
"uuid": {
"dependency": "transitive",
"description": {
"name": "uuid",
"sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.7"
},
"vector_math": {
"dependency": "transitive",
"description": {
"name": "vector_math",
"sha256": "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"win32": {
"dependency": "transitive",
"description": {
"name": "win32",
"sha256": "a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.4"
},
"xdg_directories": {
"dependency": "transitive",
"description": {
"name": "xdg_directories",
"sha256": "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.3"
},
"yaml": {
"dependency": "transitive",
"description": {
"name": "yaml",
"sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
}
},
"sdks": {
"dart": ">=3.0.5 <4.0.0",
"flutter": ">=3.10.0"
}
}

View File

@@ -0,0 +1,10 @@
{ callPackage, flutterPackages }:
{
calculator = callPackage ./calculator {
flutter = flutterPackages.v3_35;
};
file-manager = callPackage ./file-manager {
flutter = flutterPackages.v3_35;
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
flutter,
fetchFromGitHub,
}:
flutter.buildFlutterApplication rec {
pname = "expidus-file-manager";
version = "0.2.1";
src = fetchFromGitHub {
owner = "ExpidusOS";
repo = "file-manager";
rev = version;
hash = "sha256-R6eszy4Dz8tAPRTwZzRiZWIgVMiGv5zlhFB/HcD6gqg=";
};
flutterBuildFlags = [
"--dart-define=COMMIT_HASH=b4181b9cff18a07e958c81d8f41840d2d36a6705"
];
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
libtokyo = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU=";
libtokyo_flutter = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU=";
};
postInstall = ''
rm $out/bin/file_manager
ln -s $out/app/$pname/file_manager $out/bin/expidus-file-manager
mkdir -p $out/share/applications
mv $out/app/$pname/data/com.expidusos.file_manager.desktop $out/share/applications
mkdir -p $out/share/icons
mv $out/app/$pname/data/com.expidusos.file_manager.png $out/share/icons
mkdir -p $out/share/metainfo
mv $out/app/$pname/data/com.expidusos.file_manager.metainfo.xml $out/share/metainfo
substituteInPlace "$out/share/applications/com.expidusos.file_manager.desktop" \
--replace "Exec=file_manager" "Exec=$out/bin/expidus-file-manager" \
--replace "Icon=com.expidusos.file_manager" "Icon=$out/share/icons/com.expidusos.file_manager.png"
'';
meta = {
broken = true;
description = "ExpidusOS File Manager";
homepage = "https://expidusos.com";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ RossComputerGuy ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
mainProgram = "expidus-file-manager";
};
}

View File

@@ -0,0 +1,910 @@
{
"packages": {
"args": {
"dependency": "transitive",
"description": {
"name": "args",
"sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.4.2"
},
"async": {
"dependency": "transitive",
"description": {
"name": "async",
"sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.11.0"
},
"bitsdojo_window": {
"dependency": "direct main",
"description": {
"name": "bitsdojo_window",
"sha256": "1118bc1cd16e6f358431ca4473af57cc1b287d2ceab46dfab6d59a9463160622",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.5"
},
"bitsdojo_window_linux": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_linux",
"sha256": "d3804a30315fcbb43b28acc86d1180ce0be22c0c738ad2da9e5ade4d8dbd9655",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"bitsdojo_window_macos": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_macos",
"sha256": "d2a9886c74516c5b84c1dd65ab8ee5d1c52055b265ebf0e7d664dee28366b521",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"bitsdojo_window_platform_interface": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_platform_interface",
"sha256": "65daa015a0c6dba749bdd35a0f092e7a8ba8b0766aa0480eb3ef808086f6e27c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.2"
},
"bitsdojo_window_windows": {
"dependency": "transitive",
"description": {
"name": "bitsdojo_window_windows",
"sha256": "8766a40aac84a6d7bdcaa716b24997e028fc9a9a1800495fc031721fd5a22ed0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.5"
},
"boolean_selector": {
"dependency": "transitive",
"description": {
"name": "boolean_selector",
"sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"characters": {
"dependency": "transitive",
"description": {
"name": "characters",
"sha256": "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.0"
},
"clock": {
"dependency": "transitive",
"description": {
"name": "clock",
"sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"collection": {
"dependency": "direct main",
"description": {
"name": "collection",
"sha256": "f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.17.2"
},
"crypto": {
"dependency": "transitive",
"description": {
"name": "crypto",
"sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.3"
},
"dbus": {
"dependency": "transitive",
"description": {
"name": "dbus",
"sha256": "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.7.8"
},
"fake_async": {
"dependency": "transitive",
"description": {
"name": "fake_async",
"sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.1"
},
"ffi": {
"dependency": "direct main",
"description": {
"name": "ffi",
"sha256": "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
},
"file": {
"dependency": "transitive",
"description": {
"name": "file",
"sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.4"
},
"filesize": {
"dependency": "direct main",
"description": {
"name": "filesize",
"sha256": "f53df1f27ff60e466eefcd9df239e02d4722d5e2debee92a87dfd99ac66de2af",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.1"
},
"flutter": {
"dependency": "direct main",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_adaptive_scaffold": {
"dependency": "direct main",
"description": {
"name": "flutter_adaptive_scaffold",
"sha256": "4f448902314bc9b6cf820c85d5bad4de6489c0eff75dcedf5098f3a53ec981ee",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.6"
},
"flutter_lints": {
"dependency": "direct dev",
"description": {
"name": "flutter_lints",
"sha256": "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.2"
},
"flutter_localizations": {
"dependency": "direct main",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_markdown": {
"dependency": "direct main",
"description": {
"name": "flutter_markdown",
"sha256": "2b206d397dd7836ea60035b2d43825c8a303a76a5098e66f42d55a753e18d431",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.17+1"
},
"flutter_test": {
"dependency": "direct dev",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"flutter_web_plugins": {
"dependency": "transitive",
"description": "flutter",
"source": "sdk",
"version": "0.0.0"
},
"http": {
"dependency": "transitive",
"description": {
"name": "http",
"sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.13.6"
},
"http_parser": {
"dependency": "transitive",
"description": {
"name": "http_parser",
"sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.2"
},
"intl": {
"dependency": "direct main",
"description": {
"name": "intl",
"sha256": "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.18.1"
},
"libtokyo": {
"dependency": "direct main",
"description": {
"path": "packages/libtokyo",
"ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"url": "https://github.com/ExpidusOS/libtokyo.git"
},
"source": "git",
"version": "0.1.0"
},
"libtokyo_flutter": {
"dependency": "direct main",
"description": {
"path": "packages/libtokyo_flutter",
"ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7",
"url": "https://github.com/ExpidusOS/libtokyo.git"
},
"source": "git",
"version": "0.1.0"
},
"lints": {
"dependency": "transitive",
"description": {
"name": "lints",
"sha256": "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"markdown": {
"dependency": "transitive",
"description": {
"name": "markdown",
"sha256": "acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.1.1"
},
"matcher": {
"dependency": "transitive",
"description": {
"name": "matcher",
"sha256": "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.12.16"
},
"material_color_utilities": {
"dependency": "transitive",
"description": {
"name": "material_color_utilities",
"sha256": "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.5.0"
},
"material_theme_builder": {
"dependency": "transitive",
"description": {
"name": "material_theme_builder",
"sha256": "380ab70835e01f4ee0c37904eebae9e36ed37b5cf8ed40d67412ea3244a2afd6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.4"
},
"meta": {
"dependency": "transitive",
"description": {
"name": "meta",
"sha256": "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.9.1"
},
"nested": {
"dependency": "transitive",
"description": {
"name": "nested",
"sha256": "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"open_file_plus": {
"dependency": "direct main",
"description": {
"name": "open_file_plus",
"sha256": "f087e32722ffe4bac71925e7a1a9848a1008fd789e47c6628da3ed7845922227",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.4.1"
},
"package_info_plus": {
"dependency": "direct main",
"description": {
"name": "package_info_plus",
"sha256": "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"package_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "package_info_plus_platform_interface",
"sha256": "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.1"
},
"path": {
"dependency": "direct main",
"description": {
"name": "path",
"sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.8.3"
},
"path_provider": {
"dependency": "direct main",
"description": {
"name": "path_provider",
"sha256": "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
},
"path_provider_android": {
"dependency": "transitive",
"description": {
"name": "path_provider_android",
"sha256": "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
},
"path_provider_foundation": {
"dependency": "transitive",
"description": {
"name": "path_provider_foundation",
"sha256": "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"path_provider_linux": {
"dependency": "transitive",
"description": {
"name": "path_provider_linux",
"sha256": "ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"path_provider_platform_interface": {
"dependency": "direct main",
"description": {
"name": "path_provider_platform_interface",
"sha256": "bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
},
"path_provider_windows": {
"dependency": "direct main",
"description": {
"name": "path_provider_windows",
"sha256": "ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"permission_handler": {
"dependency": "direct main",
"description": {
"name": "permission_handler",
"sha256": "63e5216aae014a72fe9579ccd027323395ce7a98271d9defa9d57320d001af81",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "10.4.3"
},
"permission_handler_android": {
"dependency": "transitive",
"description": {
"name": "permission_handler_android",
"sha256": "2ffaf52a21f64ac9b35fe7369bb9533edbd4f698e5604db8645b1064ff4cf221",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "10.3.3"
},
"permission_handler_apple": {
"dependency": "transitive",
"description": {
"name": "permission_handler_apple",
"sha256": "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "9.1.4"
},
"permission_handler_platform_interface": {
"dependency": "transitive",
"description": {
"name": "permission_handler_platform_interface",
"sha256": "7c6b1500385dd1d2ca61bb89e2488ca178e274a69144d26bbd65e33eae7c02a9",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.11.3"
},
"permission_handler_windows": {
"dependency": "transitive",
"description": {
"name": "permission_handler_windows",
"sha256": "cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"petitparser": {
"dependency": "transitive",
"description": {
"name": "petitparser",
"sha256": "cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "5.4.0"
},
"platform": {
"dependency": "transitive",
"description": {
"name": "platform",
"sha256": "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.0"
},
"plugin_platform_interface": {
"dependency": "transitive",
"description": {
"name": "plugin_platform_interface",
"sha256": "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.5"
},
"provider": {
"dependency": "direct main",
"description": {
"name": "provider",
"sha256": "cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.0.5"
},
"pub_semver": {
"dependency": "direct main",
"description": {
"name": "pub_semver",
"sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"pubspec": {
"dependency": "direct main",
"description": {
"name": "pubspec",
"sha256": "f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"quiver": {
"dependency": "transitive",
"description": {
"name": "quiver",
"sha256": "b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.1"
},
"sentry": {
"dependency": "transitive",
"description": {
"name": "sentry",
"sha256": "39c23342fc96105da449914f7774139a17a0ca8a4e70d9ad5200171f7e47d6ba",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.9.0"
},
"sentry_flutter": {
"dependency": "direct main",
"description": {
"name": "sentry_flutter",
"sha256": "ff68ab31918690da004a42e20204242a3ad9ad57da7e2712da8487060ac9767f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.9.0"
},
"shared_preferences": {
"dependency": "direct main",
"description": {
"name": "shared_preferences",
"sha256": "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"shared_preferences_android": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_android",
"sha256": "fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"shared_preferences_foundation": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_foundation",
"sha256": "f39696b83e844923b642ce9dd4bd31736c17e697f6731a5adf445b1274cf3cd4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.2"
},
"shared_preferences_linux": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_linux",
"sha256": "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"shared_preferences_platform_interface": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_platform_interface",
"sha256": "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"shared_preferences_web": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_web",
"sha256": "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"shared_preferences_windows": {
"dependency": "transitive",
"description": {
"name": "shared_preferences_windows",
"sha256": "f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.0"
},
"sky_engine": {
"dependency": "transitive",
"description": "flutter",
"source": "sdk",
"version": "0.0.99"
},
"source_span": {
"dependency": "transitive",
"description": {
"name": "source_span",
"sha256": "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.10.0"
},
"stack_trace": {
"dependency": "transitive",
"description": {
"name": "stack_trace",
"sha256": "c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.11.0"
},
"stream_channel": {
"dependency": "transitive",
"description": {
"name": "stream_channel",
"sha256": "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"string_scanner": {
"dependency": "transitive",
"description": {
"name": "string_scanner",
"sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.0"
},
"term_glyph": {
"dependency": "transitive",
"description": {
"name": "term_glyph",
"sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.1"
},
"test_api": {
"dependency": "transitive",
"description": {
"name": "test_api",
"sha256": "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.0"
},
"typed_data": {
"dependency": "transitive",
"description": {
"name": "typed_data",
"sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.2"
},
"udisks": {
"dependency": "direct main",
"description": {
"name": "udisks",
"sha256": "847144fb868b9e3602895e89f438f77c2a4fda9e4b02f7d368dc1d2c6a40b475",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.4.0"
},
"uri": {
"dependency": "transitive",
"description": {
"name": "uri",
"sha256": "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"url_launcher": {
"dependency": "direct main",
"description": {
"name": "url_launcher",
"sha256": "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.12"
},
"url_launcher_android": {
"dependency": "transitive",
"description": {
"name": "url_launcher_android",
"sha256": "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.0.38"
},
"url_launcher_ios": {
"dependency": "transitive",
"description": {
"name": "url_launcher_ios",
"sha256": "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.4"
},
"url_launcher_linux": {
"dependency": "transitive",
"description": {
"name": "url_launcher_linux",
"sha256": "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.5"
},
"url_launcher_macos": {
"dependency": "transitive",
"description": {
"name": "url_launcher_macos",
"sha256": "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.6"
},
"url_launcher_platform_interface": {
"dependency": "transitive",
"description": {
"name": "url_launcher_platform_interface",
"sha256": "bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.3"
},
"url_launcher_web": {
"dependency": "transitive",
"description": {
"name": "url_launcher_web",
"sha256": "cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.18"
},
"url_launcher_windows": {
"dependency": "transitive",
"description": {
"name": "url_launcher_windows",
"sha256": "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.7"
},
"uuid": {
"dependency": "transitive",
"description": {
"name": "uuid",
"sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.7"
},
"vector_math": {
"dependency": "transitive",
"description": {
"name": "vector_math",
"sha256": "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"web": {
"dependency": "transitive",
"description": {
"name": "web",
"sha256": "dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.4-beta"
},
"win32": {
"dependency": "direct main",
"description": {
"name": "win32",
"sha256": "a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.4"
},
"xdg_directories": {
"dependency": "direct main",
"description": {
"name": "xdg_directories",
"sha256": "f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.2"
},
"xml": {
"dependency": "transitive",
"description": {
"name": "xml",
"sha256": "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.3.0"
},
"yaml": {
"dependency": "transitive",
"description": {
"name": "yaml",
"sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
}
},
"sdks": {
"dart": ">=3.1.0-185.0.dev <4.0.0",
"flutter": ">=3.10.0"
}
}

View File

@@ -1,7 +1,7 @@
{
bintools,
buildPackages,
flutter,
callPackage,
cacert,
curlMinimal,
dart-bin,
@@ -22,7 +22,6 @@
samurai,
stdenv,
versionCheckHook,
writableTmpDirAsHomeHook,
writeShellScript,
writeText,
zlib,
@@ -31,6 +30,8 @@
let
version = "3.11.4";
tools = callPackage ../../flutter/engine/tools.nix { inherit (stdenv) hostPlatform buildPlatform; };
getArchInfo =
platform:
let
@@ -52,75 +53,78 @@ let
]
);
src = stdenv.mkDerivation (finalAttrs: {
pname = "dart-source-deps";
inherit version;
src =
runCommand "dart-source-deps"
{
pname = "dart-source-deps";
inherit version;
nativeBuildInputs = [
cacert
curlMinimal
flutter.scope.cipd
gitMinimal
pax-utils
python3
writableTmpDirAsHomeHook
];
nativeBuildInputs = [
cacert
curlMinimal
gitMinimal
pax-utils
python3
tools.cipd
];
env = {
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DEPOT_TOOLS_UPDATE = "0";
DEPOT_TOOLS_COLLECT_METRICS = "0";
PYTHONDONTWRITEBYTECODE = "1";
CIPD_HTTP_USER_AGENT = "standard-nix-build";
};
env = {
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DEPOT_TOOLS_UPDATE = "0";
DEPOT_TOOLS_COLLECT_METRICS = "0";
PYTHONDONTWRITEBYTECODE = "1";
CIPD_HTTP_USER_AGENT = "standard-nix-build";
};
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-y2F+wB0M5dq6koxGpCs9BExGU7p8tFOIiRqfdf8ip+8=";
buildCommand = ''
mkdir source
cd source
cp ${writeText ".gclient" ''
solutions = [{
'name': 'sdk',
'url': 'https://dart.googlesource.com/sdk.git@${finalAttrs.version}',
}]
target_os = ['linux']
target_cpu = ['x64', 'arm64', 'riscv64']
target_cpu_only = True
''} .gclient
export PATH=${python3}/bin:$PATH:${flutter.scope.depot_tools}
python3 ${flutter.scope.depot_tools}/gclient.py sync --no-history --nohooks --noprehooks
find sdk -name ".versions" -type d -exec rm -rf {} +
rm --recursive --force sdk/buildtools/sysroot
rm --recursive --force sdk/buildtools/linux-arm64
rm --recursive --force sdk/buildtools/reclient
rm --recursive --force sdk/buildtools/*/clang
find sdk -type f \( -name "*.snapshot" -o -name "*.dill" -o -name "*.sym" \) -delete
rm --recursive --force sdk/tools/sdks/dart-sdk
find . -type l ! -exec test -e {} \; -delete
find . -name "ChangeLog*" -delete
rm --force .gclient .gclient_entries .gclient_previous_sync_commits .last_sync_hashes
rm --recursive --force .cipd .cipd_cache
find . -name ".git" -type d -prune -exec rm --recursive --force {} +
find . -name ".git*" -exec rm --recursive --force {} +
find . \( \
-name ".build-id" -o \
-name ".svn" -o \
-name "*~" -o \
-name "#*#" \
\) -exec rm --recursive --force {} +
for elf in $(scanelf --recursive --all --format "%F" sdk | sort); do
rm --force "$elf"
done
find . -name "__pycache__" -type d -exec rm --recursive --force {} +
find . -name "*.pyc" -delete
cp --recursive sdk $out
'';
});
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-y2F+wB0M5dq6koxGpCs9BExGU7p8tFOIiRqfdf8ip+8=";
}
''
mkdir source
cd source
source ${../../../../build-support/fetchgit/deterministic-git}
export -f clean_git
export -f make_deterministic_repo
cp ${writeText ".gclient" ''
solutions = [{
'name': 'sdk',
'url': 'https://dart.googlesource.com/sdk.git@${version}',
}]
target_os = ['linux']
target_cpu = ['x64', 'arm64', 'riscv64']
target_cpu_only = True
''} .gclient
export PATH=${python3}/bin:$PATH:${tools.depot_tools}
python3 ${tools.depot_tools}/gclient.py sync --no-history --nohooks --noprehooks
find sdk -name ".versions" -type d -exec rm -rf {} +
rm --recursive --force sdk/buildtools/sysroot
rm --recursive --force sdk/buildtools/linux-arm64
rm --recursive --force sdk/buildtools/reclient
rm --recursive --force sdk/buildtools/*/clang
find sdk -type f \( -name "*.snapshot" -o -name "*.dill" -o -name "*.sym" \) -delete
rm --recursive --force sdk/tools/sdks/dart-sdk
find . -type l ! -exec test -e {} \; -delete
find . -name "ChangeLog*" -delete
rm --force .gclient .gclient_entries .gclient_previous_sync_commits .last_sync_hashes
rm --recursive --force .cipd .cipd_cache
find . -name ".git" -type d -prune -exec rm --recursive --force {} +
find . -name ".git*" -exec rm --recursive --force {} +
find . \( \
-name ".build-id" -o \
-name ".svn" -o \
-name "*~" -o \
-name "#*#" \
\) -exec rm --recursive --force {} +
for elf in $(scanelf --recursive --all --format "%F" sdk | sort); do
rm --force "$elf"
done
find . -name "__pycache__" -type d -exec rm --recursive --force {} +
find . -name "*.pyc" -delete
cp --recursive sdk $out
'';
in
dart-bin.overrideAttrs (oldAttrs: {
inherit version src;

View File

@@ -1,79 +0,0 @@
{ lib, callPackage }:
let
oss = [
{
name = "linux";
isLinux = true;
isWindows = false;
isDarwin = false;
}
{
name = "windows";
isLinux = false;
isWindows = true;
isDarwin = false;
}
{
name = "darwin";
isLinux = false;
isWindows = false;
isDarwin = true;
}
];
archs = [
{
name = "x86_64";
isx86_64 = true;
isAarch64 = false;
isRiscV64 = false;
}
{
name = "aarch64";
isx86_64 = false;
isAarch64 = true;
isRiscV64 = false;
}
];
hostPlatforms = (
map
(p: {
inherit (p.os) isLinux isWindows isDarwin;
inherit (p.cpu) isx86_64 isAarch64 isRiscV64;
parsed = {
kernel = {
name = p.os.name;
};
cpu = {
name = p.cpu.name;
};
};
})
(
lib.cartesianProduct {
os = oss;
cpu = archs;
}
)
);
in
(lib.unique (
lib.concatMap (
hostPlatform:
callPackage ./host-artifacts.nix {
inherit hostPlatform;
supportedTargetFlutterPlatforms = [
"universal"
"web"
"android"
"linux"
"macos"
"ios"
"windows"
];
}
) hostPlatforms
))

View File

@@ -0,0 +1,102 @@
# Schema:
# ${flutterVersion}.${targetPlatform}.${hostPlatform}
#
# aarch64-darwin as a host is not yet supported.
# https://github.com/flutter/flutter/issues/60118
{
lib,
runCommand,
lndir,
cacert,
unzip,
flutterPlatform,
systemPlatform,
flutter,
hash,
}:
let
flutterPlatforms = [
"android"
"ios"
"web"
"linux"
"windows"
"macos"
"fuchsia"
"universal"
];
flutter' = flutter.override {
# Use a version of Flutter with just enough capabilities to download
# artifacts.
supportedTargetFlutterPlatforms = [ ];
# Modify flutter-tool's system platform in order to get the desired platform's hashes.
flutter = flutter.unwrapped.override {
flutterTools = flutter.unwrapped.tools.override {
inherit systemPlatform;
};
};
};
in
runCommand "flutter-artifacts-${flutterPlatform}-${systemPlatform}"
{
nativeBuildInputs = [
lndir
flutter'
unzip
];
NIX_FLUTTER_TOOLS_VM_OPTIONS = "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt";
NIX_FLUTTER_OPERATING_SYSTEM =
{
"x86_64-linux" = "linux";
"aarch64-linux" = "linux";
"x86_64-darwin" = "macos";
"aarch64-darwin" = "macos";
}
.${systemPlatform};
outputHash = hash;
outputHashMode = "recursive";
outputHashAlgo = "sha256";
passthru = {
inherit flutterPlatform;
};
}
(
''
export FLUTTER_ROOT="$NIX_BUILD_TOP"
lndir -silent '${flutter'}' "$FLUTTER_ROOT"
rm --recursive --force "$FLUTTER_ROOT/bin/cache"
mkdir "$FLUTTER_ROOT/bin/cache"
mkdir "$FLUTTER_ROOT/bin/cache/dart-sdk"
lndir -silent '${flutter'}/bin/cache/dart-sdk' "$FLUTTER_ROOT/bin/cache/dart-sdk"
''
# Could not determine engine revision
+ lib.optionalString (lib.versionAtLeast flutter'.version "3.32") ''
cp '${flutter'}/bin/internal/engine.version' "$FLUTTER_ROOT/bin/cache/engine.stamp"
''
+ ''
HOME="$(mktemp -d)" flutter precache ${
lib.optionalString (
flutter ? engine && flutter.engine.meta.available
) "--local-engine ${flutter.engine.outName}"
} \
--verbose '--${flutterPlatform}' ${
builtins.concatStringsSep " " (map (p: "'--no-${p}'") (lib.remove flutterPlatform flutterPlatforms))
}
rm --recursive --force "$FLUTTER_ROOT/bin/cache/lockfile"
rm --recursive --force "$FLUTTER_ROOT/bin/cache/dart-sdk"
''
+ ''
find "$FLUTTER_ROOT" -type l -lname '${flutter'}/*' -delete
cp --recursive bin/cache "$out"
''
)

View File

@@ -0,0 +1,14 @@
{ }:
{
buildInputs ? [ ],
...
}:
{
# Use arm64 instead of arm64e.
postPatch = ''
if [ "$pname" == "flutter-tools" ]; then
substituteInPlace lib/src/ios/xcodeproj.dart \
--replace-fail arm64e arm64
fi
'';
}

View File

@@ -0,0 +1,12 @@
{
gtk3,
}:
{
buildInputs ? [ ],
...
}:
{
buildInputs = buildInputs ++ [ gtk3 ];
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
callPackage,
autoPatchelfHook,
src,
}:
(stdenv.mkDerivation {
inherit (src) name;
inherit src;
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
installPhase = ''
runHook preInstall
mkdir --parents "$out/bin"
cp --recursive . "$out/bin/cache"
rm --force "$out/bin/cache/flutter.version.json"
runHook postInstall
'';
}).overrideAttrs
(
if builtins.pathExists (./overrides + "/${src.flutterPlatform}.nix") then
callPackage (./overrides + "/${src.flutterPlatform}.nix") { }
else
({ ... }: { })
)

View File

@@ -54,32 +54,39 @@ lib.extendMkDerivation {
...
}:
let
flutterMode' = args.flutterMode or "release";
hasEngine = flutter ? engine && flutter.engine != null && flutter.engine.meta.available;
flutterMode' = args.flutterMode or (if hasEngine then flutter.engine.runtimeMode else "release");
flutterFlags = lib.optional hasEngine "--local-engine host_${flutterMode'}${
lib.optionalString (!flutter.engine.isOptimized) "_unopt"
}";
flutterBuildFlags' = [
"--${flutterMode'}"
]
++ (args.flutterBuildFlags or [ ]);
++ (args.flutterBuildFlags or [ ])
++ flutterFlags;
universal = args // {
flutterMode = flutterMode';
flutterFlags = flutterFlags;
flutterBuildFlags = flutterBuildFlags';
# Pub needs SSL certificates. Dart normally looks in a hardcoded path.
# https://github.com/dart-lang/sdk/blob/3.1.0/runtime/bin/security_context_linux.cc#L48
#
# Dart does not respect SSL_CERT_FILE...
# https://github.com/dart-lang/sdk/issues/48506
# ...and Flutter does not support --root-certs-file, so the path cannot be manually set.
# https://github.com/flutter/flutter/issues/56607
# https://github.com/flutter/flutter/issues/113594
#
# libredirect is of no use either, as Flutter does not pass any
# environment variables (including LD_PRELOAD) to the Pub process.
#
# Instead, Flutter is patched to allow the path to the Dart binary used for
# Pub commands to be overriden.
sdkSetupScript = ''
# Pub needs SSL certificates. Dart normally looks in a hardcoded path.
# https://github.com/dart-lang/sdk/blob/3.1.0/runtime/bin/security_context_linux.cc#L48
#
# Dart does not respect SSL_CERT_FILE...
# https://github.com/dart-lang/sdk/issues/48506
# ...and Flutter does not support --root-certs-file, so the path cannot be manually set.
# https://github.com/flutter/flutter/issues/56607
# https://github.com/flutter/flutter/issues/113594
#
# libredirect is of no use either, as Flutter does not pass any
# environment variables (including LD_PRELOAD) to the Pub process.
#
# Instead, Flutter is patched to allow the path to the Dart binary used for
# Pub commands to be overriden.
export NIX_FLUTTER_PUB_DART="${
runCommand "dart-with-certs" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p "$out/bin"
@@ -89,11 +96,13 @@ lib.extendMkDerivation {
}/bin/dart"
export HOME="$NIX_BUILD_TOP"
# flutter config --no-analytics &>/dev/null # mute first-run
flutter config --enable-linux-desktop >/dev/null
flutter config $flutterFlags --no-analytics &>/dev/null # mute first-run
flutter config $flutterFlags --enable-linux-desktop >/dev/null
'';
pubGetScript = args.pubGetScript or "flutter pub get";
pubGetScript =
args.pubGetScript
or "flutter${lib.optionalString hasEngine " --local-engine $flutterMode"} pub get";
sdkSourceBuilders = {
# https://github.com/dart-lang/pub/blob/68dc2f547d0a264955c1fa551fa0a0e158046494/lib/src/sdk/flutter.dart#L81

View File

@@ -1,37 +0,0 @@
{
constants,
fetchurl,
writeShellScriptBin,
}:
let
cipdBin = fetchurl {
url = "https://chrome-infra-packages.appspot.com/client?platform=${constants.hostConstants.alt-os}-${constants.hostConstants.arch}&version=git_revision:927335d3d594ba6b46a8c3f2d64fade13c22075b";
executable = true;
hash =
{
"linux-amd64" = "sha256-CP3AbEJm9vbyYfEnF9eD/vZwWK8Ps7kqQjZPY+HTuSQ=";
"linux-arm64" = "sha256-C97vamQ/+/0aaro+idwogtamQUfeVAopHQ1mdID2Utc=";
"mac-amd64" = "sha256-oyxJAG2Xg7m6w/IYrFgEPw0qLCTjL3/XB/3npod2Xsg=";
"mac-arm64" = "sha256-a0bD+qSn34Edn63o7rmQ4v4IVWnETIgWbxDZ1igNbP4=";
}
."${constants.hostConstants.alt-os}-${constants.hostConstants.arch}";
};
in
writeShellScriptBin "cipd" ''
if [[ "$1" == "ensure" ]]; then
for arg in "$@"; do
if [[ "$prev" == "-ensure-file" ]]; then
sed --in-place \
--expression='s/''${platform}/${constants.hostConstants.platform}/g' \
--expression='s|gn/gn/${constants.hostConstants.platform}|gn/gn/${constants.buildConstants.platform}|g' \
--expression='\|src/flutter/third_party/java/openjdk|,+2 d' \
"$arg"
break
fi
prev="$arg"
done
fi
exec ${cipdBin} "$@"
''

View File

@@ -1,41 +0,0 @@
{ lib, stdenv }:
let
makeConstants =
platform:
let
os =
{
linux = "linux";
darwin = "macos";
windows = "windows";
}
.${platform.parsed.kernel.name} or (throw "Unsupported OS: ${platform.parsed.kernel.name}");
arch =
{
x86_64 = "amd64";
aarch64 = "arm64";
riscv64 = "riscv64";
}
.${platform.parsed.cpu.name} or (throw "Unsupported CPU: ${platform.parsed.cpu.name}");
alt-os = if platform.isDarwin then "mac" else os;
alt-arch = if platform.isx86_64 then "x64" else arch;
in
{
inherit
os
arch
alt-os
alt-arch
;
platform = "${os}-${arch}";
alt-platform = "${alt-os}-${alt-arch}";
};
in
{
inherit makeConstants;
buildConstants = makeConstants stdenv.buildPlatform;
targetConstants = makeConstants stdenv.targetPlatform;
hostConstants = makeConstants stdenv.hostPlatform;
}

View File

@@ -1,51 +1,146 @@
{
callPackage,
lib,
useNixpkgsEngine ? false,
callPackage,
fetchzip,
fetchFromGitHub,
dart,
dart-bin,
lib,
stdenv,
runCommand,
}:
let
mkCustomFlutter = args: callPackage ./flutter.nix args;
wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; };
getPatches =
dir:
if builtins.pathExists dir then
map (fileName: dir + "/${fileName}") (builtins.attrNames (builtins.readDir dir))
else
[ ];
makeFlutterScope = callPackage ./scope.nix { };
allVersions = lib.mapAttrs' (versionName: _: {
name = "v${versionName}";
value =
let
versionDir = ./versions + "/${versionName}";
versionData = lib.importJSON (versionDir + "/data.json");
globalPatches = getPatches ./patches;
versionPatches = getPatches (versionDir + "/patches");
globalEnginePatches = getPatches ./engine/patches;
versionEnginePatches = getPatches (versionDir + "/engine/patches");
in
makeFlutterScope (
versionData
// {
inherit useNixpkgsEngine;
patches = globalPatches ++ versionPatches;
enginePatches = globalEnginePatches ++ versionEnginePatches;
}
);
}) (builtins.readDir ./versions);
getLatestForChannel =
channel:
let
channelVersions = lib.filterAttrs (_: scope: scope.channel == channel) allVersions;
sortedNames = lib.naturalSort (builtins.attrNames channelVersions);
files = builtins.attrNames (builtins.readDir dir);
in
if sortedNames == [ ] then null else channelVersions.${lib.last sortedNames}.flutter;
if (builtins.pathExists dir) then map (f: dir + ("/" + f)) files else [ ];
mkFlutter =
{
version,
engineVersion,
engineSwiftShaderHash,
engineSwiftShaderRev,
engineHashes,
enginePatches,
dartVersion,
flutterHash,
dartHash,
patches,
pubspecLock,
artifactHashes,
channel,
}:
let
args = {
inherit
version
engineVersion
engineSwiftShaderRev
engineSwiftShaderHash
engineHashes
enginePatches
patches
pubspecLock
artifactHashes
useNixpkgsEngine
channel
;
stable = getLatestForChannel "stable";
beta = getLatestForChannel "beta";
dart =
let
hash =
dartHash.${stdenv.hostPlatform.system}
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in
(
if lib.versionAtLeast version "3.41" then
(dart-bin.overrideAttrs (oldAttrs: {
version = dartVersion;
src = oldAttrs.src.overrideAttrs (_: {
inherit hash;
});
}))
else
(dart-bin.overrideAttrs (_: {
# This overrideAttrs is used to replace the version in src.url
version = dartVersion;
__intentionallyOverridingVersion = true;
})).overrideAttrs
(oldAttrs: {
src = fetchzip {
inherit (oldAttrs.src) url;
inherit hash;
};
})
);
src =
let
source = fetchFromGitHub {
owner = "flutter";
repo = "flutter";
tag = version;
hash = flutterHash;
};
in
(
if lib.versionAtLeast version "3.32" then
# # Could not determine engine revision
(runCommand source.name { } ''
cp --recursive ${source} $out
chmod +w $out/bin
mkdir $out/bin/cache
cp $out/bin/internal/engine.version $out/bin/cache/engine.stamp
touch $out/bin/cache/engine.realm
'')
else
source
);
};
in
(mkCustomFlutter args).overrideAttrs (
prev: next: {
passthru = next.passthru // {
inherit wrapFlutter mkCustomFlutter mkFlutter;
buildFlutterApplication = callPackage ./build-support/build-flutter-application.nix {
flutter = wrapFlutter (mkCustomFlutter args);
};
};
}
);
flutterVersions = lib.mapAttrs' (
version: _:
let
versionDir = ./versions + "/${version}";
data = lib.importJSON (versionDir + "/data.json");
in
lib.nameValuePair "v${version}" (
wrapFlutter (
mkFlutter (
{
patches = (getPatches ./patches) ++ (getPatches (versionDir + "/patches"));
enginePatches = (getPatches ./engine/patches) ++ (getPatches (versionDir + "/engine/patches"));
}
// data
)
)
)
) (builtins.readDir ./versions);
stableFlutterVersions = lib.attrsets.filterAttrs (_: v: v.channel == "stable") flutterVersions;
betaFlutterVersions = lib.attrsets.filterAttrs (_: v: v.channel == "beta") flutterVersions;
in
(lib.mapAttrs (_: scope: scope.flutter) allVersions)
// lib.optionalAttrs (stable != null) { inherit stable; }
// lib.optionalAttrs (beta != null) { inherit beta; }
flutterVersions
// {
inherit wrapFlutter mkFlutter;
}
// lib.optionalAttrs (betaFlutterVersions != { }) {
beta = flutterVersions.${lib.last (lib.naturalSort (builtins.attrNames betaFlutterVersions))};
}
// lib.optionalAttrs (stableFlutterVersions != { }) {
stable = flutterVersions.${lib.last (lib.naturalSort (builtins.attrNames stableFlutterVersions))};
}

View File

@@ -0,0 +1,48 @@
{ lib, platform }:
let
self = {
os =
if platform.isLinux then
"linux"
else if platform.isDarwin then
"macos"
else if platform.isWindows then
"windows"
else
throw "Unsupported OS \"${platform.parsed.kernel.name}\"";
alt-os = if platform.isDarwin then "mac" else self.os;
arch =
if platform.isx86_64 then
"amd64"
else if platform.isx86 && platform.is32bit then
"386"
else if platform.isAarch64 then
"arm64"
else if platform.isMips && platform.parsed.cpu.significantByte == "littleEndian" then
"mipsle"
else if platform.isMips64 then
"mips64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}"
else if platform.isPower64 then
"ppc64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}"
else if platform.isS390x then
"s390x"
else if platform.isRiscV64 then
"riscv64"
else
throw "Unsupported CPU \"${platform.parsed.cpu.name}\"";
alt-arch =
if platform.isx86_64 then
"x64"
else if platform.isAarch64 then
"arm64"
else
platform.parsed.cpu.name;
platform = "${self.os}-${self.arch}";
alt-platform = "${self.os}-${self.alt-arch}";
};
in
self

View File

@@ -0,0 +1,12 @@
{ engine, runCommand }:
runCommand "flutter-engine-${engine.version}-dart"
{
version = engine.dartSdkVersion;
meta = engine.meta // {
description = "Dart SDK compiled from the Flutter Engine";
};
}
''
ln --symbolic ${engine}/out/${engine.outName}/dart-sdk $out
''

View File

@@ -1,317 +1,78 @@
{
callPackage,
constants,
dart,
depot_tools,
dos2unix,
enginePatches,
freetype,
gn,
gtk3,
harfbuzz,
lib,
libepoxy,
libjpeg,
libpng,
libwebp,
libx11,
libxxf86vm,
llvmPackages,
ninja,
patches,
pkg-config,
python312,
sqlite,
stdenv,
symlinkJoin,
dartSdkVersion,
flutterVersion,
swiftshaderHash,
swiftshaderRev,
version,
zlib,
runtimeMode ? "release",
}:
hashes,
url,
patches,
runtimeModes,
lib,
stdenv,
...
}@args:
let
python3 = python312;
mainRuntimeMode = args.mainRuntimeMode or builtins.elemAt runtimeModes 0;
altRuntimeMode = args.altRuntimeMode or builtins.elemAt runtimeModes 1;
llvm = symlinkJoin {
name = "llvm";
paths = [
llvmPackages.clang
llvmPackages.llvm
];
};
outputAttrs = {
flutter-gtk =
lib.replaceStrings [ "-" "/" ] [ "_M_" "_S_" ]
"${constants.hostConstants.alt-platform}-${runtimeMode}/${constants.hostConstants.alt-platform}-flutter-gtk";
flutter-glfw =
lib.replaceStrings [ "-" "/" ] [ "_M_" "_S_" ]
"${constants.hostConstants.alt-platform}-${runtimeMode}/${constants.hostConstants.alt-platform}-flutter-glfw";
font-subset =
lib.replaceStrings [ "-" "/" ] [ "_M_" "_S_" ]
"${constants.hostConstants.alt-platform}/font-subset";
artifacts =
lib.replaceStrings [ "-" "/" ] [ "_M_" "_S_" ]
"${constants.hostConstants.alt-platform}/artifacts";
flutter_patched_sdk = "flutter_patched_sdk";
};
runtimeModesBuilds = lib.genAttrs runtimeModes (
runtimeMode:
callPackage ./package.nix {
inherit
dartSdkVersion
flutterVersion
swiftshaderHash
swiftshaderRev
version
hashes
url
patches
runtimeMode
;
isOptimized = args.isOptimized or runtimeMode != "debug";
}
);
in
stdenv.mkDerivation (finalAttrs: {
__structuredAttrs = true;
strictDeps = true;
pname = "flutter-engine-linux-${runtimeMode}";
inherit version;
stdenv.mkDerivation (
{
pname = "flutter-engine";
inherit url runtimeModes altRuntimeMode;
inherit (runtimeModesBuilds.${mainRuntimeMode}) version src meta;
src = callPackage ./source.nix { };
dontUnpack = true;
dontBuild = true;
sourceRoot = "${finalAttrs.src.name}/engine/src";
installPhase = ''
runHook preInstall
prePatch = ''
pushd ../..
chmod --recursive +w .
'';
patches = patches ++ enginePatches;
postPatch = ''
popd
dos2unix flutter/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
patchShebangs ../../bin/internal/content_aware_hash.sh
mkdir --parents flutter/third_party/dart/tools/sdks/dart-sdk/ flutter/prebuilts/${constants.hostConstants.alt-platform}/dart-sdk
ln --symbolic ${dart}/bin flutter/third_party/dart/tools/sdks/dart-sdk/bin
ln --symbolic ${dart}/bin flutter/prebuilts/${constants.hostConstants.alt-platform}/dart-sdk/bin
echo "${dart.version}" > flutter/third_party/dart/sdk/version
mkdir --parents flutter/third_party/gn/
ln --symbolic ${lib.getExe gn} flutter/third_party/gn/gn
mkdir --parents flutter/third_party/swiftshader/third_party
ln --symbolic ${llvmPackages.llvm.monorepoSrc} flutter/third_party/swiftshader/third_party/llvm-project
mkdir --parents flutter/buildtools/${constants.hostConstants.alt-platform}
ln --symbolic ${llvm} flutter/buildtools/${constants.hostConstants.alt-platform}/clang
''
# https://github.com/dart-lang/sdk/issues/52295
+ ''
mkdir --parents flutter/third_party/dart/.git/logs
touch flutter/third_party/dart/.git/logs/HEAD
''
# DEPS hooks
+ ''
python3 flutter/third_party/dart/tools/generate_package_config.py
python3 flutter/third_party/dart/tools/generate_sdk_version_file.py
python3 flutter/tools/pub_get_offline.py
''
# reusable system library settings
+ ''
local use_system="
freetype2
harfbuzz
libjpeg-turbo
libpng
libwebp
sqlite
zlib
"
for _lib in $use_system; do
echo "Removing buildscripts for system provided $_lib"
find . -type f -path "*third_party/$_lib/*" \
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
echo "Replacing gn files"
python3 build/linux/unbundle/replace_gn_files.py --system-libraries $use_system
''
# ValueError: ZIP does not support timestamps before 1980
+ ''
substituteInPlace flutter/build/zip.py \
--replace-fail "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED)" "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)"
''
+ ''
sed --in-place '5i #include <cstring>' flutter/display_list/dl_storage.cc
sed --in-place '5i #include <cstring>' flutter/display_list/dl_vertices.cc
sed --in-place '5i #include <cstring>' flutter/display_list/effects/color_filters/dl_matrix_color_filter.h
sed --in-place '5i #include <cstring>' flutter/display_list/geometry/dl_region.cc
sed --in-place '5i #include <cstring>' flutter/display_list/effects/dl_color_source.cc
sed --in-place '5i #include <cstring>' flutter/display_list/dl_builder.cc
sed --in-place '5i #include <cstring>' flutter/display_list/display_list.cc
sed --in-place '5i #include <cstring>' flutter/vulkan/vulkan_application.cc
sed --in-place '5i #include <cstring>' flutter/runtime/dart_vm.cc
sed --in-place '5i #include <cstring>' flutter/runtime/dart_isolate.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/android/android_surface_gl_skia.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/glfw/platform_handler.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_accessibility_channel.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_text_input_handler.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_application.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_event_channel.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_keyboard_channel.cc
sed --in-place '5i #include <cstring>' flutter/impeller/renderer/backend/vulkan/debug_report_vk.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_text_input_channel.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_settings_portal.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_gnome_settings.cc
sed --in-place '5i #include <cstring>' flutter/impeller/toolkit/glvk/trampoline.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/android/android_context_dynamic_impeller.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/fuchsia/dart_runner/builtin_libraries.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/fuchsia/flutter/text_delegate.cc
sed --in-place '5i #include <cstring>' flutter/third_party/accessibility/ax/ax_enum_util.cc
sed --in-place '5i #include <cstring>' flutter/examples/vulkan_glfw/src/main.cc
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h
sed --in-place '5i #include <cstring>' flutter/shell/platform/linux/fl_accessible_text_field.cc
substituteInPlace flutter/shell/platform/linux/fl_view_accessible.cc \
--replace-fail "// Workaround missing C code compatibility in ATK header." "#include <glib.h>"
'';
nativeBuildInputs = [
(python3.withPackages (ps: with ps; [ pyyaml ]))
dart
depot_tools
dos2unix
ninja
pkg-config
];
buildInputs = [
freetype
gtk3
harfbuzz
libepoxy
libjpeg
libpng
libwebp
libx11
libxxf86vm
sqlite
zlib
];
env = {
NIX_CFLAGS_COMPILE = toString (
[
"-O2"
"-Wno-error"
"-Wno-unused-command-line-argument"
"-Wno-absolute-value"
"-Wno-implicit-float-conversion"
"-Wno-error=unused-command-line-argument"
"-D_GLIBCXX_DEBUG=0"
]
++ (lib.optionals stdenv.hostPlatform.isLinux [ "-U_FORTIFY_SOURCE" ])
);
TERM = "dumb";
};
configurePhase =
let
gnFlags = lib.concatStringsSep " " (
[
"--no-goma"
"--no-dart-version-git-info"
"--linux"
"--linux-cpu=${constants.hostConstants.alt-arch}"
"--runtime-mode=${runtimeMode}"
"--no-rbe"
"--prebuilt-dart-sdk"
"--build-glfw-shell"
"--build-engine-artifacts"
"--no-enable-unittests"
"--enable-fontconfig"
''--gn-args="use_default_linux_sysroot=false"''
]
++ (lib.optionals (runtimeMode == "release") [ "--no-backtrace" ])
++ (
if (runtimeMode == "debug") then
[
"--unoptimized"
"--no-stripped"
]
else
[ "--no-lto" ]
)
);
in
mkdir --parents $out/out
''
runHook preConfigure
python3 flutter/tools/gn ${gnFlags} --target-dir="${constants.hostConstants.alt-platform}-${runtimeMode}"
runHook postConfigure
+ lib.concatMapStrings (
runtimeMode:
let
runtimeModeBuild = runtimeModesBuilds.${runtimeMode};
runtimeModeOut = runtimeModeBuild.outName;
in
''
ln --symbolic --force ${runtimeModeBuild}/out/${runtimeModeOut} $out/out/${runtimeModeOut}
''
) runtimeModes
+ ''
runHook postInstall
'';
buildPhase = ''
runHook preBuild
ninja -C out/${constants.hostConstants.alt-platform}-${runtimeMode} -j $NIX_BUILD_CORES
runHook postBuild
'';
outputs = [ "out" ] ++ builtins.attrValues outputAttrs;
installPhase = ''
runHook preInstall
pushd out/${constants.hostConstants.alt-platform}-${runtimeMode}
''
# flutter-gtk
+ ''
install -D --mode=0644 libflutter_linux_gtk.so --target-directory=''$${outputAttrs.flutter-gtk}
install -D --mode=0755 gen_snapshot --target-directory=''$${outputAttrs.flutter-gtk}
cp --recursive flutter_linux ''$${outputAttrs.flutter-gtk}/flutter_linux
''
# flutter-glfw
+ ''
install -D --mode=0644 flutter_export.h --target-directory=''$${outputAttrs.flutter-glfw}
install -D --mode=0644 flutter_glfw.h --target-directory=''$${outputAttrs.flutter-glfw}
install -D --mode=0644 flutter_messenger.h --target-directory=''$${outputAttrs.flutter-glfw}
install -D --mode=0644 flutter_plugin_registrar.h --target-directory=''$${outputAttrs.flutter-glfw}
install -D --mode=0755 gen_snapshot --target-directory=''$${outputAttrs.flutter-glfw}
install -D --mode=0644 libflutter_linux_glfw.so --target-directory=''$${outputAttrs.flutter-glfw}
''
# font-subset
+ ''
install -D --mode=0644 font-subset --target-directory=''$${outputAttrs.font-subset}
install -D --mode=0644 gen/const_finder.dart.snapshot --target-directory=''$${outputAttrs.font-subset}
''
# flutter_patched_sdk
+ ''
install -D --mode=0644 gen/flutter/build/archives/LICENSE.flutter_patched_sdk.md ''$${outputAttrs.flutter_patched_sdk}/LICENSE.flutter_patched_sdk.md
install -D --mode=0644 flutter_patched_sdk/platform_strong.dill --target-directory=''$${outputAttrs.flutter_patched_sdk}/flutter_patched_sdk/
install -D --mode=0644 flutter_patched_sdk/vm_outline_strong.dill --target-directory=''$${outputAttrs.flutter_patched_sdk}/flutter_patched_sdk/
''
# artifacts
+ ''
install -D --mode=0644 gen/flutter/lib/snapshot/vm_isolate_snapshot.bin --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 gen/flutter/lib/snapshot/isolate_snapshot.bin --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 icudtl.dat --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 flutter_tester --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 gen/frontend_server_aot.dart.snapshot --target-directory=''$${outputAttrs.artifacts}/frontend_server.dart.snapshot
install -D --mode=0644 gen/flutter/build/archives/LICENSE.artifacts.md --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 gen/flutter/lib/snapshot/vm_isolate_snapshot.bin --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 libtessellator.so --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 libpath_ops.so --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 gen/flutter/lib/snapshot/isolate_snapshot.bin --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0644 libimpeller.so --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0755 gen_snapshot --target-directory=''$${outputAttrs.artifacts}
install -D --mode=0755 impellerc --target-directory=''$${outputAttrs.artifacts}
cp --recursive shader_lib ''$${outputAttrs.artifacts}/shader_lib
''
# others
+ ''
install -D --mode=0644 libflutter_engine.so --target-directory=$out
install -D --mode=0755 analyze_snapshot --target-directory=$out
popd
runHook postInstall
'';
dontStrip = (runtimeMode != "release");
meta = {
broken = stdenv.hostPlatform.isDarwin || (lib.versionOlder version "3.41");
maintainers = with lib.maintainers; [ RossComputerGuy ];
license = lib.licenses.bsd3;
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
})
passthru = {
inherit (runtimeModesBuilds.${mainRuntimeMode})
dartSdkVersion
isOptimized
runtimeMode
outName
dart
swiftshader
;
};
}
// runtimeModesBuilds
)

View File

@@ -0,0 +1,390 @@
{
lib,
callPackage,
fetchurl,
bash,
symlinkJoin,
darwin,
clang,
tools ? callPackage ./tools.nix {
inherit (stdenv)
hostPlatform
buildPlatform
;
},
stdenv,
dart,
fetchgit,
llvmPackages,
patchelf,
gn,
openbox,
xorg-server,
libxxf86vm,
libxrender,
libxrandr,
libxi,
libxinerama,
libxfixes,
libxext,
libxcursor,
libx11,
xorgproto,
libxcb,
libglvnd,
libepoxy,
wayland,
freetype,
pango,
glib,
harfbuzz,
cairo,
gdk-pixbuf,
at-spi2-atk,
zlib,
gtk3,
pkg-config,
ninja,
python312,
gitMinimal,
version,
flutterVersion,
dartSdkVersion,
swiftshaderHash,
swiftshaderRev,
hashes,
patches,
url,
runtimeMode ? "release",
isOptimized ? runtimeMode != "debug",
}:
let
constants = callPackage ./constants.nix { platform = stdenv.targetPlatform; };
python3 = python312;
src = callPackage ./source.nix {
inherit
flutterVersion
version
hashes
url
;
inherit (stdenv)
hostPlatform
buildPlatform
targetPlatform
;
};
swiftshader = fetchgit {
url = "https://swiftshader.googlesource.com/SwiftShader.git";
hash = swiftshaderHash;
rev = swiftshaderRev;
postFetch = ''
rm --recursive --force $out/third_party/llvm-project
'';
};
llvm = symlinkJoin {
name = "llvm";
paths = [
clang
llvmPackages.llvm
];
};
outName = "host_${runtimeMode}${lib.optionalString (!isOptimized) "_unopt"}";
dartPath = "flutter/third_party/dart";
in
stdenv.mkDerivation (finalAttrs: {
pname = "flutter-engine-${runtimeMode}${lib.optionalString (!isOptimized) "-unopt"}";
inherit version src patches;
setOutputFlags = false;
doStrip = isOptimized;
toolchain = symlinkJoin {
name = "flutter-engine-toolchain-${version}";
paths =
lib.flatten (
map (dep: lib.optionals (lib.isDerivation dep) ([ dep ] ++ map (output: dep.${output}) dep.outputs))
(
lib.optionals (stdenv.hostPlatform.isLinux) [
gtk3
wayland
libepoxy
libglvnd
freetype
at-spi2-atk
glib
gdk-pixbuf
harfbuzz
pango
cairo
libxcb
libx11
libxcursor
libxrandr
libxrender
libxinerama
libxi
libxext
libxfixes
libxxf86vm
xorgproto
zlib
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
clang
llvm
]
)
)
++ [
stdenv.cc.libc_dev
stdenv.cc.libc_lib
];
# Needed due to Flutter expecting everything to be relative to $out
# and not true absolute path (ie relative to "/").
postBuild = ''
mkdir --parents $(dirname $(dirname "$out/$out"))
ln --symbolic $(dirname "$out") $out/$(dirname "$out")
'';
};
NIX_CFLAGS_COMPILE = [
"-I${finalAttrs.toolchain}/include"
"-O2"
"-Wno-error"
"-Wno-absolute-value"
"-Wno-implicit-float-conversion"
]
++ lib.optional (!isOptimized) "-U_FORTIFY_SOURCE";
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [
xorg-server
openbox
];
nativeBuildInputs = [
(python3.withPackages (
ps: with ps; [
pyyaml
]
))
(tools.vpython python3)
gitMinimal
pkg-config
ninja
dart
]
++ lib.optionals (stdenv.hostPlatform.isLinux) [ patchelf ]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
darwin.system_cmds
darwin.xcode
tools.xcode-select
]
++ lib.optionals (stdenv.cc.libc ? bin) [ stdenv.cc.libc.bin ];
buildInputs = [
gtk3
libepoxy
]
++ lib.optionals (lib.versionAtLeast flutterVersion "3.41") [
at-spi2-atk
glib
];
dontPatch = true;
env.patchgit = toString [
dartPath
"flutter"
"."
"flutter/third_party/skia"
];
postUnpack =
lib.optionalString (lib.versionAtLeast flutterVersion "3.38") ''
chmod +w .
mkdir --parents bin/internal
echo '#!${lib.getExe bash}' > bin/internal/content_aware_hash.sh
echo 'echo 1111111111111111111111111111111111111111' >> bin/internal/content_aware_hash.sh
chmod +x bin/internal/content_aware_hash.sh
''
+ ''
pushd ${finalAttrs.src.name}
cp ${
fetchurl {
url = "https://raw.githubusercontent.com/chromium/chromium/631a813125b886a52274653144019fd1681a0e97/build/config/linux/pkg-config.py";
hash = "sha256-9coRpgCewlkFXSGrMVkudaZUll0IFc9jDRBP+2PloOI=";
}
} src/build/config/linux/pkg-config.py
cp --preserve=mode,ownership,timestamps --recursive --reflink=auto ${swiftshader} src/flutter/third_party/swiftshader
chmod --recursive u+w -- src/flutter/third_party/swiftshader
ln --symbolic ${llvmPackages.llvm.monorepoSrc} src/flutter/third_party/swiftshader/third_party/llvm-project
mkdir --parents src/flutter/buildtools/${constants.alt-platform}
ln --symbolic ${llvm} src/flutter/buildtools/${constants.alt-platform}/clang
mkdir --parents src/buildtools/${constants.alt-platform}
ln --symbolic ${llvm} src/buildtools/${constants.alt-platform}/clang
mkdir --parents src/${dartPath}/tools/sdks
ln --symbolic ${dart} src/${dartPath}/tools/sdks/dart-sdk
mkdir --parents src/flutter/third_party/gn/
ln --symbolic --force ${lib.getExe gn} src/flutter/third_party/gn/gn
for dir in ''${patchgit[@]}; do
pushd src/$dir
rm --recursive --force .git
git init
git add .
git config user.name "nobody"
git config user.email "nobody@local.host"
git commit --all --message="$dir" --quiet
popd
done
dart src/${dartPath}/tools/generate_package_config.dart
echo "${dartSdkVersion}" >src/${dartPath}/sdk/version
python3 src/flutter/third_party/dart/tools/generate_sdk_version_file.py
rm --recursive --force src/third_party/angle/.git
python3 src/flutter/tools/pub_get_offline.py
pushd src/flutter
for p in ''${patches[@]}; do
patch -p1 -i $p
done
popd
''
# error: 'close_range' is missing exception specification 'noexcept(true)'
+ lib.optionalString (lib.versionAtLeast flutterVersion "3.35") ''
substituteInPlace src/flutter/third_party/dart/runtime/bin/process_linux.cc \
--replace-fail "(unsigned int first, unsigned int last, int flags)" "(unsigned int first, unsigned int last, int flags) noexcept(true)"
''
# src/flutter/third_party/libcxx/include/__type_traits/is_referenceable.h:33:1: error: templates must have C++ linkage
+ lib.optionalString (lib.versionAtLeast flutterVersion "3.41") ''
substituteInPlace src/flutter/shell/platform/linux/fl_view_accessible.cc \
--replace-fail "// Workaround missing C code compatibility in ATK header." "#include <glib.h>"
''
+ ''
popd
'';
configureFlags = [
"--no-prebuilt-dart-sdk"
"--embedder-for-target"
"--no-goma"
"--no-dart-version-git-info"
]
++ lib.optionals (stdenv.targetPlatform.isx86_64 == false) [
"--linux"
"--linux-cpu ${constants.alt-arch}"
]
++ lib.optional (!isOptimized) "--unoptimized"
++ lib.optional (runtimeMode == "debug") "--no-stripped"
++ lib.optional finalAttrs.finalPackage.doCheck "--enable-unittests"
++ lib.optional (!finalAttrs.finalPackage.doCheck) "--no-enable-unittests";
configurePhase = ''
runHook preConfigure
export PYTHONPATH=$src/src/build
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
export PATH=${darwin.xcode}/Contents/Developer/usr/bin/:$PATH
''
+ ''
python3 ./src/flutter/tools/gn $configureFlags \
--runtime-mode ${runtimeMode} \
--out-dir $out \
--target-sysroot ${finalAttrs.toolchain} \
--target-dir ${outName} \
--target-triple ${stdenv.targetPlatform.config} \
--enable-fontconfig
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
export TERM=dumb
''
# ValueError: ZIP does not support timestamps before 1980
+ ''
substituteInPlace src/flutter/build/zip.py \
--replace-fail "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED)" "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)"
''
+ ''
ninja -C $out/out/${outName} -j$NIX_BUILD_CORES
runHook postBuild
'';
# Tests are broken
doCheck = false;
checkPhase = ''
runHook preCheck
ln --symbolic $out/out src/out
touch src/out/run_tests.log
sh src/flutter/testing/run_tests.sh ${outName}
rm src/out/run_tests.log
runHook postCheck
'';
installPhase = ''
runHook preInstall
rm --recursive --force $out/out/${outName}/{obj,exe.unstripped,lib.unstripped,zip_archives}
rm $out/out/${outName}/{args.gn,build.ninja,build.ninja.d,compile_commands.json,toolchain.ninja}
find $out/out/${outName} -name '*_unittests' -delete
find $out/out/${outName} -name '*_benchmarks' -delete
''
+ lib.optionalString (finalAttrs.finalPackage.doCheck) ''
rm $out/out/${outName}/{display_list_rendertests,flutter_tester}
''
+ ''
runHook postInstall
'';
passthru = {
inherit
dartSdkVersion
isOptimized
runtimeMode
outName
swiftshader
;
dart = callPackage ./dart.nix { engine = finalAttrs.finalPackage; };
};
meta = {
# Very broken on Darwin
broken = stdenv.hostPlatform.isDarwin;
description = "Flutter engine";
homepage = "https://flutter.dev";
maintainers = with lib.maintainers; [ RossComputerGuy ];
license = lib.licenses.bsd3;
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
})

View File

@@ -1,44 +0,0 @@
--- a/engine/src/flutter/build/git_revision.py
+++ b/engine/src/flutter/build/git_revision.py
@@ -22,18 +22,7 @@
if not os.path.exists(repository):
raise IOError('path does not exist')
- git = 'git'
- if is_windows():
- git = 'git.bat'
- version = subprocess.check_output([
- git,
- '-C',
- repository,
- 'rev-parse',
- 'HEAD',
- ])
-
- return str(version.strip(), 'utf-8')
+ return '0' * 41
def main():
--- a/engine/src/flutter/tools/gn
+++ b/engine/src/flutter/tools/gn
@@ -286,18 +286,7 @@
if not os.path.exists(repository):
raise IOError('path does not exist')
- git = 'git'
- if sys.platform.startswith(('cygwin', 'win')):
- git = 'git.bat'
- version = subprocess.check_output([
- git,
- '-C',
- repository,
- 'rev-parse',
- 'HEAD',
- ])
-
- return str(version.strip(), 'utf-8')
+ return '0' * 41
def setup_git_versions():

View File

@@ -1,11 +0,0 @@
--- a/engine/src/.gn
+++ b/engine/src/.gn
@@ -3,7 +3,7 @@
# Use vpython3 from depot_tools for exec_script() calls.
# See `gn help dotfile` for details.
-script_executable = "vpython3"
+script_executable = "python3"
# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"

View File

@@ -1,13 +0,0 @@
--- a/engine/src/flutter/tools/pub_get_offline.py
+++ b/engine/src/flutter/tools/pub_get_offline.py
@@ -148,10 +148,6 @@
SRC_ROOT, 'flutter', 'third_party', 'dart', 'tools', 'sdks', 'dart-sdk', 'bin'
)
- # Delete all package_config.json files. These may be stale.
- # Required ones will be regenerated fresh below.
- delete_config_files()
-
# Ensure all relevant packages are listed in ALL_PACKAGES.
unlisted = find_unlisted_packages()
if len(unlisted) > 0:

View File

@@ -1,22 +0,0 @@
--- a/engine/src/flutter/third_party/flatbuffers/include/flatbuffers/util.h
+++ b/engine/src/flutter/third_party/flatbuffers/include/flatbuffers/util.h
@@ -202,7 +202,7 @@
// clang-format off
// Use locale independent functions {strtod_l, strtof_l, strtoll_l, strtoull_l}.
-#if defined(FLATBUFFERS_LOCALE_INDEPENDENT) && (FLATBUFFERS_LOCALE_INDEPENDENT > 0)
+#if defined(__GLIBC__) && defined(FLATBUFFERS_LOCALE_INDEPENDENT) && (FLATBUFFERS_LOCALE_INDEPENDENT > 0)
class ClassicLocale {
#ifdef _MSC_VER
typedef _locale_t locale_type;
--- a/engine/src/flutter/third_party/flatbuffers/src/util.cpp
+++ b/engine/src/flutter/third_party/flatbuffers/src/util.cpp
@@ -252,7 +252,7 @@
}
// Locale-independent code.
-#if defined(FLATBUFFERS_LOCALE_INDEPENDENT) && \
+#if defined(__GLIBC__) && defined(FLATBUFFERS_LOCALE_INDEPENDENT) && \
(FLATBUFFERS_LOCALE_INDEPENDENT > 0)
// clang-format off

View File

@@ -1,933 +0,0 @@
diff --git a/engine/src/build/linux/unbundle/freetype2.gn b/engine/src/build/linux/unbundle/freetype2.gn
new file mode 100644
index 0000000..3b8cafb
--- /dev/null
+++ b/engine/src/build/linux/unbundle/freetype2.gn
@@ -0,0 +1,35 @@
+# Copyright 2013 The Flutter Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+config("freetype_config") {
+ include_dirs = [ "include/freetype-flutter-config" ]
+
+ cflags = []
+
+ if (is_clang) {
+ cflags += [
+ "-Wno-unused-function",
+ "-Wno-unused-variable",
+ ]
+ }
+}
+
+pkg_config("system_freetype2") {
+ packages = [ "freetype2" ]
+}
+
+source_set("freetype2") {
+ output_name = "freetype2"
+ deps = [
+ "//third_party/libpng",
+ "//third_party/zlib",
+ ]
+ public_configs = [
+ ":freetype_config",
+ ":system_freetype2",
+ ]
+}
diff --git a/engine/src/build/linux/unbundle/harfbuzz.gn b/engine/src/build/linux/unbundle/harfbuzz.gn
new file mode 100644
index 0000000..72d3e06
--- /dev/null
+++ b/engine/src/build/linux/unbundle/harfbuzz.gn
@@ -0,0 +1,31 @@
+# Copyright 2013 The Flutter Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+
+pkg_config("system_harfbuzz") {
+ packages = [ "harfbuzz" ]
+}
+
+pkg_config("system_harfbuzz_subset") {
+ packages = [ "harfbuzz-subset" ]
+}
+
+source_set("harfbuzz") {
+ output_name = "harfbuzz"
+ deps = [
+ "//third_party/freetype2",
+ "//third_party/icu:icuuc",
+ ]
+ public_configs = [ ":system_harfbuzz" ]
+}
+
+source_set("harfbuzz_subset") {
+ output_name = "harfbuzz_subset"
+ deps = [
+ "//third_party/freetype2",
+ "//third_party/icu:icuuc",
+ ]
+ public_configs = [ ":system_harfbuzz_subset" ]
+}
diff --git a/engine/src/build/linux/unbundle/icu.gn b/engine/src/build/linux/unbundle/icu.gn
new file mode 100644
index 0000000..9e54d4e
--- /dev/null
+++ b/engine/src/build/linux/unbundle/icu.gn
@@ -0,0 +1,264 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+group("icu") {
+ public_deps = [
+ ":icui18n",
+ ":icuuc",
+ ]
+}
+
+config("icu_config") {
+ defines = [
+ "USING_SYSTEM_ICU=1",
+ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
+
+ # U_EXPORT (defined in unicode/platform.h) is used to set public visibility
+ # on classes through the U_COMMON_API and U_I18N_API macros (among others).
+ # When linking against the system ICU library, we want its symbols to have
+ # public LTO visibility. This disables CFI checks for the ICU classes and
+ # allows whole-program optimization to be applied to the rest of Chromium.
+ #
+ # Both U_COMMON_API and U_I18N_API macros would be defined to U_EXPORT only
+ # when U_COMBINED_IMPLEMENTATION is defined (see unicode/utypes.h). Because
+ # we override the default system UCHAR_TYPE (char16_t), it is not possible
+ # to use U_COMBINED_IMPLEMENTATION at this moment, meaning the U_COMMON_API
+ # and U_I18N_API macros are set to U_IMPORT which is an empty definition.
+ #
+ # Until building with UCHAR_TYPE=char16_t is supported, one way to apply
+ # public visibility (and thus public LTO visibility) to all ICU classes is
+ # to define U_IMPORT to have the same value as U_EXPORT. For more details,
+ # please see: https://crbug.com/822820
+ "U_IMPORT=U_EXPORT",
+ ]
+}
+
+pkg_config("system_icui18n") {
+ packages = [ "icu-i18n" ]
+}
+
+pkg_config("system_icuuc") {
+ packages = [ "icu-uc" ]
+}
+
+source_set("icui18n") {
+ public_deps = [ ":icui18n_shim" ]
+ public_configs = [
+ ":icu_config",
+ ":system_icui18n",
+ ]
+}
+
+source_set("icuuc") {
+ public_deps = [ ":icuuc_shim" ]
+ public_configs = [
+ ":icu_config",
+ ":system_icuuc",
+ ]
+}
+
+group("icui18n_hidden_visibility") {
+ public_deps = [ ":icui18n" ]
+}
+
+group("icuuc_hidden_visibility") {
+ public_deps = [ ":icuuc" ]
+}
+
+shim_headers("icui18n_shim") {
+ root_path = "source/i18n"
+ headers = [
+ # This list can easily be updated using the commands below:
+ # cd third_party/icu/source/i18n
+ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/alphaindex.h",
+ "unicode/basictz.h",
+ "unicode/calendar.h",
+ "unicode/choicfmt.h",
+ "unicode/coleitr.h",
+ "unicode/coll.h",
+ "unicode/compactdecimalformat.h",
+ "unicode/curramt.h",
+ "unicode/currpinf.h",
+ "unicode/currunit.h",
+ "unicode/datefmt.h",
+ "unicode/dcfmtsym.h",
+ "unicode/decimfmt.h",
+ "unicode/dtfmtsym.h",
+ "unicode/dtitvfmt.h",
+ "unicode/dtitvinf.h",
+ "unicode/dtptngen.h",
+ "unicode/dtrule.h",
+ "unicode/fieldpos.h",
+ "unicode/fmtable.h",
+ "unicode/format.h",
+ "unicode/fpositer.h",
+ "unicode/gender.h",
+ "unicode/gregocal.h",
+ "unicode/listformatter.h",
+ "unicode/measfmt.h",
+ "unicode/measunit.h",
+ "unicode/measure.h",
+ "unicode/msgfmt.h",
+ "unicode/numfmt.h",
+ "unicode/numsys.h",
+ "unicode/plurfmt.h",
+ "unicode/plurrule.h",
+ "unicode/rbnf.h",
+ "unicode/rbtz.h",
+ "unicode/regex.h",
+ "unicode/region.h",
+ "unicode/reldatefmt.h",
+ "unicode/scientificnumberformatter.h",
+ "unicode/search.h",
+ "unicode/selfmt.h",
+ "unicode/simpletz.h",
+ "unicode/smpdtfmt.h",
+ "unicode/sortkey.h",
+ "unicode/stsearch.h",
+ "unicode/tblcoll.h",
+ "unicode/timezone.h",
+ "unicode/tmunit.h",
+ "unicode/tmutamt.h",
+ "unicode/tmutfmt.h",
+ "unicode/translit.h",
+ "unicode/tzfmt.h",
+ "unicode/tznames.h",
+ "unicode/tzrule.h",
+ "unicode/tztrans.h",
+ "unicode/ucal.h",
+ "unicode/ucol.h",
+ "unicode/ucoleitr.h",
+ "unicode/ucsdet.h",
+ "unicode/udat.h",
+ "unicode/udateintervalformat.h",
+ "unicode/udatpg.h",
+ "unicode/ufieldpositer.h",
+ "unicode/uformattable.h",
+ "unicode/ugender.h",
+ "unicode/ulocdata.h",
+ "unicode/umsg.h",
+ "unicode/unirepl.h",
+ "unicode/unum.h",
+ "unicode/unumsys.h",
+ "unicode/upluralrules.h",
+ "unicode/uregex.h",
+ "unicode/uregion.h",
+ "unicode/ureldatefmt.h",
+ "unicode/usearch.h",
+ "unicode/uspoof.h",
+ "unicode/utmscale.h",
+ "unicode/utrans.h",
+ "unicode/vtzone.h",
+ ]
+ additional_includes = [ "flutter" ]
+}
+
+shim_headers("icuuc_shim") {
+ root_path = "source/common"
+ headers = [
+ # This list can easily be updated using the commands below:
+ # cd third_party/icu/source/common
+ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/appendable.h",
+ "unicode/brkiter.h",
+ "unicode/bytestream.h",
+ "unicode/bytestrie.h",
+ "unicode/bytestriebuilder.h",
+ "unicode/caniter.h",
+ "unicode/casemap.h",
+ "unicode/char16ptr.h",
+ "unicode/chariter.h",
+ "unicode/dbbi.h",
+ "unicode/docmain.h",
+ "unicode/dtintrv.h",
+ "unicode/edits.h",
+ "unicode/enumset.h",
+ "unicode/errorcode.h",
+ "unicode/filteredbrk.h",
+ "unicode/icudataver.h",
+ "unicode/icuplug.h",
+ "unicode/idna.h",
+ "unicode/localematcher.h",
+ "unicode/localpointer.h",
+ "unicode/locdspnm.h",
+ "unicode/locid.h",
+ "unicode/messagepattern.h",
+ "unicode/normalizer2.h",
+ "unicode/normlzr.h",
+ "unicode/parseerr.h",
+ "unicode/parsepos.h",
+ "unicode/platform.h",
+ "unicode/ptypes.h",
+ "unicode/putil.h",
+ "unicode/rbbi.h",
+ "unicode/rep.h",
+ "unicode/resbund.h",
+ "unicode/schriter.h",
+ "unicode/simpleformatter.h",
+ "unicode/std_string.h",
+ "unicode/strenum.h",
+ "unicode/stringpiece.h",
+ "unicode/stringtriebuilder.h",
+ "unicode/symtable.h",
+ "unicode/ubidi.h",
+ "unicode/ubiditransform.h",
+ "unicode/ubrk.h",
+ "unicode/ucasemap.h",
+ "unicode/ucat.h",
+ "unicode/uchar.h",
+ "unicode/ucharstrie.h",
+ "unicode/ucharstriebuilder.h",
+ "unicode/uchriter.h",
+ "unicode/uclean.h",
+ "unicode/ucnv.h",
+ "unicode/ucnv_cb.h",
+ "unicode/ucnv_err.h",
+ "unicode/ucnvsel.h",
+ "unicode/uconfig.h",
+ "unicode/ucurr.h",
+ "unicode/udata.h",
+ "unicode/udisplaycontext.h",
+ "unicode/uenum.h",
+ "unicode/uidna.h",
+ "unicode/uiter.h",
+ "unicode/uldnames.h",
+ "unicode/ulistformatter.h",
+ "unicode/uloc.h",
+ "unicode/umachine.h",
+ "unicode/umisc.h",
+ "unicode/unifilt.h",
+ "unicode/unifunct.h",
+ "unicode/unimatch.h",
+ "unicode/uniset.h",
+ "unicode/unistr.h",
+ "unicode/unorm.h",
+ "unicode/unorm2.h",
+ "unicode/uobject.h",
+ "unicode/urename.h",
+ "unicode/urep.h",
+ "unicode/ures.h",
+ "unicode/uscript.h",
+ "unicode/uset.h",
+ "unicode/usetiter.h",
+ "unicode/ushape.h",
+ "unicode/usprep.h",
+ "unicode/ustring.h",
+ "unicode/ustringtrie.h",
+ "unicode/utext.h",
+ "unicode/utf.h",
+ "unicode/utf16.h",
+ "unicode/utf32.h",
+ "unicode/utf8.h",
+ "unicode/utf_old.h",
+ "unicode/utrace.h",
+ "unicode/utypes.h",
+ "unicode/uvernum.h",
+ "unicode/uversion.h",
+ ]
+ additional_includes = [ "flutter" ]
+}
diff --git a/engine/src/build/linux/unbundle/libjpeg-turbo.gn b/engine/src/build/linux/unbundle/libjpeg-turbo.gn
new file mode 100644
index 0000000..be0c674
--- /dev/null
+++ b/engine/src/build/linux/unbundle/libjpeg-turbo.gn
@@ -0,0 +1,11 @@
+# Copyright 2013 The Flutter Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("libjpeg_config") {
+ libs = [ "jpeg" ]
+}
+
+group("libjpeg") {
+ public_configs = [ ":libjpeg_config" ]
+}
diff --git a/engine/src/build/linux/unbundle/libpng.gn b/engine/src/build/linux/unbundle/libpng.gn
new file mode 100644
index 0000000..91e0ee4
--- /dev/null
+++ b/engine/src/build/linux/unbundle/libpng.gn
@@ -0,0 +1,23 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("libpng_config") {
+ packages = [ "libpng" ]
+}
+
+shim_headers("libpng_shim") {
+ root_path = "."
+ headers = [
+ "png.h",
+ "pngconf.h",
+ ]
+}
+
+source_set("libpng") {
+ deps = [ ":libpng_shim" ]
+ public_configs = [ ":libpng_config" ]
+}
diff --git a/engine/src/build/linux/unbundle/libwebp.gn b/engine/src/build/linux/unbundle/libwebp.gn
new file mode 100644
index 0000000..708cc9c
--- /dev/null
+++ b/engine/src/build/linux/unbundle/libwebp.gn
@@ -0,0 +1,35 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_libwebp") {
+ packages = [
+ "libwebp",
+ "libwebpdemux",
+ "libwebpmux",
+ ]
+}
+
+shim_headers("libwebp_shim") {
+ root_path = "src/src"
+ headers = [
+ "webp/decode.h",
+ "webp/demux.h",
+ "webp/encode.h",
+ "webp/mux.h",
+ "webp/mux_types.h",
+ "webp/types.h",
+ ]
+}
+
+source_set("libwebp_webp") {
+ deps = [ ":libwebp_shim" ]
+ public_configs = [ ":system_libwebp" ]
+}
+
+group("libwebp") {
+ deps = [ ":libwebp_webp" ]
+}
diff --git a/engine/src/build/linux/unbundle/libxml.gn b/engine/src/build/linux/unbundle/libxml.gn
new file mode 100644
index 0000000..b42d044
--- /dev/null
+++ b/engine/src/build/linux/unbundle/libxml.gn
@@ -0,0 +1,13 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+
+pkg_config("system_libxml") {
+ packages = [ "libxml-2.0" ]
+}
+
+source_set("libxml") {
+ public_configs = [ ":system_libxml" ]
+}
diff --git a/engine/src/build/linux/unbundle/replace_gn_files.py b/engine/src/build/linux/unbundle/replace_gn_files.py
new file mode 100755
index 0000000..b8b24c6
--- /dev/null
+++ b/engine/src/build/linux/unbundle/replace_gn_files.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python3
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Replaces GN files in tree with files from here that
+make the build use system libraries.
+"""
+
+import argparse
+import os
+import shutil
+import sys
+
+
+REPLACEMENTS = {
+ # Use system libabsl_2xxx. These 18 shims MUST be used together.
+ 'absl_algorithm': 'flutter/third_party/abseil-cpp/absl/algorithm/BUILD.gn',
+ 'absl_base': 'flutter/third_party/abseil-cpp/absl/base/BUILD.gn',
+ 'absl_cleanup': 'flutter/third_party/abseil-cpp/absl/cleanup/BUILD.gn',
+ 'absl_container': 'flutter/third_party/abseil-cpp/absl/container/BUILD.gn',
+ 'absl_debugging': 'flutter/third_party/abseil-cpp/absl/debugging/BUILD.gn',
+ 'absl_flags': 'flutter/third_party/abseil-cpp/absl/flags/BUILD.gn',
+ 'absl_functional': 'flutter/third_party/abseil-cpp/absl/functional/BUILD.gn',
+ 'absl_hash': 'flutter/third_party/abseil-cpp/absl/hash/BUILD.gn',
+ 'absl_memory': 'flutter/third_party/abseil-cpp/absl/memory/BUILD.gn',
+ 'absl_meta': 'flutter/third_party/abseil-cpp/absl/meta/BUILD.gn',
+ 'absl_numeric': 'flutter/third_party/abseil-cpp/absl/numeric/BUILD.gn',
+ 'absl_random': 'flutter/third_party/abseil-cpp/absl/random/BUILD.gn',
+ 'absl_status': 'flutter/third_party/abseil-cpp/absl/status/BUILD.gn',
+ 'absl_strings': 'flutter/third_party/abseil-cpp/absl/strings/BUILD.gn',
+ 'absl_synchronization': 'flutter/third_party/abseil-cpp/absl/synchronization/BUILD.gn',
+ 'absl_time': 'flutter/third_party/abseil-cpp/absl/time/BUILD.gn',
+ 'absl_types': 'flutter/third_party/abseil-cpp/absl/types/BUILD.gn',
+ 'absl_utility': 'flutter/third_party/abseil-cpp/absl/utility/BUILD.gn',
+ #
+ 'fontconfig': 'third_party/fontconfig/BUILD.gn',
+ 'freetype2': 'flutter/third_party/freetype2/BUILD.gn',
+ 'harfbuzz': 'flutter/build/secondary/flutter/third_party/harfbuzz/BUILD.gn',
+ 'icu': 'flutter/third_party/icu/BUILD.gn',
+ 'libjpeg-turbo': 'flutter/third_party/libjpeg-turbo/BUILD.gn',
+ 'libpng': 'flutter/third_party/libpng/BUILD.gn',
+ 'libwebp': 'flutter/build/secondary/flutter/third_party/libwebp/BUILD.gn',
+ 'libxml': 'third_party/libxml/BUILD.gn',
+ 'libXNVCtrl': 'flutter/third_party/angle/src/third_party/libXNVCtrl/BUILD.gn',
+ 'sqlite': 'flutter/third_party/sqlite/BUILD.gn',
+ # Use system libSPIRV-Tools in Swiftshader. These two shims MUST be used together.
+ 'swiftshader-SPIRV-Headers': 'flutter/third_party/swiftshader/third_party/SPIRV-Headers/BUILD.gn',
+ 'swiftshader-SPIRV-Tools': 'flutter/third_party/swiftshader/third_party/SPIRV-Tools/BUILD.gn',
+ # Use system libSPIRV-Tools inside ANGLE. These two shims MUST be used together
+ # and can only be used if WebGPU is not compiled (use_dawn=false)
+ 'vulkan-SPIRV-Headers': 'flutter/third_party/vulkan-deps/spirv-headers/src/BUILD.gn',
+ 'vulkan-SPIRV-Tools': 'flutter/third_party/vulkan-deps/spirv-tools/src/BUILD.gn',
+ #
+ 'zlib': 'flutter/third_party/zlib/BUILD.gn',
+}
+
+
+def DoMain(argv):
+ my_dirname = os.path.dirname(__file__)
+ source_tree_root = os.path.abspath(
+ os.path.join(my_dirname, '..', '..', '..'))
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--system-libraries', nargs='*', default=[])
+ parser.add_argument('--undo', action='store_true')
+
+ args = parser.parse_args(argv)
+
+ handled_libraries = set()
+ for lib, path in REPLACEMENTS.items():
+ if lib not in args.system_libraries:
+ continue
+ handled_libraries.add(lib)
+
+ if args.undo:
+ # Restore original file, and also remove the backup.
+ # This is meant to restore the source tree to its original state.
+ os.rename(os.path.join(source_tree_root, path + '.bak'),
+ os.path.join(source_tree_root, path))
+ else:
+ # Create a backup copy for --undo.
+ shutil.copyfile(os.path.join(source_tree_root, path),
+ os.path.join(source_tree_root, path + '.bak'))
+
+ # Copy the GN file from directory of this script to target path.
+ shutil.copyfile(os.path.join(my_dirname, '%s.gn' % lib),
+ os.path.join(source_tree_root, path))
+
+ unhandled_libraries = set(args.system_libraries) - handled_libraries
+ if unhandled_libraries:
+ print('Unrecognized system libraries requested: %s' % ', '.join(
+ sorted(unhandled_libraries)), file=sys.stderr)
+ return 1
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(DoMain(sys.argv[1:]))
diff --git a/engine/src/build/linux/unbundle/sqlite.gn b/engine/src/build/linux/unbundle/sqlite.gn
new file mode 100644
index 0000000..e6c653d
--- /dev/null
+++ b/engine/src/build/linux/unbundle/sqlite.gn
@@ -0,0 +1,20 @@
+# Copyright 2013 The Flutter Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_sqlite") {
+ packages = [ "sqlite3" ]
+}
+
+shim_headers("sqlite_shim") {
+ root_path = "//third_party/sqlite"
+ headers = [ "sqlite3.h" ]
+}
+
+source_set("sqlite") {
+ public_deps = [ ":sqlite_shim" ]
+ public_configs = [ ":system_sqlite" ]
+}
diff --git a/engine/src/build/linux/unbundle/zlib.gn b/engine/src/build/linux/unbundle/zlib.gn
new file mode 100644
index 0000000..6daf3c6
--- /dev/null
+++ b/engine/src/build/linux/unbundle/zlib.gn
@@ -0,0 +1,72 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/shim_headers.gni")
+
+declare_args() {
+ use_zlib_ng = false
+}
+
+if (use_zlib_ng) {
+ _suffix = "-ng"
+} else {
+ _suffix = ""
+}
+
+shim_headers("zlib_shim") {
+ root_path = "."
+ headers = [ "zlib.h%zlib$_suffix.h" ]
+ additional_includes = [ "flutter", "flutter/third_party" ]
+}
+
+config("system_zlib") {
+ defines = [ "USE_SYSTEM_ZLIB=1" ]
+}
+
+config("zlib_config") {
+ configs = [ ":system_zlib" ]
+}
+
+source_set("zlib") {
+ public_deps = [ ":zlib_shim" ]
+ libs = [ "z$_suffix" ]
+ public_configs = [ ":system_zlib" ]
+}
+
+shim_headers("minizip_shim") {
+ root_path = "contrib"
+ headers = [
+ "minizip/crypt.h",
+ "minizip/ioapi.h",
+ "minizip/iowin32.h",
+ "minizip/mztools.h",
+ "minizip/unzip.h",
+ "minizip/zip.h",
+ ]
+}
+
+source_set("minizip") {
+ deps = [ ":minizip_shim" ]
+ libs = [ "minizip" ]
+}
+
+static_library("zip") {
+ sources = [
+ "google/zip.cc",
+ "google/zip.h",
+ "google/zip_internal.cc",
+ "google/zip_internal.h",
+ "google/zip_reader.cc",
+ "google/zip_reader.h",
+ ]
+ deps = [ ":minizip" ]
+}
+
+static_library("compression_utils") {
+ sources = [
+ "google/compression_utils.cc",
+ "google/compression_utils.h",
+ ]
+ deps = [ ":zlib" ]
+}
diff --git a/engine/src/build/shim_headers.gni b/engine/src/build/shim_headers.gni
new file mode 100644
index 0000000..1d24e0a
--- /dev/null
+++ b/engine/src/build/shim_headers.gni
@@ -0,0 +1,42 @@
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+template("shim_headers") {
+ action_name = "gen_${target_name}"
+ config_name = "${target_name}_config"
+ shim_headers_path = "${root_gen_dir}/shim_headers/${target_name}"
+ config(config_name) {
+ include_dirs = [ shim_headers_path ]
+ if (defined(invoker.additional_includes)) {
+ foreach(i, invoker.additional_includes) {
+ include_dirs += [ shim_headers_path + "/" + i ]
+ }
+ }
+ }
+ action(action_name) {
+ script = "//tools/generate_shim_headers.py"
+ args = [
+ "--generate",
+ "--headers-root",
+ rebase_path(invoker.root_path),
+ "--output-directory",
+ rebase_path(shim_headers_path),
+ ]
+ if (defined(invoker.prefix)) {
+ args += [
+ "--prefix",
+ invoker.prefix,
+ ]
+ }
+ args += invoker.headers
+ outputs = []
+ foreach(h, invoker.headers) {
+ outputs += [ shim_headers_path + "/" +
+ rebase_path(invoker.root_path, "//") + "/" + h ]
+ }
+ }
+ group(target_name) {
+ public_deps = [ ":${action_name}" ]
+ all_dependent_configs = [ ":${config_name}" ]
+ }
+}
diff --git a/engine/src/tools/generate_shim_headers.py b/engine/src/tools/generate_shim_headers.py
new file mode 100644
index 0000000..aaa16f8
--- /dev/null
+++ b/engine/src/tools/generate_shim_headers.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+# Copyright 2012 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Generates shim headers that mirror the directory structure of bundled headers,
+but just forward to the system ones.
+
+This allows seamless compilation against system headers with no changes
+to our source code.
+"""
+
+
+import optparse
+import os.path
+import sys
+
+
+SHIM_TEMPLATE = """
+#if defined(OFFICIAL_BUILD)
+#error shim headers must not be used in official builds!
+#endif
+"""
+
+
+def GeneratorMain(argv):
+ parser = optparse.OptionParser()
+ parser.add_option('--headers-root', action='append')
+ parser.add_option('--define', action='append')
+ parser.add_option('--output-directory')
+ parser.add_option('--prefix', default='')
+ parser.add_option('--use-include-next', action='store_true')
+ parser.add_option('--outputs', action='store_true')
+ parser.add_option('--generate', action='store_true')
+
+ options, args = parser.parse_args(argv)
+
+ if not options.headers_root:
+ parser.error('Missing --headers-root parameter.')
+ if not options.output_directory:
+ parser.error('Missing --output-directory parameter.')
+ if not args:
+ parser.error('Missing arguments - header file names.')
+
+ source_tree_root = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), '..'))
+
+ for root in options.headers_root:
+ target_directory = os.path.join(
+ options.output_directory,
+ os.path.relpath(root, source_tree_root))
+ if options.generate and not os.path.exists(target_directory):
+ os.makedirs(target_directory)
+
+ for header_spec in args:
+ if ';' in header_spec:
+ (header_filename,
+ include_before,
+ include_after) = header_spec.split(';', 2)
+ else:
+ header_filename = header_spec
+ include_before = ''
+ include_after = ''
+ if '%' in header_filename:
+ (header_filename,
+ upstream_header_filename) = header_filename.split('%', 1)
+ else:
+ upstream_header_filename = header_filename
+ if options.outputs:
+ yield os.path.join(target_directory, header_filename)
+ if options.generate:
+ header_path = os.path.join(target_directory, header_filename)
+ header_dir = os.path.dirname(header_path)
+ if not os.path.exists(header_dir):
+ os.makedirs(header_dir)
+ with open(header_path, 'w') as f:
+ f.write(SHIM_TEMPLATE)
+
+ if options.define:
+ for define in options.define:
+ key, value = define.split('=', 1)
+ # This non-standard push_macro extension is supported
+ # by compilers we support (GCC, clang).
+ f.write('#pragma push_macro("%s")\n' % key)
+ f.write('#undef %s\n' % key)
+ f.write('#define %s %s\n' % (key, value))
+
+ if include_before:
+ for header in include_before.split(':'):
+ f.write('#include %s\n' % header)
+
+ include_target = options.prefix + upstream_header_filename
+ if options.use_include_next:
+ f.write('#include_next <%s>\n' % include_target)
+ else:
+ f.write('#include <%s>\n' % include_target)
+
+ if include_after:
+ for header in include_after.split(':'):
+ f.write('#include %s\n' % header)
+
+ if options.define:
+ for define in options.define:
+ key, value = define.split('=', 1)
+ # This non-standard pop_macro extension is supported
+ # by compilers we support (GCC, clang).
+ f.write('#pragma pop_macro("%s")\n' % key)
+
+
+def DoMain(argv):
+ return '\n'.join(GeneratorMain(argv))
+
+
+if __name__ == '__main__':
+ DoMain(sys.argv[1:])
--- /dev/null
+++ b/engine/src/build/linux/unbundle/vulkan-SPIRV-Headers.gn
@@ -0,0 +1,19 @@
+# This shim can only be used if you build Chromium without DAWN
+
+import("//build/shim_headers.gni")
+
+shim_headers("vulkan-SPIRV-Headers_shim") {
+ root_path = "include"
+ headers = [
+ "spirv/unified1/GLSL.std.450.h",
+ "spirv/unified1/NonSemanticClspvReflection.h",
+ "spirv/unified1/NonSemanticDebugPrintf.h",
+ "spirv/unified1/OpenCL.std.h",
+ "spirv/unified1/spirv.h",
+ "spirv/unified1/spirv.hpp",
+ ]
+}
+
+source_set("spv_headers") {
+ deps = [ ":vulkan-SPIRV-Headers_shim" ]
+}
--- /dev/null
+++ b/engine/src/build/linux/unbundle/vulkan-SPIRV-Tools.gn
@@ -0,0 +1,73 @@
+# This shim can only be used if you build Chromium without DAWN
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("spvtools_internal_config") {
+ packages = [ "SPIRV-Tools" ]
+}
+
+shim_headers("vulkan-SPIRV-Tools_shim") {
+ root_path = "include"
+ headers = [
+ "spirv-tools/instrument.hpp",
+ "spirv-tools/libspirv.h",
+ "spirv-tools/libspirv.hpp",
+ "spirv-tools/linker.hpp",
+ "spirv-tools/optimizer.hpp",
+ ]
+}
+
+source_set("SPIRV-Tools") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_core_enums_unified1") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_core_tables_unified1") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_headers") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_language_header_cldebuginfo100") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_language_header_debuginfo") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_language_header_vkdebuginfo100") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_opt") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}
+
+config("spvtools_public_config") {
+ configs = [ ":spvtools_internal_config" ]
+}
+
+source_set("spvtools_val") {
+ deps = [ ":vulkan-SPIRV-Tools_shim" ]
+ public_configs = [ ":spvtools_internal_config" ]
+}

View File

@@ -1,60 +1,73 @@
{
lib,
callPackage,
curlMinimal,
pkg-config,
gitMinimal,
python312,
depot_tools,
runCommand,
writeText,
cacert,
flutterVersion,
version,
engineHash ? "",
cipd,
writableTmpDirAsHomeHook,
}:
hashes,
url,
hostPlatform,
targetPlatform,
buildPlatform,
...
}@pkgs:
let
gclient = writeText ".gclient" ''
solutions = [
{
"name": ".",
"url": "https://github.com/flutter/flutter.git@${version}",
"managed": False,
"custom_vars": {
"download_dart_sdk": False,
"download_esbuild": False,
"download_android_deps": False,
"download_jdk": False,
"download_linux_deps": False,
"download_windows_deps": False,
"download_fuchsia_deps": False,
"checkout_llvm": False,
"setup_githooks": False,
"release_candidate": True,
},
}
]
target_os = [ "linux" ]
target_cpu = [ "x64", "arm64", "riscv64" ]
target-constants = callPackage ./constants.nix { platform = targetPlatform; };
build-constants = callPackage ./constants.nix { platform = buildPlatform; };
tools = pkgs.tools or (callPackage ./tools.nix { inherit hostPlatform buildPlatform; });
boolOption = value: if value then "True" else "False";
gclient = writeText "flutter-${version}.gclient" ''
solutions = [{
"managed": False,
"name": ".",
"url": "${url}",
"custom_vars": {
"download_fuchsia_deps": False,
"download_android_deps": False,
"download_linux_deps": ${boolOption targetPlatform.isLinux},
"setup_githooks": False,
"download_esbuild": False,
"download_dart_sdk": True,
"host_cpu": "${build-constants.alt-arch}",
"host_os": "${build-constants.alt-os}",
},
}]
target_os_only = True
target_os = [
"${target-constants.alt-os}"
]
target_cpu_only = True
target_cpu = [
"${target-constants.alt-arch}"
]
'';
in
runCommand "flutter-engine-source-${version}"
runCommand "flutter-engine-source-${version}-${buildPlatform.system}-${targetPlatform.system}"
{
pname = "flutter-engine-source";
inherit version;
nativeBuildInputs = [
curlMinimal
pkg-config
gitMinimal
cipd
tools.cipd
(python312.withPackages (
ps: with ps; [
httplib2
six
]
))
writableTmpDirAsHomeHook
];
env = {
@@ -68,26 +81,23 @@ runCommand "flutter-engine-source-${version}"
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = engineHash;
outputHash =
(hashes."${buildPlatform.system}" or { })."${targetPlatform.system}"
or (throw "Hash not set for ${targetPlatform.system} on ${buildPlatform.system}");
}
''
mkdir --parents source
cd source
cp ${gclient} .gclient
export PATH=$PATH:${depot_tools}
python3 ${depot_tools}/gclient.py sync --no-history --shallow --nohooks --jobs=$NIX_BUILD_CORES
rm --recursive --force engine/src/flutter/buildtools engine/src/flutter/third_party/dart/tools/sdks/dart-sdk engine/src/flutter/third_party/gn third_party/ninja
rm --recursive --force engine/src/flutter/third_party/swiftshader/.git
rm --recursive --force engine/src/flutter/third_party/swiftshader/tests
rm --recursive --force engine/src/flutter/third_party/swiftshader/docs
rm --recursive --force engine/src/flutter/third_party/swiftshader/infra
rm --recursive --force engine/src/flutter/third_party/swiftshader/.vscode
rm --recursive --force engine/src/flutter/third_party/swiftshader/llvm-16.0
rm --recursive --force engine/src/flutter/third_party/swiftshader/llvm-10.0
rm --recursive --force engine/src/flutter/third_party/llvm-project
find engine/src/flutter/third_party/swiftshader/third_party -type d \( -name "test" -o -name "tests" -o -name "unittests" \) -prune -exec rm --recursive --force {} +
find engine/src/flutter/third_party/swiftshader -type f \( -name "*.o" -o -name "*.a" -o -name "*.so" \) -delete
find . -type d \( -name ".git" -o -name ".cipd" \) -prune -exec rm --recursive --force {} +
find . -type f -name ".gclient*" -delete
cp --recursive . $out
source ${../../../../build-support/fetchgit/deterministic-git}
export -f clean_git
export -f make_deterministic_repo
mkdir --parents flutter
cp ${gclient} flutter/.gclient
cd flutter
export PATH=$PATH:${tools.depot_tools}
python3 ${tools.depot_tools}/gclient.py sync --no-history --shallow --nohooks -j $NIX_BUILD_CORES
mv engine $out
find $out -name '.git' -exec rm --recursive --force {} \; || true
rm --recursive $out/src/flutter/{buildtools,prebuilts,third_party/swiftshader,third_party/gn/.versions,third_party/dart/tools/sdks/dart-sdk}
''

View File

@@ -0,0 +1,103 @@
{
stdenv,
buildPlatform,
hostPlatform,
callPackage,
fetchgit,
fetchurl,
writeText,
runCommand,
darwin,
writeShellScriptBin,
depot_toolsCommit ? "580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7",
depot_toolsHash ? "sha256-k+XQSYJQYc9vAUjwrRxaAlX/sK74W45m5byS31hSpwc=",
cipdCommit ? "7120a6a515089a3ff5d1f61ff4ee17750dc038af",
cipdHashes ? {
"linux-386" = "sha256-CshLfw49uglvWNwWE4K7ucBUF+IZlXDaIQsTXtFEJ8U=";
"linux-amd64" = "sha256-rxpI+HqfZiOYvzyyQ9P93s70feDmrLgbm4Xh3o88LwQ=";
"linux-arm64" = "sha256-XTTKbw1Q2lin+pf7VADalpBy3AWMTEd7yItsE/pePxw=";
"linux-armv6l" = "sha256-e5qe2KcguRLPuAq6wOG7A3YghHHon+oHY3fRLhU+e9E=";
"linux-loong64" = "sha256-LPTK4Ly173jac+cSGrsWw0ajrWEYepeJDGtP/7Xh528=";
"linux-mips" = "sha256-nR5khvHbAijs0MEr8+UgbuHTRNQAsMOyGTU/DI3K5Os=";
"linux-mips64" = "sha256-4a/zD1CrC/sxtBHqSRpom0SYVoN38bz3FAM40OSdVI0=";
"linux-mips64le" = "sha256-JnfKuBGLHYNLnRieS0KV8sYaTjh2rbp1yijvNOrU0FE=";
"linux-mipsle" = "sha256-nWqoay8c4faRk2+G5TvwbsbnndjTU4oglOTfhSC+TLQ=";
"linux-ppc64" = "sha256-pjeI/bx0i+QchQLhNB88ACPI34SrFvvFA01F5Nb16Ys=";
"linux-ppc64le" = "sha256-ZDMDwrP1zYlOI1hdbd3iZwKr59v/8CWj2sZ1RdosAiE=";
"linux-riscv64" = "sha256-O2EvOnjwbNssB7FtbK44yFcXfkrh9HOsPs/HF+uD2m8=";
"linux-s390x" = "sha256-BKeNDtuc9IkmV4GpuZcdsGc2F039KQeLdozxh7u+FDw=";
"macos-amd64" = "sha256-ZKBm8PbKjg4t0jIBPRKAv85L8eZOwJ1wBvh3cRSqHOI=";
"macos-arm64" = "sha256-AvjJp7JF05CetYDnwNJneAsotm1vBHWqB/vCdcIohoU=";
"windows-386" = "sha256-AVLbWh+WtJKynFDS6IfhuvYudw4Ow9s6w2JyDWG/2CI=";
"windows-amd64" = "sha256-puAQhiPGuwzkElWiBdTRGWOaUR2AIP7Qv9S3pwEY74E=";
"windows-arm64" = "sha256-4wxOMG+zvkM7gjhAiQvvNqNS0AamKKJdaBM/+rRxgXk=";
},
}:
let
constants = callPackage ./constants.nix { platform = buildPlatform; };
host-constants = callPackage ./constants.nix { platform = hostPlatform; };
stdenv-constants = callPackage ./constants.nix { platform = stdenv.hostPlatform; };
in
{
depot_tools = fetchgit {
url = "https://chromium.googlesource.com/chromium/tools/depot_tools.git";
rev = depot_toolsCommit;
hash = depot_toolsHash;
};
cipd =
let
unwrapped =
runCommand "cipd-${cipdCommit}"
{
src = fetchurl {
name = "cipd-${cipdCommit}-unwrapped";
url = "https://chrome-infra-packages.appspot.com/client?platform=${stdenv-constants.platform}&version=git_revision:${cipdCommit}";
hash = cipdHashes.${stdenv-constants.platform};
};
}
''
mkdir --parents $out/bin
install --mode=0755 $src $out/bin/cipd
'';
in
writeShellScriptBin "cipd" ''
params=$@
if [[ "$1" == "ensure" ]]; then
shift 1
params="ensure"
while [ "$#" -ne 0 ]; do
if [[ "$1" == "-ensure-file" ]]; then
ensureFile="$2"
shift 2
params="$params -ensure-file $ensureFile"
sed -i 's/''${platform}/${host-constants.platform}/g' "$ensureFile"
sed -i 's/gn\/gn\/${stdenv-constants.platform}/gn\/gn\/${constants.platform}/g' "$ensureFile"
if grep flutter/java/openjdk "$ensureFile" >/dev/null; then
sed -i '/src\/flutter\/third_party\/java\/openjdk/,+2 d' "$ensureFile"
fi
else
params="$params $1"
shift 1
fi
done
fi
exec ${unwrapped}/bin/cipd $params
'';
vpython =
pythonPkg:
runCommand "vpython3" { } ''
mkdir --parents $out/bin
ln --symbolic ${pythonPkg}/bin/python $out/bin/vpython3
'';
xcode-select = writeShellScriptBin "xcode-select" ''
echo ${darwin.xcode}/Contents/Developer
'';
}

View File

@@ -1,74 +1,86 @@
{
buildDartApplication,
dart,
flutterSource,
lib,
patches,
pubspecLock,
runCommand,
stdenv,
version,
systemPlatform,
buildDartApplication,
runCommand,
writeTextFile,
git,
which,
writableTmpDirAsHomeHook,
dart,
version,
flutterSrc,
patches ? [ ],
pubspecLock,
engineVersion,
}:
let
dartEntryPoints = {
"flutter_tools.snapshot" = "bin/flutter_tools.dart";
# https://github.com/flutter/flutter/blob/17c92b7ba68ea609f4eb3405211d019c9dbc4d27/engine/src/flutter/tools/engine_tool/test/commands/stamp_command_test.dart#L125
engine_stamp = writeTextFile {
name = "engine_stamp";
text = builtins.toJSON {
build_date = "2025-06-27T12:30:00.000Z";
build_time_ms = 1751027400000;
git_revision = engineVersion;
git_revision_date = "2025-06-27T17:11:53-07:00";
content_hash = "1111111111111111111111111111111111111111";
};
};
dartEntryPoints."flutter_tools.snapshot" = "bin/flutter_tools.dart";
in
buildDartApplication.override { inherit dart; } (finalAttrs: {
__structuredAttrs = true;
strictDeps = true;
buildDartApplication.override { inherit dart; } {
pname = "flutter-tools";
inherit
version
patches
pubspecLock
dartEntryPoints
;
src = flutterSource;
sourceRoot = "${finalAttrs.src.name}/packages/flutter_tools";
inherit version dartEntryPoints;
dartOutputType = "jit-snapshot";
dartCompileFlags = [ "--define=NIX_FLUTTER_HOST_PLATFORM=${stdenv.hostPlatform.system}" ];
src = flutterSrc;
sourceRoot = "${flutterSrc.name}/packages/flutter_tools";
inherit patches;
# The given patches are made for the entire SDK source tree.
prePatch = ''
chmod --recursive u+w "../.."
pushd "../.."
'';
postPatch = ''
echo -n "${version}" > version
popd
''
# Use arm64 instead of arm64e.
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace lib/src/ios/xcodeproj.dart \
--replace-fail "arm64e" "arm64"
--replace-fail arm64e arm64
''
# need network
+ lib.optionalString (lib.versionAtLeast version "3.35.0") ''
cp ${engine_stamp} ../../bin/cache/engine_stamp.json
substituteInPlace lib/src/flutter_cache.dart \
--replace-fail "registerArtifact(FlutterEngineStamp(this, logger));" ""
'';
# When the JIT snapshot is being built, the application needs to run.
# It attempts to generate configuration files, and relies on a few external
# tools.
nativeBuildInputs = [
git
which
writableTmpDirAsHomeHook
];
preConfigure = ''
export FLUTTER_ROOT=$(realpath ../../)
export HOME=.
export FLUTTER_ROOT="$(realpath ../../)"
mkdir --parents "$FLUTTER_ROOT/bin/cache"
ln --symbolic "${dart}" "$FLUTTER_ROOT/bin/cache/dart-sdk"
ln --symbolic '${dart}' "$FLUTTER_ROOT/bin/cache/dart-sdk"
'';
dartCompileFlags = [ "--define=NIX_FLUTTER_HOST_PLATFORM=${systemPlatform}" ];
# The Dart wrapper launchers are useless for the Flutter tool - it is designed
# to be launched from a snapshot by the SDK.
postInstall = ''
rm "$out"/${builtins.concatStringsSep " " (builtins.attrNames dartEntryPoints)}
pushd "$out"
rm ${builtins.concatStringsSep " " (builtins.attrNames dartEntryPoints)}
popd
'';
sdkSourceBuilders = {
@@ -78,7 +90,7 @@ buildDartApplication.override { inherit dart; } (finalAttrs: {
runCommand "dart-sdk-${name}" { passthru.packageRoot = "."; } ''
for path in '${dart}/pkg/${name}'; do
if [ -d "$path" ]; then
ln --symbolic "$path" "$out"
ln -s "$path" "$out"
break
fi
done
@@ -89,4 +101,6 @@ buildDartApplication.override { inherit dart; } (finalAttrs: {
fi
'';
};
})
inherit pubspecLock;
}

View File

@@ -1,358 +1,221 @@
{
scope,
lib,
stdenv,
dart,
autoPatchelfHook,
flutterSource,
flutter-tools,
callPackage,
host-artifacts,
artifacts ? host-artifacts,
useNixpkgsEngine ? false,
version,
engineVersion,
channel,
dartVersion,
engineHashes ? { },
engineUrl ? "https://github.com/flutter/flutter.git@${engineVersion}",
enginePatches ? [ ],
engineRuntimeModes ? [
"release"
"debug"
],
engineSwiftShaderHash,
engineSwiftShaderRev,
patches,
channel,
dart,
src,
pubspecLock,
artifactHashes ? null,
lib,
stdenv,
callPackage,
makeWrapper,
darwin,
gitMinimal,
which,
jq,
unzip,
gnutar,
pkg-config,
atk,
cairo,
gdk-pixbuf,
glib,
gtk3,
harfbuzz,
libepoxy,
pango,
libx11,
xorgproto,
libdeflate,
zlib,
cmake,
ninja,
clang,
darwin,
cipd,
depot_tools,
wrapGAppsHook3,
writableTmpDirAsHomeHook,
fd,
cacert,
moreutils,
writeTextFile,
supportedTargetFlutterPlatforms,
extraPkgConfigPackages ? [ ],
extraLibraries ? [ ],
extraIncludes ? [ ],
extraCxxFlags ? [ ],
extraCFlags ? [ ],
extraLinkerFlags ? [ ],
}:
flutterTools ? null,
}@args:
let
appRuntimeDeps =
lib.optionals
(stdenv.hostPlatform.isLinux && (builtins.elem "linux" supportedTargetFlutterPlatforms))
[
atk
cairo
gdk-pixbuf
glib
gtk3
harfbuzz
libepoxy
pango
libx11
libdeflate
];
# Development packages required for compilation.
appBuildDeps =
let
# https://discourse.nixos.org/t/handling-transitive-c-dependencies/5942/3
deps =
pkg: lib.filter lib.isDerivation ((pkg.buildInputs or [ ]) ++ (pkg.propagatedBuildInputs or [ ]));
withKey = pkg: {
key = pkg.outPath;
val = pkg;
};
collect = pkg: lib.map withKey ([ pkg ] ++ deps pkg);
in
lib.map (e: e.val) (
lib.genericClosure {
startSet = lib.map withKey appRuntimeDeps;
operator = item: collect item.val;
engine =
if args.useNixpkgsEngine or false then
callPackage ./engine/default.nix {
inherit (args) dart;
dartSdkVersion = args.dart.version;
flutterVersion = version;
swiftshaderRev = engineSwiftShaderRev;
swiftshaderHash = engineSwiftShaderHash;
version = engineVersion;
hashes = engineHashes;
url = engineUrl;
patches = enginePatches;
runtimeModes = engineRuntimeModes;
}
);
else
null;
appStaticBuildDeps =
(lib.optionals
(stdenv.hostPlatform.isLinux && (builtins.elem "linux" supportedTargetFlutterPlatforms))
[
libx11
xorgproto
zlib
]
)
++ extraLibraries;
dart = if args.useNixpkgsEngine or false then engine.dart else args.dart;
# Tools used by the Flutter SDK to compile applications.
buildTools =
lib.optionals
(stdenv.hostPlatform.isLinux && (builtins.elem "linux" supportedTargetFlutterPlatforms))
[
pkg-config
cmake
ninja
clang
];
flutterTools =
args.flutterTools or (callPackage ./flutter-tools.nix {
inherit
dart
engineVersion
patches
pubspecLock
version
;
flutterSrc = src;
systemPlatform = stdenv.hostPlatform.system;
});
# Nix-specific compiler configuration.
pkgConfigPackages = map (lib.getOutput "dev") (appBuildDeps ++ extraPkgConfigPackages);
unwrapped = stdenv.mkDerivation {
name = "flutter-${version}-unwrapped";
inherit src patches version;
includeFlags = map (pkg: "-isystem ${lib.getOutput "dev" pkg}/include") (
appStaticBuildDeps ++ extraIncludes
);
nativeBuildInputs = [
makeWrapper
jq
gitMinimal
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
strictDeps = true;
linkerFlags =
(map (pkg: "-rpath,${lib.getOutput "lib" pkg}/lib") appRuntimeDeps) ++ extraLinkerFlags;
in
stdenv.mkDerivation (finalAttrs: {
__structuredAttrs = true;
strictDeps = true;
pname = "flutter";
inherit version patches;
src = flutterSource;
nativeBuildInputs = [
moreutils
makeWrapper
jq
unzip
gnutar
]
++
lib.optionals
(stdenv.hostPlatform.isLinux && (builtins.elem "linux" supportedTargetFlutterPlatforms))
[
wrapGAppsHook3
autoPatchelfHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
buildInputs = appRuntimeDeps;
postPatch = ''
patchShebangs --build ./bin/
patchShebangs packages/flutter_tools/bin
'';
preConfigure = ''
if [ "$(< bin/internal/engine.version)" != '${engineVersion}' ]; then
echo 1>&2 "The given engine version (${engineVersion}) does not match the version required by the Flutter SDK ($(< bin/internal/engine.version))."
exit 1
fi
'';
buildPhase = ''
runHook preBuild
mkdir --parents bin/cache
''
# Add a flutter_tools artifact stamp, and build a snapshot.
# This is the Flutter CLI application.
+ ''
echo "nixpkgs000000000000000000000000000000000" > bin/cache/flutter_tools.stamp
ln --symbolic ${flutter-tools}/share/flutter_tools.snapshot bin/cache/flutter_tools.snapshot
''
# Some of flutter_tools's dependencies contain static assets. The
# application attempts to read its own package_config.json to find these
# assets at runtime.
+ ''
mkdir --parents packages/flutter_tools/.dart_tool
ln --symbolic ${flutter-tools.pubcache}/package_config.json packages/flutter_tools/.dart_tool/package_config.json
''
+ lib.optionalString (lib.versionOlder version "3.33") ''
echo -n "${version}" > version
''
+ ''
cp ${
writeTextFile {
name = "flutter.version.json";
text = builtins.toJSON {
flutterVersion = version;
frameworkVersion = version;
channel = channel;
repositoryUrl = "https://github.com/flutter/flutter.git";
frameworkRevision = "nixpkgs000000000000000000000000000000000";
frameworkCommitDate = "1970-01-01 00:00:00";
engineRevision = engineVersion;
dartSdkVersion = dartVersion;
};
}
} bin/cache/flutter.version.json
jq --arg version "$(jq --raw-output .version ${dart}/bin/resources/devtools/version.json)" '. + {devToolsVersion: $version}' bin/cache/flutter.version.json | sponge bin/cache/flutter.version.json
echo "${engineVersion}" > bin/cache/engine.stamp
''
# Suppress a small error now that `.gradle`'s location changed.
# Location changed because of the patch "gradle-flutter-tools-wrapper.patch".
+ ''
mkdir --parents packages/flutter_tools/gradle/.gradle
runHook postBuild
'';
installPhase = ''
runHook preInstall
${lib.concatMapStrings (artifact: ''
${lib.optionalString (
artifact.target == "bin/cache/flutter_web_sdk"
) ''rm --recursive --force "$out/${artifact.target}"''}
${
if
(
(lib.hasSuffix ".zip" artifact.path)
|| (lib.hasSuffix ".tar.gz" artifact.path)
|| (lib.hasSuffix ".tgz" artifact.path)
)
then
''
temp_path=$(mktemp -d)
${lib.optionalString (lib.hasSuffix ".zip" artifact.path) ''unzip -o "${artifact.path}" -d "$temp_path"''}
${lib.optionalString (
(lib.hasSuffix ".tar.gz" artifact.path) || (lib.hasSuffix ".tgz" artifact.path)
) ''tar --extract --gzip --file "${artifact.path}" --directory "$temp_path"''}
''
else
''
temp_path="${artifact.path}"
''
}
content_count=$(ls --almost-all "$temp_path" | wc --lines)
target_path="$out/${artifact.target}"
if [ "$content_count" -eq 1 ] && [ ! -e "$target_path" ]; then
mkdir --parents "$(dirname "$target_path")"
cp --recursive --no-target-directory "$temp_path"/* "$target_path"
else
mkdir --parents "$target_path"
cp --recursive "$temp_path"/* "$target_path"/
preConfigure = ''
if [ "$(< bin/internal/engine.version)" != '${engineVersion}' ]; then
echo 1>&2 "The given engine version (${engineVersion}) does not match the version required by the Flutter SDK ($(< bin/internal/engine.version))."
exit 1
fi
chmod --recursive +w "$target_path"
if [ "${artifact.path}" != "$temp_path" ]; then
rm --recursive --force "$temp_path"
fi
'') artifacts}
cp --recursive . $out
ln --symbolic --force ${dart} $out/bin/cache/dart-sdk
''
# The regular launchers are designed to download/build/update SDK
# components, and are not very useful in Nix.
# Replace them with simple links and wrappers.
+ ''
rm $out/bin/{dart,flutter}
ln --symbolic ${lib.getExe dart} $out/bin/dart
for path in ${
builtins.concatStringsSep " " (
builtins.foldl' (
paths: pkg:
paths
++ (map (directory: "'${pkg}/${directory}/pkgconfig'") [
"lib"
"share"
])
) [ ] pkgConfigPackages
)
}; do
addToSearchPath FLUTTER_PKG_CONFIG_PATH "$path"
done
makeWrapper ${lib.getExe dart} $out/bin/flutter \
--set-default FLUTTER_ROOT $out \
--set-default ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \
--set FLUTTER_ALREADY_LOCKED true \
--suffix PATH : '${
lib.makeBinPath (
[
depot_tools
cipd
which
]
++ buildTools
)
}' \
--suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \
--suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \
--prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \
--prefix CFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCFlags)}' \
--prefix LDFLAGS "''\t" '${
builtins.concatStringsSep " " (map (flag: "-Wl,${flag}") linkerFlags)
}' \
''${gappsWrapperArgs[@]} \
--add-flags "--disable-dart-dev --packages='${flutter-tools.pubcache}/package_config.json' --root-certs-file='${cacert}/etc/ssl/certs/ca-bundle.crt' $out/bin/cache/flutter_tools.snapshot"
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
which
writableTmpDirAsHomeHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
installCheckPhase = ''
runHook preInstallCheck
$out/bin/flutter config --android-studio-dir $HOME
$out/bin/flutter config --android-sdk $HOME
$out/bin/flutter --version | fgrep --quiet '${builtins.substring 0 10 engineVersion}'
runHook postInstallCheck
'';
dontWrapGApps = true;
# https://github.com/flutter/engine/pull/28525
appendRunpaths = lib.optionals (
stdenv.hostPlatform.isLinux && (builtins.elem "linux" supportedTargetFlutterPlatforms)
) [ "$ORIGIN" ];
passthru = {
buildFlutterApplication = callPackage ./build-support/build-flutter-application.nix {
flutter = scope.flutter;
};
updateScript = ./update.py;
inherit scope;
inherit (scope) dart;
};
meta = {
description = "Makes it easy and fast to build beautiful apps for mobile and beyond";
longDescription = ''
Flutter is Google's SDK for crafting beautiful,
fast user experiences for mobile, web, and desktop from a single codebase.
'';
homepage = "https://flutter.dev";
license = lib.licenses.bsd3;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
mainProgram = "flutter";
maintainers = with lib.maintainers; [ ericdallo ];
teams = [ lib.teams.flutter ];
postPatch = ''
patchShebangs --build ./bin/
patchShebangs packages/flutter_tools/bin
'';
buildPhase = ''
runHook preBuild
''
# The flutter_tools package tries to run many Git commands. In most
# cases, unexpected output is handled gracefully, but commands are never
# expected to fail completely. A blank repository needs to be created.
+ ''
rm --recursive --force .git # Remove any existing Git directory
git init --initial-branch=nixpkgs
GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \
GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \
GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \
git commit --allow-empty --message="Initial commit"
(. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .)
''
+ ''
mkdir --parents bin/cache
# Add a flutter_tools artifact stamp, and build a snapshot.
# This is the Flutter CLI application.
echo "$(git rev-parse HEAD)" > bin/cache/flutter_tools.stamp
ln --symbolic '${flutterTools}/share/flutter_tools.snapshot' bin/cache/flutter_tools.snapshot
# Some of flutter_tools's dependencies contain static assets. The
# application attempts to read its own package_config.json to find these
# assets at runtime.
mkdir --parents packages/flutter_tools/.dart_tool
ln --symbolic '${flutterTools.pubcache}/package_config.json' packages/flutter_tools/.dart_tool/package_config.json
echo -n "${version}" > version
cat <<EOF > bin/cache/flutter.version.json
{
"devToolsVersion": "$(cat "${dart}/bin/resources/devtools/version.json" | jq --raw-output .version)",
"flutterVersion": "${version}",
"frameworkVersion": "${version}",
"channel": "${channel}",
"repositoryUrl": "https://github.com/flutter/flutter.git",
"frameworkRevision": "nixpkgs000000000000000000000000000000000",
"frameworkCommitDate": "1970-01-01 00:00:00",
"engineRevision": "${engineVersion}",
"dartSdkVersion": "${dart.version}"
}
EOF
# Suppress a small error now that `.gradle`'s location changed.
# Location changed because of the patch "gradle-flutter-tools-wrapper.patch".
mkdir --parents "$out/packages/flutter_tools/gradle/.gradle"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir --parents $out
cp --recursive . $out
rm --recursive --force $out/bin/cache/dart-sdk
ln --symbolic --force ${dart} $out/bin/cache/dart-sdk
# The regular launchers are designed to download/build/update SDK
# components, and are not very useful in Nix.
# Replace them with simple links and wrappers.
rm "$out/bin"/{dart,flutter}
ln --symbolic "$out/bin/cache/dart-sdk/bin/dart" "$out/bin/dart"
makeShellWrapper "$out/bin/dart" "$out/bin/flutter" \
--set-default FLUTTER_ROOT "$out" \
--set FLUTTER_ALREADY_LOCKED true \
--add-flags "--disable-dart-dev --packages='${flutterTools.pubcache}/package_config.json' \$NIX_FLUTTER_TOOLS_VM_OPTIONS $out/bin/cache/flutter_tools.snapshot"
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
which
writableTmpDirAsHomeHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
installCheckPhase = ''
runHook preInstallCheck
$out/bin/flutter config --android-studio-dir $HOME
$out/bin/flutter config --android-sdk $HOME
$out/bin/flutter --version | fgrep --quiet '${builtins.substring 0 10 engineVersion}'
runHook postInstallCheck
'';
passthru = {
# TODO: rely on engine.version instead of engineVersion
inherit
dart
engineVersion
artifactHashes
channel
;
tools = flutterTools;
# The derivation containing the original Flutter SDK files.
# When other derivations wrap this one, any unmodified files
# found here should be included as-is, for tooling compatibility.
sdk = unwrapped;
}
// lib.optionalAttrs (engine != null) {
inherit engine;
};
meta = {
broken = (lib.versionOlder version "3.32") && useNixpkgsEngine;
description = "Makes it easy and fast to build beautiful apps for mobile and beyond";
longDescription = ''
Flutter is Google's SDK for crafting beautiful,
fast user experiences for mobile, web, and desktop from a single codebase.
'';
homepage = "https://flutter.dev";
license = lib.licenses.bsd3;
sourceProvenance =
with lib.sourceTypes;
if useNixpkgsEngine then [ fromSource ] else [ binaryNativeCode ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
mainProgram = "flutter";
maintainers = with lib.maintainers; [
ericdallo
];
teams = [ lib.teams.flutter ];
};
};
})
in
unwrapped

View File

@@ -1,302 +0,0 @@
{
lib,
stdenv,
constants,
engineVersion,
artifactHashes,
useNixpkgsEngine,
engines,
fetchurl,
hostPlatform ? stdenv.hostPlatform,
supportedTargetFlutterPlatforms,
}:
let
hostConstants = constants.makeConstants hostPlatform;
engineBaseUrl = "https://storage.googleapis.com/flutter_infra_release/flutter/${engineVersion}/";
baseUrl = "https://storage.googleapis.com/flutter_infra_release/";
getUrl =
path:
if
(
lib.hasPrefix "flutter/" path
|| lib.hasPrefix "gradle-" path
|| lib.hasPrefix "ios-usb-dependencies" path
)
then
baseUrl + path
else
engineBaseUrl + path;
artifacts = {
universal = [
{
path = "flutter/fonts/3012db47f3130e62f7cc0beabff968a33cbec8d8/fonts.zip";
target = "bin/cache/artifacts/material_fonts";
hash = "sha256-5W+o6btFif3pZL495FHz5bJR5KHq+x3JjZSt0DTdWoY=";
}
{
path = "gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz";
target = "bin/cache/artifacts/gradle_wrapper";
hash = "sha256-MelCi68aKy9IXxEQxYmfhSZJsz1Goumwf50XdS1QGQo=";
}
{
path = "sky_engine.zip";
target = "bin/cache/pkg";
}
{
path = "flutter_gpu.zip";
target = "bin/cache/pkg";
}
{
path = "flutter_patched_sdk.zip";
target = "bin/cache/artifacts/engine/common";
}
{
path = "flutter_patched_sdk_product.zip";
target = "bin/cache/artifacts/engine/common";
}
{
path = "${hostPlatform.parsed.kernel.name}-${
if hostPlatform.isWindows then "x64" else hostConstants.alt-arch
}/artifacts.zip";
target = "bin/cache/artifacts/engine/${hostPlatform.parsed.kernel.name}-${
if (hostPlatform.isDarwin || hostPlatform.isWindows) then "x64" else hostConstants.alt-arch
}";
}
{
path = "${hostPlatform.parsed.kernel.name}-${
if hostPlatform.isWindows then "x64" else hostConstants.alt-arch
}/font-subset.zip";
target = "bin/cache/artifacts/engine/${hostPlatform.parsed.kernel.name}-${
if (hostPlatform.isDarwin || hostPlatform.isWindows) then "x64" else hostConstants.alt-arch
}";
}
];
web = [
{
path = "flutter-web-sdk.zip";
target = "bin/cache/flutter_web_sdk";
}
];
linux = [
{
path = "linux-${hostConstants.alt-arch}/artifacts.zip";
target = "bin/cache/artifacts/engine/linux-${hostConstants.alt-arch}";
}
{
path = "linux-${hostConstants.alt-arch}-debug/linux-${hostConstants.alt-arch}-flutter-gtk.zip";
target = "bin/cache/artifacts/engine/linux-${hostConstants.alt-arch}";
}
{
path = "linux-${hostConstants.alt-arch}-profile/linux-${hostConstants.alt-arch}-flutter-gtk.zip";
target = "bin/cache/artifacts/engine/linux-${hostConstants.alt-arch}-profile";
}
{
path = "linux-${hostConstants.alt-arch}-release/linux-${hostConstants.alt-arch}-flutter-gtk.zip";
target = "bin/cache/artifacts/engine/linux-${hostConstants.alt-arch}-release";
}
];
# arm64?
windows = [
{
path = "windows-x64/artifacts.zip";
target = "bin/cache/artifacts/engine/windows-x64";
}
{
path = "windows-x64-debug/windows-x64-flutter.zip";
target = "bin/cache/artifacts/engine/windows-x64";
}
{
path = "windows-x64/flutter-cpp-client-wrapper.zip";
target = "bin/cache/artifacts/engine/windows-x64";
}
{
path = "windows-x64-profile/windows-x64-flutter.zip";
target = "bin/cache/artifacts/engine/windows-x64-profile";
}
{
path = "windows-x64-release/windows-x64-flutter.zip";
target = "bin/cache/artifacts/engine/windows-x64-release";
}
];
macos = [
{
path = "darwin-x64/framework.zip";
target = "bin/cache/artifacts/engine/darwin-x64";
}
{
path = "darwin-x64/gen_snapshot.zip";
target = "bin/cache/artifacts/engine/darwin-x64";
}
{
path = "darwin-x64-profile/artifacts.zip";
target = "bin/cache/artifacts/engine/darwin-x64-profile";
}
{
path = "darwin-x64-profile/framework.zip";
target = "bin/cache/artifacts/engine/darwin-x64-profile";
}
{
path = "darwin-x64-profile/gen_snapshot.zip";
target = "bin/cache/artifacts/engine/darwin-x64-profile";
}
{
path = "darwin-x64-release/artifacts.zip";
target = "bin/cache/artifacts/engine/darwin-x64-release";
}
{
path = "darwin-x64-release/framework.zip";
target = "bin/cache/artifacts/engine/darwin-x64-release";
}
{
path = "darwin-x64-release/gen_snapshot.zip";
target = "bin/cache/artifacts/engine/darwin-x64-release";
}
{
path = "darwin-${hostConstants.alt-arch}/artifacts.zip";
target = "bin/cache/artifacts/engine/darwin-x64";
}
];
ios = [
{
path = "ios/artifacts.zip";
target = "bin/cache/artifacts/engine/ios";
}
{
path = "ios-profile/artifacts.zip";
target = "bin/cache/artifacts/engine/ios-profile";
}
{
path = "ios-release/artifacts.zip";
target = "bin/cache/artifacts/engine/ios-release";
}
{
path = "ios-usb-dependencies/libimobiledevice/0bf0f9e941c85d06ce4b5909d7a61b3a4f2a6a05/libimobiledevice.zip";
target = "bin/cache/artifacts/libimobiledevice";
hash = "sha256-EPzWDY5SYegep6DB9ESd/ApklzLtE8reEllMUPzmkLg=";
}
{
path = "ios-usb-dependencies/libusbmuxd/19d6bec393c9f9b31ccb090059f59268da32e281/libusbmuxd.zip";
target = "bin/cache/artifacts/libusbmuxd";
hash = "sha256-RQT0Kq8rKKgokp1haASMZ8K84+M2ZbaJcs/MunZ7/L0=";
}
{
path = "ios-usb-dependencies/libplist/cf5897a71ea412ea2aeb1e2f6b5ea74d4fabfd8c/libplist.zip";
target = "bin/cache/artifacts/libplist";
hash = "sha256-cx5758EQb/0SkrVusXGFzH2dUChzFd5dFpMKxlxKbS8=";
}
{
path = "ios-usb-dependencies/openssl/22dbb176deef7d9a80f5c94f57a4b518ea935f50/openssl.zip";
target = "bin/cache/artifacts/openssl";
hash = "sha256-erz3j0oIZm2IqvFD41APkTgz7YZaaDReokMwGhFCsmA=";
}
{
path = "ios-usb-dependencies/libimobiledeviceglue/050ff3bf8fdab6ce53a2ddc6ae49b11b1c02a168/libimobiledeviceglue.zip";
target = "bin/cache/artifacts/libimobiledeviceglue";
hash = "sha256-4rXsfBxIaByVcIuzs05G5RergFZrgaBs1XBmu7ibwAA=";
}
{
path = "ios-usb-dependencies/ios-deploy/7a29ab0b6d611f2bf5de4b6f929a82a091866307/ios-deploy.zip";
target = "bin/cache/artifacts/ios-deploy";
hash = "sha256-1p6agbzur4xFai4ZzzjHp4ZvRv+VWcPygBgBYQdQ2Vw=";
}
];
android = [
{
path = "android-x86/artifacts.zip";
target = "bin/cache/artifacts/engine/android-x86";
}
{
path = "android-x64/artifacts.zip";
target = "bin/cache/artifacts/engine/android-x64";
}
{
path = "android-arm/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm";
}
{
path = "android-arm-profile/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm-profile";
}
{
path = "android-arm-release/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm-release";
}
{
path = "android-arm64/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm64";
}
{
path = "android-arm64-profile/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm64-profile";
}
{
path = "android-arm64-release/artifacts.zip";
target = "bin/cache/artifacts/engine/android-arm64-release";
}
{
path = "android-x64-profile/artifacts.zip";
target = "bin/cache/artifacts/engine/android-x64-profile";
}
{
path = "android-x64-release/artifacts.zip";
target = "bin/cache/artifacts/engine/android-x64-release";
}
{
path = "android-arm-profile/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-arm-profile/${hostPlatform.parsed.kernel.name}-x64";
}
{
path = "android-arm-release/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-arm-release/${hostPlatform.parsed.kernel.name}-x64";
}
{
path = "android-arm64-profile/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-arm64-profile/${hostPlatform.parsed.kernel.name}-x64";
}
{
path = "android-arm64-release/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-arm64-release/${hostPlatform.parsed.kernel.name}-x64";
}
{
path = "android-x64-profile/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-x64-profile/${hostPlatform.parsed.kernel.name}-x64";
}
{
path = "android-x64-release/${hostPlatform.parsed.kernel.name}-x64.zip";
target = "bin/cache/artifacts/engine/android-x64-release/${hostPlatform.parsed.kernel.name}-x64";
}
];
};
in
(lib.unique (
lib.map (
artifact:
let
artifactName = lib.removeSuffix ".${lib.last (lib.splitString "." artifact.path)}" artifact.path;
artifactNameUnderscore = lib.replaceStrings [ "-" "/" ] [ "_M_" "_S_" ] artifactName;
useEngineOutput = useNixpkgsEngine && (builtins.elem artifactNameUnderscore engines.outputs);
in
{
path =
if useEngineOutput then
engines.${artifactNameUnderscore}
else
fetchurl {
url = getUrl artifact.path;
hash = artifactHashes.${artifact.path} or artifact.hash or "";
};
target = artifact.target;
id = artifact.path;
}
) (lib.concatMap (x: artifacts.${x}) supportedTargetFlutterPlatforms)
))

View File

@@ -1,22 +0,0 @@
--- a/packages/flutter_tools/lib/src/reporting/usage.dart
+++ b/packages/flutter_tools/lib/src/reporting/usage.dart
@@ -218,7 +218,7 @@
if (globals.platform.environment.containsKey('FLUTTER_HOST')) {
analytics.setSessionValue('aiid', globals.platform.environment['FLUTTER_HOST']);
}
- analytics.analyticsOpt = AnalyticsOpt.optOut;
+ analytics.analyticsOpt = AnalyticsOpt.optIn;
}
return _DefaultUsage._(
--- a/packages/flutter_tools/lib/src/reporting/first_run.dart
+++ b/packages/flutter_tools/lib/src/reporting/first_run.dart
@@ -37,6 +37,8 @@
║ See Google's privacy policy: ║
║ https://policies.google.com/privacy ║
╚════════════════════════════════════════════════════════════════════════════╝
+nixpkgs overrides: reporting is disabled by default. Opt-out is not a sent event.
+Run 'flutter config --analytics' to opt in to reports.
''';
/// The first run messenger determines whether the first run license terms

View File

@@ -1,18 +0,0 @@
flutter defines a list of pointer kinds that can scroll the screen.
however, it does not bother recognizing the pointer kind on linux,
so every pointer is set to be recognized as mouse. effectively, touch
can't scroll anything. this workarounds the issue by making mouse
one of the "touch-like device types".
Bug: https://github.com/flutter/flutter/issues/63209
--- a/packages/flutter/lib/src/widgets/scroll_configuration.dart
+++ b/packages/flutter/lib/src/widgets/scroll_configuration.dart
@@ -25,6 +25,7 @@
// The VoiceAccess sends pointer events with unknown type when scrolling
// scrollables.
PointerDeviceKind.unknown,
+ PointerDeviceKind.mouse,
};
/// The default overscroll indicator applied on [TargetPlatform.android].

View File

@@ -1,105 +0,0 @@
{
dart,
dart-bin,
fetchFromGitHub,
fetchgit,
lib,
newScope,
stdenv,
engineRuntimeModes ? [
"release"
"debug"
"profile"
],
supportedTargetFlutterPlatforms ? [
"universal"
"web"
]
++ (lib.optionals (stdenv.hostPlatform.isLinux) [ "linux" ])
++ (lib.optionals (stdenv.hostPlatform.isx86_64) [ "android" ])
++ (lib.optionals stdenv.hostPlatform.isDarwin [
"macos"
"ios"
]),
}:
versionData:
lib.makeScope newScope (
self:
versionData
// {
inherit supportedTargetFlutterPlatforms;
constants = self.callPackage ./constants.nix { };
depot_tools = fetchgit {
url = "https://chromium.googlesource.com/chromium/tools/depot_tools.git";
rev = "a0e694f18f15b364d2f9c23c4dde396bfc973fd1";
postFetch = ''
substituteInPlace $out/gerrit_util.py \
--replace-fail "import httplib2.socks" "httplib2.socks = None"
substituteInPlace $out/gerrit_util.py \
--replace-fail "httplib2.socks.socksocket._socksocket__rewriteproxy = __fixed_rewrite_proxy" "pass"
substituteInPlace $out/gerrit_util.py \
--replace-fail "httplib2.socks.PROXY_TYPE_HTTP_NO_TUNNEL" "3"
'';
hash = "sha256-N9xBfLS8DnBjOD149EOu5pr8ffBOb39vebhFUwPBllc=";
};
flutterSource = fetchFromGitHub {
owner = "flutter";
repo = "flutter";
tag = self.version;
hash = self.flutterHash;
};
dart =
let
hash =
self.dartHash.${
if (stdenv.hostPlatform.isLinux && (lib.versionAtLeast self.version "3.41")) then
"linux"
else
stdenv.hostPlatform.system
} or (throw "No dart hash for ${stdenv.hostPlatform.system}");
in
(if (lib.versionAtLeast self.version "3.41") then dart else dart-bin).overrideAttrs (oldAttrs: {
version = self.dartVersion;
src = oldAttrs.src.overrideAttrs (_: {
version = self.dartVersion;
outputHash = hash;
});
});
cipd = self.callPackage ./cipd.nix { };
engine = self.callPackage ./engine/default.nix { };
engines =
let
enginePackages = map (
runtimeMode: self.callPackage ./engine/default.nix { runtimeMode = runtimeMode; }
) engineRuntimeModes;
outputs = lib.unique (builtins.concatMap (e: e.outputs) enginePackages);
mergedOutputs = lib.genAttrs outputs (
outputName:
let
found = lib.findFirst (e: e ? ${outputName}) null enginePackages;
in
found.${outputName}
);
in
mergedOutputs
// {
inherit outputs;
};
host-artifacts = self.callPackage ./host-artifacts.nix { };
all-artifacts = self.callPackage ./all-artifacts.nix { };
flutter-tools = self.callPackage ./flutter-tools.nix { };
flutter = self.callPackage ./flutter.nix { scope = self; };
}
)

View File

@@ -0,0 +1,65 @@
{
symlinkJoin,
makeWrapper,
}:
flutter:
let
self = symlinkJoin {
inherit (flutter) pname;
name = "${flutter.name}-sdk-links";
paths = [
flutter
flutter.cacheDir
flutter.sdk
];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/flutter" \
--set-default FLUTTER_ROOT "$out"
# symlinkJoin seems to be missing the .git directory for some reason.
if [ -d '${flutter.sdk}/.git' ]; then
ln --symbolic '${flutter.sdk}/.git' "$out"
fi
# For iOS/macOS builds, *.xcframework/'s from the pre-built
# artifacts are copied into each built app. However, the symlinkJoin
# means that the *.xcframework's contain symlinks into the nix store,
# which causes issues when actually running the apps.
#
# We'll fix this by only linking to an outer *.xcframework dir instead
# of trying to symlinkJoin the files inside the *.xcframework.
artifactsDir="$out/bin/cache/artifacts/engine"
shopt -s globstar
for file in "$artifactsDir"/**/*.xcframework/Info.plist; do
# Get the unwrapped path from the Info.plist inside each .xcframework
origFile="$(readlink -f "$file")"
origFrameworkDir="$(dirname "$origFile")"
# Remove the symlinkJoin .xcframework dir and replace it with a symlink
# to the unwrapped .xcframework dir.
frameworkDir="$(dirname "$file")"
rm --recursive "$frameworkDir"
ln --symbolic "$origFrameworkDir" "$frameworkDir"
done
shopt -u globstar
'';
passthru = flutter.passthru // {
# Update the SDK attribute.
# This allows any modified SDK files to be included
# in future invocations.
sdk = self;
};
meta = flutter.meta // {
longDescription = ''
${flutter.meta.longDescription}
Modified binaries are linked into the original SDK directory for use with tools that use the whole SDK.
'';
};
};
in
self

View File

@@ -1,358 +0,0 @@
#!/usr/bin/env nix-shell
# !nix-shell -i python3 -p python3Packages.pyyaml nix-update dart
import argparse
import json
import logging
import shutil
import stat
import subprocess
import sys
import tempfile
import urllib.request
from pathlib import Path
from typing import Any, NoReturn
import yaml
FLUTTER_RELEASES_URL = (
"https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json"
)
logging.basicConfig(
level=logging.INFO,
format="%(levelname)s: %(message)s",
stream=sys.stderr,
)
logger = logging.getLogger(__name__)
def fatal_error(msg: str) -> NoReturn:
logger.error(msg)
sys.exit(1)
def run_command(cmd: list[str], cwd: Path | None = None) -> str:
try:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
cwd=cwd,
check=True,
)
return result.stdout.strip()
except subprocess.CalledProcessError as e:
fatal_error(f"Command failed: {' '.join(cmd)}\n{e.stderr.strip()}")
def fetch_url(url: str) -> bytes:
with urllib.request.urlopen(url, timeout=30) as response:
return response.read()
def get_nixpkgs_root() -> Path:
return Path(run_command(["git", "rev-parse", "--show-toplevel"]))
def run_nix_eval(cmds: list[str]) -> str:
return run_command(["nix", "eval", "--json", "--impure", *cmds])
def run_nix_prefetch(url: str, unpack: bool = False) -> str:
args = ["nix", "store", "prefetch-file", "--json"]
if unpack:
args.append("--unpack")
args.append(url)
output = run_command(args)
hash_value = json.loads(output).get("hash")
if not hash_value:
fatal_error(f"No hash in prefetch output: {output}")
return hash_value
def get_version_str(flutter_version: str) -> str:
return "_".join(flutter_version.split(".")[:2])
def requires_engine_hash(flutter_version: str) -> bool:
parts = flutter_version.split(".")
if len(parts) < 2:
return False
major, minor = int(parts[0]), int(parts[1])
return major > 3 or (major == 3 and minor >= 41)
def get_version_data(
target_version: str | None = None, channel: str | None = None
) -> tuple[str, str, str, str]:
channel = channel or "stable"
releases_data = json.loads(fetch_url(FLUTTER_RELEASES_URL).decode("utf-8"))
if not target_version:
release_hash = releases_data["current_release"].get(channel)
if not release_hash:
fatal_error(f"Channel '{channel}' not found in current releases")
release = next(
(r for r in releases_data["releases"] if r["hash"] == release_hash),
None,
)
else:
release = next(
(r for r in releases_data["releases"] if r["version"] == target_version),
None,
)
if not release:
fatal_error(f"Version {target_version or 'latest'} not found in '{channel}'")
target_version = release["version"]
release_hash = release["hash"]
dart_version = release.get("dart_sdk_version")
if not dart_version:
fatal_error(f"No dart_sdk_version found for {target_version}")
if " " in dart_version:
dart_version = dart_version.split(" ")[2].strip("()")
engine_url = f"https://github.com/flutter/flutter/raw/{release_hash}/bin/internal/engine.version"
engine_version = fetch_url(engine_url).decode("utf-8").strip()
return target_version, engine_version, dart_version, channel
def extract_nix_url(output: str) -> str:
try:
urls = json.loads(output)
return urls[0] if isinstance(urls, list) and urls else ""
except json.JSONDecodeError:
return output.strip('[]"').replace("\\", "")
def get_dart_hashes(flutter_version: str) -> dict[str, str]:
version_str = get_version_str(flutter_version)
platforms = ["x86_64-darwin", "aarch64-darwin"]
if not requires_engine_hash(flutter_version):
platforms += ["x86_64-linux", "aarch64-linux"]
dart_hashes = {}
for system in platforms:
cmds = [
"--file",
".",
f"flutterPackages-bin.v{version_str}.passthru.scope.dart.src.drvAttrs.urls",
"--system",
system,
]
output = run_nix_eval(cmds)
url = extract_nix_url(output)
if not url:
fatal_error(f"No Dart SDK URL found for {system}")
dart_hashes[system] = run_nix_prefetch(url)
return dart_hashes
def get_flutter_hash(flutter_version: str) -> str:
version_str = get_version_str(flutter_version)
cmds = [
"--file",
".",
f"flutterPackages-bin.v{version_str}.passthru.scope.flutterSource.drvAttrs.urls",
]
output = run_nix_eval(cmds)
url = extract_nix_url(output)
if not url:
fatal_error(f"No Flutter source URL found for {flutter_version}")
return run_nix_prefetch(url, unpack=True)
def get_artifact_hashes(flutter_version: str, engine_version: str) -> dict[str, str]:
version_str = get_version_str(flutter_version)
nixpkgs_root = get_nixpkgs_root()
expr = (
f"let pkgs = import {nixpkgs_root} {{ }}; "
"in (builtins.map (x: x.path.url) "
f'pkgs.flutterPackages-bin."v{version_str}".passthru.scope.all-artifacts)'
)
output = run_nix_eval(["--expr", expr])
artifacts = json.loads(output)
if not isinstance(artifacts, list):
fatal_error("Artifacts is not a list")
artifact_hashes = {}
for url in artifacts:
if engine_version not in url:
continue
path_parts = url.split("/")
hash_idx = path_parts.index(engine_version)
path_key = "/".join(path_parts[hash_idx + 1 :])
if path_key not in artifact_hashes:
artifact_hashes[path_key] = run_nix_prefetch(url)
return artifact_hashes
def get_pubspec_lock(flutter_version: str) -> dict[str, Any]:
version_str = get_version_str(flutter_version)
target = f".#flutterPackages-bin.v{version_str}.scope.flutterSource"
flutter_src_str = run_command([
"nix",
"build",
"--no-link",
"--print-out-paths",
target,
])
if not flutter_src_str:
fatal_error(f"No Flutter source path found for {flutter_version}")
flutter_src = Path(flutter_src_str)
with tempfile.TemporaryDirectory(prefix="flutter_src_") as temp_dir_name:
temp_dir = Path(temp_dir_name)
flutter_copy = temp_dir / "flutter"
shutil.copytree(flutter_src, flutter_copy, symlinks=False)
for path_item in flutter_copy.rglob("*"):
path_item.chmod(path_item.stat().st_mode | stat.S_IWUSR)
flutter_copy.chmod(flutter_copy.stat().st_mode | stat.S_IWUSR)
flutter_tools_path = flutter_copy / "packages" / "flutter_tools"
if not flutter_tools_path.exists():
fatal_error(f"flutter_tools not found at {flutter_tools_path}")
run_command(["dart", "pub", "get"], cwd=flutter_tools_path)
pubspec_lock_path = flutter_tools_path / "pubspec.lock"
if not pubspec_lock_path.exists():
fatal_error(f"pubspec.lock not found at {pubspec_lock_path}")
with pubspec_lock_path.open("r", encoding="utf-8") as f:
return yaml.safe_load(f)
def save_json(data: dict[str, Any], output_path: Path) -> None:
output_path.parent.mkdir(parents=True, exist_ok=True)
with output_path.open("w", encoding="utf-8") as f:
json.dump(data, f, indent=2, sort_keys=True)
f.write("\n")
def main() -> None:
parser = argparse.ArgumentParser(
description="Update Flutter data.json for nixpkgs",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
"--version",
type=str,
help="Specific Flutter version (e.g., 3.41.4). Uses latest from channel if omitted.",
)
parser.add_argument(
"--channel",
type=str,
default="stable",
choices=["stable", "beta"],
help="Release channel (default: stable)",
)
args = parser.parse_args()
logger.info("Fetching version data...")
flutter_version, engine_version, dart_version, channel = get_version_data(
args.version, args.channel
)
logger.info(f"Target Flutter Version: {flutter_version}")
logger.info(f"Engine Version (commit): {engine_version}")
logger.info(f"Dart Version: {dart_version}")
version_str = get_version_str(flutter_version)
version_dir = Path(__file__).resolve().parent / "versions" / version_str
output_path = version_dir / "data.json"
has_engine_hash = requires_engine_hash(flutter_version)
data = {
"version": flutter_version,
"engineVersion": engine_version,
"channel": channel,
"dartVersion": dart_version,
"dartHash": {},
"flutterHash": "",
"artifactHashes": {},
"pubspecLock": {},
}
save_json(data, output_path)
logger.info("Fetching Dart hashes...")
data["dartHash"] = get_dart_hashes(flutter_version)
if has_engine_hash:
data["dartHash"]["linux"] = (
"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
)
save_json(data, output_path)
logger.info("Running nix-update for dart hash...")
run_command([
"nix-update",
"--version",
"skip",
"--override-filename",
str(output_path),
f"flutterPackages-source.v{version_str}.passthru.scope.dart",
])
with output_path.open("r", encoding="utf-8") as f:
updated_data = json.load(f)
data["dartHash"]["linux"] = updated_data.get("dartHash")["linux"]
data["engineHash"] = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
save_json(data, output_path)
logger.info("Running nix-update for engine hash...")
run_command([
"nix-update",
"--version",
"skip",
"--override-filename",
str(output_path),
f"flutterPackages-source.v{version_str}.passthru.scope.engine",
])
with output_path.open("r", encoding="utf-8") as f:
updated_data = json.load(f)
data["engineHash"] = updated_data.get("engineHash")
logger.info("Fetching Flutter source hash...")
data["flutterHash"] = get_flutter_hash(flutter_version)
logger.info("Fetching artifact hashes...")
data["artifactHashes"] = get_artifact_hashes(flutter_version, engine_version)
save_json(data, output_path)
logger.info("Generating pubspec.lock...")
data["pubspecLock"] = get_pubspec_lock(flutter_version)
save_json(data, output_path)
logger.info(f"Update complete. Data written to {output_path}")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,44 @@
{
callPackage,
flutterPackages,
lib,
symlinkJoin,
}:
let
nixpkgsRoot = "@nixpkgs_root@";
flutterCompactVersion = "@flutter_compact_version@";
flutterPlatforms = [
"android"
"ios"
"web"
"linux"
"windows"
"macos"
"fuchsia"
"universal"
];
systemPlatforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
derivations = lib.foldl' (
acc: flutterPlatform:
acc
++ (map (
systemPlatform:
callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix" {
flutter = flutterPackages."v${flutterCompactVersion}";
inherit flutterPlatform systemPlatform;
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
}
) systemPlatforms)
) [ ] flutterPlatforms;
in
symlinkJoin {
name = "evaluate-derivations";
paths = derivations;
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchurl,
}:
let
dartVersion = "@dart_version@";
system =
{
x86_64-linux = "linux-x64";
aarch64-linux = "linux-arm64";
x86_64-darwin = "macos-x64";
aarch64-darwin = "macos-arm64";
}
."@platform@";
in
fetchurl {
url = "https://storage.googleapis.com/dart-archive/channels/${
if lib.strings.hasSuffix ".beta" dartVersion then "beta" else "stable"
}/release/${dartVersion}/sdk/dartsdk-${system}-release.zip";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
}

View File

@@ -0,0 +1,36 @@
{
callPackage,
symlinkJoin,
lib,
}:
let
nixpkgsRoot = "@nixpkgs_root@";
version = "@flutter_version@";
engineVersion = "@engine_version@";
systemPlatforms = [
"x86_64-linux"
"aarch64-linux"
];
derivations = lib.foldl' (
acc: buildPlatform:
acc
++ (map (
targetPlatform:
callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/engine/source.nix" {
targetPlatform = lib.systems.elaborate targetPlatform;
hostPlatform = lib.systems.elaborate buildPlatform;
buildPlatform = lib.systems.elaborate buildPlatform;
flutterVersion = version;
version = engineVersion;
url = "https://github.com/flutter/flutter.git@${engineVersion}";
hashes."${buildPlatform}"."${targetPlatform}" = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
}
) systemPlatforms)
) [ ] systemPlatforms;
in
symlinkJoin {
name = "evaluate-derivations";
paths = derivations;
}

View File

@@ -0,0 +1,10 @@
{ fetchgit }:
fetchgit {
url = "https://swiftshader.googlesource.com/SwiftShader.git";
rev = "@engine_swiftshader_rev@";
# Keep with in sync of pkgs/development/compilers/flutter/engine/package.nix
postFetch = ''
rm -rf $out/third_party/llvm-project
'';
}

View File

@@ -0,0 +1,7 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "flutter";
repo = "flutter";
tag = "@flutter_version@";
hash = "@hash@";
}

View File

@@ -0,0 +1,40 @@
{
flutterPackages,
stdenv,
cacert,
writableTmpDirAsHomeHook,
}:
let
flutterCompactVersion = "@flutter_compact_version@";
inherit (flutterPackages."v${flutterCompactVersion}") dart;
in
stdenv.mkDerivation (finalAttrs: {
name = "pubspec-lock";
src = @flutter_src@;
nativeBuildInputs = [
dart
writableTmpDirAsHomeHook
];
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "@hash@";
buildPhase = ''
runHook preBuild
cd packages/flutter_tools
dart --root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt pub get
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp pubspec.lock $out
runHook postInstall
'';
})

View File

@@ -0,0 +1,501 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3Packages.pyyaml
import argparse
import json
import os
import re
import subprocess
import sys
import tempfile
import urllib.request
from pathlib import Path
import yaml
FAKE_HASH = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
NIXPKGS_ROOT = (
subprocess.Popen(
["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE, text=True
)
.communicate()[0]
.strip()
)
def load_code(name, **kwargs):
with Path(
f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/update/{name}.in"
).open("r", encoding="utf-8") as f:
code = f.read()
for key, value in kwargs.items():
code = code.replace(f"@{key}@", value)
return code
# Return out paths
def nix_build(code):
with tempfile.NamedTemporaryFile(mode="w", encoding="utf-8", delete=False) as temp:
temp.write(code)
temp.flush()
os.fsync(temp.fileno())
temp_name = temp.name
process = subprocess.Popen(
[
"nix-build",
"--impure",
"--no-out-link",
"--expr",
f"with import {NIXPKGS_ROOT} {{}}; callPackage {temp_name} {{}}",
],
stdout=subprocess.PIPE,
text=True,
)
process.wait()
Path(temp_name).unlink() # Clean up the temporary file
return process.stdout.read().strip().splitlines()[0]
# Return errors
def nix_build_to_fail(code):
with tempfile.NamedTemporaryFile(mode="w", encoding="utf-8", delete=False) as temp:
temp.write(code)
temp.flush()
os.fsync(temp.fileno())
temp_name = temp.name
process = subprocess.Popen(
[
"nix-build",
"--impure",
"--keep-going",
"--no-link",
"--expr",
f"with import {NIXPKGS_ROOT} {{}}; callPackage {temp_name} {{}}",
],
stderr=subprocess.PIPE,
text=True,
)
stderr = ""
while True:
line = process.stderr.readline()
if not line:
break
stderr += line
print(line.strip())
process.wait()
Path(temp_name).unlink() # Clean up the temporary file
return stderr
def get_engine_hashes(engine_version, flutter_version):
code = load_code(
"get-engine-hashes.nix",
nixpkgs_root=NIXPKGS_ROOT,
flutter_version=flutter_version,
engine_version=engine_version,
)
stderr = nix_build_to_fail(code)
pattern = re.compile(
rf"/nix/store/.*-flutter-engine-source-{engine_version}-(.+?-.+?)-(.+?-.+?).drv':\n\s+specified: .*\n\s+got:\s+(.+?)\n"
)
matches = pattern.findall(stderr)
result_dict = {}
for match in matches:
flutter_platform, architecture, got = match
result_dict.setdefault(flutter_platform, {})[architecture] = got
def sort_dict_recursive(d):
return {
k: sort_dict_recursive(v) if isinstance(v, dict) else v
for k, v in sorted(d.items())
}
return sort_dict_recursive(result_dict)
def get_artifact_hashes(flutter_compact_version):
code = load_code(
"get-artifact-hashes.nix",
nixpkgs_root=NIXPKGS_ROOT,
flutter_compact_version=flutter_compact_version,
)
stderr = nix_build_to_fail(code)
pattern = re.compile(
r"/nix/store/.*-flutter-artifacts-(.+?)-(.+?).drv':\n\s+specified: .*\n\s+got:\s+(.+?)\n"
)
matches = pattern.findall(stderr)
result_dict = {}
for match in matches:
flutter_platform, architecture, got = match
result_dict.setdefault(flutter_platform, {})[architecture] = got
def sort_dict_recursive(d):
return {
k: sort_dict_recursive(v) if isinstance(v, dict) else v
for k, v in sorted(d.items())
}
return sort_dict_recursive(result_dict)
def get_dart_hashes(dart_version, channel):
platforms = ["x86_64-linux", "aarch64-linux", "x86_64-darwin", "aarch64-darwin"]
result_dict = {}
for platform in platforms:
code = load_code(
"get-dart-hashes.nix",
dart_version=dart_version,
platform=platform,
)
stderr = nix_build_to_fail(code)
pattern = re.compile(r"got:\s+(.+?)\n")
result_dict[platform] = pattern.findall(stderr)[0]
return result_dict
def get_flutter_hash_and_src(flutter_version):
code = load_code("get-flutter.nix", flutter_version=flutter_version, hash="")
stderr = nix_build_to_fail(code)
pattern = re.compile(r"got:\s+(.+?)\n")
flutter_hash_value = pattern.findall(stderr)[0]
code = load_code(
"get-flutter.nix", flutter_version=flutter_version, hash=flutter_hash_value
)
return (flutter_hash_value, nix_build(code))
def get_pubspec_lock(flutter_compact_version, flutter_src):
code = load_code(
"get-pubspec-lock.nix",
flutter_compact_version=flutter_compact_version,
flutter_src=flutter_src,
hash="",
)
stderr = nix_build_to_fail(code)
pattern = re.compile(r"got:\s+(.+?)\n")
pubspec_lock_hash = pattern.findall(stderr)[0]
code = load_code(
"get-pubspec-lock.nix",
flutter_compact_version=flutter_compact_version,
flutter_src=flutter_src,
hash=pubspec_lock_hash,
)
pubspec_lock_file = nix_build(code)
with Path(pubspec_lock_file).open("r", encoding="utf-8") as f:
pubspec_lock_yaml = f.read()
return yaml.safe_load(pubspec_lock_yaml)
def get_engine_swiftshader_rev(engine_version):
with urllib.request.urlopen(
f"https://github.com/flutter/flutter/raw/{engine_version}/DEPS"
) as f:
deps = f.read().decode("utf-8")
pattern = re.compile(
r"Var\('swiftshader_git'\) \+ '\/SwiftShader\.git' \+ '@' \+ \'([0-9a-fA-F]{40})\'\,"
)
return pattern.findall(deps)[0]
def get_engine_swiftshader_hash(engine_swiftshader_rev):
code = load_code(
"get-engine-swiftshader.nix",
engine_swiftshader_rev=engine_swiftshader_rev,
hash="",
)
stderr = nix_build_to_fail(code)
pattern = re.compile(r"got:\s+(.+?)\n")
return pattern.findall(stderr)[0]
def write_data(
nixpkgs_flutter_version_directory,
flutter_version,
channel,
engine_hash,
engine_hashes,
engine_swiftshader_hash,
engine_swiftshader_rev,
dart_version,
dart_hash,
flutter_hash,
artifact_hashes,
pubspec_lock,
):
with Path(f"{nixpkgs_flutter_version_directory}/data.json").open(
"w", encoding="utf-8"
) as f:
f.write(
json.dumps(
{
"version": flutter_version,
"engineVersion": engine_hash,
"engineSwiftShaderHash": engine_swiftshader_hash,
"engineSwiftShaderRev": engine_swiftshader_rev,
"channel": channel,
"engineHashes": engine_hashes,
"dartVersion": dart_version,
"dartHash": dart_hash,
"flutterHash": flutter_hash,
"artifactHashes": artifact_hashes,
"pubspecLock": pubspec_lock,
},
indent=2,
).strip()
+ "\n"
)
def update_all_packages():
versions_directory = f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/versions"
versions = [d.name for d in Path(versions_directory).iterdir()]
versions = sorted(
versions,
key=lambda x: (int(x.split("_")[0]), int(x.split("_")[1])),
reverse=True,
)
new_content = [
"flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { });",
"flutterPackages-source = recurseIntoAttrs (",
" callPackage ../development/compilers/flutter { useNixpkgsEngine = true; }",
");",
"flutterPackages = flutterPackages-bin;",
"flutter = flutterPackages.stable;",
] + [
f"flutter{version.replace('_', '')} = flutterPackages.v{version};"
for version in versions
]
with Path(f"{NIXPKGS_ROOT}/pkgs/top-level/all-packages.nix").open(
"r", encoding="utf-8"
) as file:
lines = file.read().splitlines(keepends=True)
start = -1
end = -1
for i, line in enumerate(lines):
if (
"flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { });"
in line
):
start = i
if start != -1 and len(line.strip()) == 0:
end = i
break
if start != -1 and end != -1:
del lines[start:end]
lines[start:start] = [f" {line}\n" for line in new_content]
with Path(f"{NIXPKGS_ROOT}/pkgs/top-level/all-packages.nix").open(
"w", encoding="utf-8"
) as file:
file.write("".join(lines))
# Finds Flutter version, Dart version, and Engine hash.
# If the Flutter version is given, it uses that. Otherwise finds the
# latest stable Flutter version.
def find_versions(flutter_version=None, channel=None):
engine_hash = None
dart_version = None
releases = json.load(
urllib.request.urlopen(
"https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json"
)
)
if not channel:
channel = "stable"
if not flutter_version:
release_hash = releases["current_release"][channel]
release = next(
filter(
lambda release: release["hash"] == release_hash, releases["releases"]
)
)
flutter_version = release["version"]
tags = (
subprocess.Popen(
["git", "ls-remote", "--tags", "https://github.com/flutter/flutter.git"],
stdout=subprocess.PIPE,
text=True,
)
.communicate()[0]
.strip()
)
try:
flutter_hash = (
next(
filter(
lambda line: line.endswith(f"refs/tags/{flutter_version}"),
tags.splitlines(),
)
)
.split("refs")[0]
.strip()
)
engine_hash = (
urllib.request.urlopen(
f"https://github.com/flutter/flutter/raw/{flutter_hash}/bin/internal/engine.version"
)
.read()
.decode("utf-8")
.strip()
)
except StopIteration:
sys.exit(f"Couldn't find Engine hash for Flutter version: {flutter_version}")
try:
dart_version = next(
filter(
lambda release: release["version"] == flutter_version,
releases["releases"],
)
)["dart_sdk_version"]
if " " in dart_version:
dart_version = dart_version.split(" ")[2][:-1]
except StopIteration:
sys.exit(f"Couldn't find Dart version for Flutter version: {flutter_version}")
return (flutter_version, engine_hash, dart_version, channel)
def main():
parser = argparse.ArgumentParser(description="Update Flutter in Nixpkgs")
parser.add_argument("--version", type=str, help="Specify Flutter version")
parser.add_argument("--channel", type=str, help="Specify Flutter release channel")
parser.add_argument(
"--artifact-hashes", action="store_true", help="Whether to get artifact hashes"
)
args = parser.parse_args()
(flutter_version, engine_hash, dart_version, channel) = find_versions(
args.version, args.channel
)
flutter_compact_version = "_".join(flutter_version.split(".")[:2])
if args.artifact_hashes:
print(
json.dumps(get_artifact_hashes(flutter_compact_version), indent=2).strip()
+ "\n"
)
return
print(
f"Flutter version: {flutter_version} ({flutter_compact_version}) on ({channel})"
)
print(f"Engine hash: {engine_hash}")
print(f"Dart version: {dart_version}")
dart_hash = get_dart_hashes(dart_version, channel)
(flutter_hash, flutter_src) = get_flutter_hash_and_src(flutter_version)
nixpkgs_flutter_version_directory = f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/versions/{flutter_compact_version}"
if Path(f"{nixpkgs_flutter_version_directory}/data.json").exists():
Path(f"{nixpkgs_flutter_version_directory}/data.json").unlink()
Path(nixpkgs_flutter_version_directory).mkdir(parents=True, exist_ok=True)
update_all_packages()
common_data_args = {
"nixpkgs_flutter_version_directory": nixpkgs_flutter_version_directory,
"flutter_version": flutter_version,
"channel": channel,
"dart_version": dart_version,
"engine_hash": engine_hash,
"flutter_hash": flutter_hash,
"dart_hash": dart_hash,
}
write_data(
pubspec_lock={},
artifact_hashes={},
engine_hashes={},
engine_swiftshader_hash=FAKE_HASH,
engine_swiftshader_rev="0",
**common_data_args,
)
pubspec_lock = get_pubspec_lock(flutter_compact_version, flutter_src)
write_data(
pubspec_lock=pubspec_lock,
artifact_hashes={},
engine_hashes={},
engine_swiftshader_hash=FAKE_HASH,
engine_swiftshader_rev="0",
**common_data_args,
)
artifact_hashes = get_artifact_hashes(flutter_compact_version)
write_data(
pubspec_lock=pubspec_lock,
artifact_hashes=artifact_hashes,
engine_hashes={},
engine_swiftshader_hash=FAKE_HASH,
engine_swiftshader_rev="0",
**common_data_args,
)
engine_hashes = get_engine_hashes(engine_hash, flutter_version)
write_data(
pubspec_lock=pubspec_lock,
artifact_hashes=artifact_hashes,
engine_hashes=engine_hashes,
engine_swiftshader_hash=FAKE_HASH,
engine_swiftshader_rev="0",
**common_data_args,
)
engine_swiftshader_rev = get_engine_swiftshader_rev(engine_hash)
engine_swiftshader_hash = get_engine_swiftshader_hash(engine_swiftshader_rev)
write_data(
pubspec_lock=pubspec_lock,
artifact_hashes=artifact_hashes,
engine_hashes=engine_hashes,
engine_swiftshader_hash=engine_swiftshader_hash,
engine_swiftshader_rev=engine_swiftshader_rev,
**common_data_args,
)
if __name__ == "__main__":
main()

View File

@@ -1,80 +1,75 @@
{
"artifactHashes": {
"android-arm-profile/artifacts.zip": "sha256-5YqQUqktJUztmJ8BKIgms1THk4ZJ7Gn1fOy4nzILnXc=",
"android-arm-profile/darwin-x64.zip": "sha256-OEDxV6NyfUu87O1b4rs7ZMEx4tcTKHN4+HtkxDG93QA=",
"android-arm-profile/linux-x64.zip": "sha256-EEw/zY2eCeHXYoKp0lPCQEa3WQ44Ac6ETHF8a+ZWO+c=",
"android-arm-profile/windows-x64.zip": "sha256-mPcL6iOno0XAeAUcoXyPkLy4DQBMPQkHRXLWBiyBs5o=",
"android-arm-release/artifacts.zip": "sha256-YsmAQyVS5nvINOzwIEzjlhN0JX7l9RrfLOai+SOcbTo=",
"android-arm-release/darwin-x64.zip": "sha256-z71217SH8gpnGss3h6Dmga5vFydwhBo+eghFvc6cD4U=",
"android-arm-release/linux-x64.zip": "sha256-TgUJ9TBQurr1M5TmYvmUuAe2fsCKRTrq2I9MdJ+DN4U=",
"android-arm-release/windows-x64.zip": "sha256-j8LOfJ5XyO8PIwF8ZnvVekWAG1PNgCCcSYFAbiESUsM=",
"android-arm/artifacts.zip": "sha256-XDQvEKs/uYpOckInNFDJduuOmRZAepHGdOiGVZ1Gqgo=",
"android-arm64-profile/artifacts.zip": "sha256-KGyCUre2r1BR1QnkIEZrdruLA56zKc4DOMIKCV8tMKk=",
"android-arm64-profile/darwin-x64.zip": "sha256-hoO1FlgNxQKC2RXDdIbHdgrrXAnpXVF6tYBhWYA0vAs=",
"android-arm64-profile/linux-x64.zip": "sha256-lZxErv1Dw5HDWDRAOuGGkd6G5JPvgPHSDAdYa02Fn7I=",
"android-arm64-profile/windows-x64.zip": "sha256-Or9sFk9wgnu6mpV3L4CU3w+DeOldsF+dGXgLGMyIJQk=",
"android-arm64-release/artifacts.zip": "sha256-NcKkplrWu2A5e+3Xd2rDCd54lrO0JckqIDlxgwaflIc=",
"android-arm64-release/darwin-x64.zip": "sha256-2HwoWjucRwA2MWYuOqEOdcGsMsFPNtna1dUgHDHQvMc=",
"android-arm64-release/linux-x64.zip": "sha256-SlEhHUhr8dTM8ykXarlA3fZBEiY4UVOwuJW54M7mu8g=",
"android-arm64-release/windows-x64.zip": "sha256-s/jwY4XLQkANEHac1D05xNTmOQ+ee/XmCJmu75zq9DY=",
"android-arm64/artifacts.zip": "sha256-dcN5d1AbWZKsEytj1IHzzo71Q8oKyMBjfGNiMMwBGqs=",
"android-x64-profile/artifacts.zip": "sha256-/j00KLxumCl0YeJXllXs7cTGteW/zgUaOWobuRMOEiQ=",
"android-x64-profile/darwin-x64.zip": "sha256-FOoJI/SYMWv+I308L9mzOfjb6YWRHFsExwWwiaszbE8=",
"android-x64-profile/linux-x64.zip": "sha256-SjnWs/ahkTCqq8XazWxr3KT6YErT1d1+puHCT/AevGM=",
"android-x64-profile/windows-x64.zip": "sha256-zc2EHmeLx383uUsVE1Tqr4Y4oMOPPnyb1vP6NWtSIXs=",
"android-x64-release/artifacts.zip": "sha256-ERy3zRJfQgenp5yrB2yLlcbBJCMjgCoDljRXSmtUcMc=",
"android-x64-release/darwin-x64.zip": "sha256-hngQzsx28eSKZPmSIGdDiwB6ACxWFb19Hoxbgs9De1o=",
"android-x64-release/linux-x64.zip": "sha256-/qK/lM4nOStr+uhCfyhczbKZShOyrlSEl8QtCecGlSk=",
"android-x64-release/windows-x64.zip": "sha256-hYIPyGDtK0ovpXPlVyGIxIK4YaBinzhMfYBga6UWxNE=",
"android-x64/artifacts.zip": "sha256-uKXp/pL8aq++kwNwltjH3cN1/+N78nAZKQy97KSC+Fw=",
"android-x86/artifacts.zip": "sha256-IgotpG/va94e0ZWRc9PFkZBxT5JXuWk+5Mk5n10y1yw=",
"darwin-arm64/artifacts.zip": "sha256-vrxj4NezowGxLaYCdbDPXiCHZsqbv1bTkxOX3qzJv+w=",
"darwin-arm64/font-subset.zip": "sha256-4wlQrcmx450Vg7ShtcoKuJ5YtGkTitdHZ/fsRtEDJWw=",
"darwin-x64-profile/artifacts.zip": "sha256-g22kEEy8AIbVA6qZAcQLX9BB6ifafzL9xNCug+IaeAo=",
"darwin-x64-profile/framework.zip": "sha256-vEYX6NavbMoT+u97wr7K0b4NMal1yO9/M4bFWuZHapY=",
"darwin-x64-profile/gen_snapshot.zip": "sha256-j/kdHmCoC1JdycTT0FpoQ7f/VX1ZTUSKWmKsqI/CkKs=",
"darwin-x64-release/artifacts.zip": "sha256-NGMfznwDSIIYNuGbjDojfoprfTk71xP0mhXmp6hyo4g=",
"darwin-x64-release/framework.zip": "sha256-iYq0LTZb9D77Zd6PCfPk8cwEBUMj7ImV3648qNFkNfs=",
"darwin-x64-release/gen_snapshot.zip": "sha256-zj/+5Ox40f/FDYHH1h5QL3CAYf72IJwwKO5pVZ0MefE=",
"darwin-x64/artifacts.zip": "sha256-DgUPPScyhCox1CpeqrNuj93e64fGwmUzCRrFuPd3Mjo=",
"darwin-x64/font-subset.zip": "sha256-kBPObRjfcyt/qN689Wyj1P0FkRdNlzUTVuLZ+MchaxE=",
"darwin-x64/framework.zip": "sha256-AJKtDRsrW44P42zwFNepUHHPg5ZBNXlqnkYipGFYvbg=",
"darwin-x64/gen_snapshot.zip": "sha256-oH3sRPVJRPTagJCpEJ6sJj99ScIt9whgFwQnZuLvQx4=",
"flutter-web-sdk.zip": "sha256-5fcBtu5xh73o34UNgKl852HOpyu2iwk2KNzVHCgfO84=",
"flutter_gpu.zip": "sha256-ZUldHLUkF8nFaAdzB6e6SEfjwHf9s1NV+pafhs8Jj1E=",
"flutter_patched_sdk.zip": "sha256-7uxxBt/ubgVg+15d/o/UOnWAG69yx34psG7f4S3lvJw=",
"flutter_patched_sdk_product.zip": "sha256-jE2H3RD1mHFUWi+T2oLxaE8j+Pg8O9MbLc3C1636XsQ=",
"ios-profile/artifacts.zip": "sha256-hSW6t3ZwvQ9MpAv+sA1ymvF8eISViWb9OiflOZH1aDo=",
"ios-release/artifacts.zip": "sha256-L6xse/UqQMTtPNi/b6fYjj/RR+uLCd372sQsNRlyo1Q=",
"ios/artifacts.zip": "sha256-FJUsbkiq9ZW9CiriRzUL7Be8fChRgGnM0FJ/HeWlks8=",
"linux-arm64-debug/linux-arm64-flutter-gtk.zip": "sha256-eThLDiCqnewYjHNCnZM0COS9Cr5D9XjC+mtaUk0lcOA=",
"linux-arm64-profile/linux-arm64-flutter-gtk.zip": "sha256-YpQwuVqRJHY/DtR18nJucOvC9/hweQMBLt4BTCbHWWE=",
"linux-arm64-release/linux-arm64-flutter-gtk.zip": "sha256-/1OssZKRXtO5V6zLog5jv+H4nal3ied8kldMUGlISD8=",
"linux-arm64/artifacts.zip": "sha256-mkJdwu5KahaMU+lDtqhgFVcaYAZC4BZjYZ4RdMCgmHM=",
"linux-arm64/font-subset.zip": "sha256-n51PYirH0ZuM5z16re+XGxrntTpvFUUVfrP4KiBvbZ4=",
"linux-x64-debug/linux-x64-flutter-gtk.zip": "sha256-ESZ6xJR14JFfQ8PYJBdb8HA1V37ODpJHt0rLF8CanVA=",
"linux-x64-profile/linux-x64-flutter-gtk.zip": "sha256-VDXUMsTaAbpTDj+1xnQ+UhA9upWgpGG+n4XgBWLbhhM=",
"linux-x64-release/linux-x64-flutter-gtk.zip": "sha256-gtGWH+EhGLpk5NkGorhcIQSNX4TVg7F7+7blY5s4NrM=",
"linux-x64/artifacts.zip": "sha256-sFklXc5SwJTlQtaHNHD5sye+9xWRrLmng2LsNI5QhHk=",
"linux-x64/font-subset.zip": "sha256-cQbvsbn13uhWnx4tZPEJnVBaubv/lhYn1ethyhhgHds=",
"sky_engine.zip": "sha256-R2mm5f0qkn5ziknBT+XV0PwarRaCtwo9lTdD6mk2Kig=",
"windows-x64-debug/windows-x64-flutter.zip": "sha256-TxOA/F2oxNoOy7mUZfy/MsnVyGw64kFy2WV88Y5FVVw=",
"windows-x64-profile/windows-x64-flutter.zip": "sha256-osnuasxTGq3OqxYqSMlYSC/K1V4RXJDWuY6H9oJQnc4=",
"windows-x64-release/windows-x64-flutter.zip": "sha256-dLGNkXp51LusJquBM9UrL92WFUDDC5G0K0DDRd04iAU=",
"windows-x64/artifacts.zip": "sha256-XkzPHFwQsuNLIMn62VG9u6fQp2ABSXEtaf7oq7MM+J8=",
"windows-x64/flutter-cpp-client-wrapper.zip": "sha256-gdLKahdiHCths6t7Iy+YwapgBga0yhDxktVtO43jHkY=",
"windows-x64/font-subset.zip": "sha256-k3ke2TlZiuSQYQEp2WshLccGotJpHYBfnTQJQK4Wg4o="
},
"version": "3.29.3",
"engineVersion": "cf56914b326edb0ccb123ffdc60f00060bd513fa",
"engineSwiftShaderHash": "sha256-mRLCvhNkmHz7Rv6GzXkY7OB1opBSq+ATWZ466qZdgto=",
"engineSwiftShaderRev": "2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f",
"channel": "stable",
"dartHash": {
"aarch64-darwin": "sha256-EG5j2VkAkJk6le5R5ocp3i0Jyit7e9FsC1+1emCzZXw=",
"aarch64-linux": "sha256-NFLMrWHgV+t/oX6F7RqgNdRMNuM9rAdlVxd5j0fmTKg=",
"x86_64-darwin": "sha256-BgiG0riugy+Jzn25ce62IYpQfjcHEVJIfdUuslakSa4=",
"x86_64-linux": "sha256-whb91w9lbFDHjcag/65uXO16mnzO3qPkAvprXr4keIw="
"engineHashes": {
"aarch64-linux": {
"aarch64-linux": "sha256-3BIBG9z433CDsBqX1T6K2y5kUI5ZTqXBBXLoCrX/f2A=",
"x86_64-linux": "sha256-3BIBG9z433CDsBqX1T6K2y5kUI5ZTqXBBXLoCrX/f2A="
},
"x86_64-linux": {
"aarch64-linux": "sha256-+4CswkW7+0gBcZKrLjugTIG5NWAxCB8y39iUxdND2I4=",
"x86_64-linux": "sha256-+4CswkW7+0gBcZKrLjugTIG5NWAxCB8y39iUxdND2I4="
}
},
"dartVersion": "3.7.2",
"engineVersion": "cf56914b326edb0ccb123ffdc60f00060bd513fa",
"dartHash": {
"x86_64-linux": "sha256-ClgSWEu0+lLcPIlabVvBY197/c/kyio6Zoq3KppbW3Y=",
"aarch64-linux": "sha256-NACnkq/pVMiWxfAt4+bkUjM0ZLwBWk5GQrbc9HGFE4k=",
"x86_64-darwin": "sha256-liZz9Bj1RFH7vmEpdMiJ9/h3Yut/o0qEBvydq8dGdKs=",
"aarch64-darwin": "sha256-544u8sIlQudxjBCSZlnQESLsOOdWp5h4lVTaY9P+pRQ="
},
"flutterHash": "sha256-VWmKhxjerGKmw9fXhrRRVcKpUhefmJ2agRkIyWeAOO4=",
"artifactHashes": {
"android": {
"aarch64-darwin": "sha256-xWeagoJGFkHKW0oT5FSJCy254qemp5jZq/zXpadOrVY=",
"aarch64-linux": "sha256-2z7PgRGqUlFQZHJ53EdDT4p5Vk6OT2BJKx2QwSF7/QI=",
"x86_64-darwin": "sha256-xWeagoJGFkHKW0oT5FSJCy254qemp5jZq/zXpadOrVY=",
"x86_64-linux": "sha256-2z7PgRGqUlFQZHJ53EdDT4p5Vk6OT2BJKx2QwSF7/QI="
},
"fuchsia": {
"aarch64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
},
"ios": {
"aarch64-darwin": "sha256-mKrkm+Sio/SUPoivJNh+Kg4iZ6o/7P2Wsqi1ys5i6/k=",
"aarch64-linux": "sha256-mKrkm+Sio/SUPoivJNh+Kg4iZ6o/7P2Wsqi1ys5i6/k=",
"x86_64-darwin": "sha256-mKrkm+Sio/SUPoivJNh+Kg4iZ6o/7P2Wsqi1ys5i6/k=",
"x86_64-linux": "sha256-mKrkm+Sio/SUPoivJNh+Kg4iZ6o/7P2Wsqi1ys5i6/k="
},
"linux": {
"aarch64-darwin": "sha256-W8usesonlRBxd5CFQyQAyVfx4yMkd2UcZWbhVlB8Jwc=",
"aarch64-linux": "sha256-W8usesonlRBxd5CFQyQAyVfx4yMkd2UcZWbhVlB8Jwc=",
"x86_64-darwin": "sha256-RxNVQpRR4EWbK0WD+d6tZbweW3QE7Z3fipKFpf4YyG8=",
"x86_64-linux": "sha256-RxNVQpRR4EWbK0WD+d6tZbweW3QE7Z3fipKFpf4YyG8="
},
"macos": {
"aarch64-darwin": "sha256-WGm1+0IY5FMyXt5TSXcwrEw/u72lmc+2H7NR66uvxrE=",
"aarch64-linux": "sha256-WGm1+0IY5FMyXt5TSXcwrEw/u72lmc+2H7NR66uvxrE=",
"x86_64-darwin": "sha256-WGm1+0IY5FMyXt5TSXcwrEw/u72lmc+2H7NR66uvxrE=",
"x86_64-linux": "sha256-WGm1+0IY5FMyXt5TSXcwrEw/u72lmc+2H7NR66uvxrE="
},
"universal": {
"aarch64-darwin": "sha256-MxtHKccpQfurtKumtp00CRqB/riU5+wiHsuUh4sCXVY=",
"aarch64-linux": "sha256-w2onIP0zkg8N/vsnC9DKCrG4iIUvRiBhbHvSJYzW/fQ=",
"x86_64-darwin": "sha256-vq4/tCBQQtmJarcnrrL+saCUKS/xCoFHmKAxBSn1edI=",
"x86_64-linux": "sha256-TglGaiwmbxCYJ6bk1zJwhIYlPf3+VVTO5zCMpzyu/JY="
},
"web": {
"aarch64-darwin": "sha256-yN5ElLmpNG71yY9Egye8uXgHwiL8xRwNCkczElLf27Q=",
"aarch64-linux": "sha256-yN5ElLmpNG71yY9Egye8uXgHwiL8xRwNCkczElLf27Q=",
"x86_64-darwin": "sha256-yN5ElLmpNG71yY9Egye8uXgHwiL8xRwNCkczElLf27Q=",
"x86_64-linux": "sha256-yN5ElLmpNG71yY9Egye8uXgHwiL8xRwNCkczElLf27Q="
},
"windows": {
"x86_64-darwin": "sha256-l9rG2aRTrN26QFnLvbeGiUvMz8+faCo3byIbz33DWpY=",
"x86_64-linux": "sha256-l9rG2aRTrN26QFnLvbeGiUvMz8+faCo3byIbz33DWpY="
}
},
"pubspecLock": {
"packages": {
"_fe_analyzer_shared": {
@@ -1047,6 +1042,5 @@
"sdks": {
"dart": ">=3.7.0-0 <4.0.0"
}
},
"version": "3.29.3"
}
}

View File

@@ -1,51 +0,0 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -321,7 +321,7 @@
bool fatalStorageWarning = true;
static RandomAccessFile? _lock;
- static bool _lockEnabled = true;
+ static bool _lockEnabled = false;
/// Turn off the [lock]/[releaseLock] mechanism.
///
@@ -725,7 +725,6 @@
}
void setStampFor(String artifactName, String version) {
- getStampFileFor(artifactName).writeAsStringSync(version);
}
File getStampFileFor(String artifactName) {
@@ -1010,31 +1009,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
- engineVersion ??= version;
- final String url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
-
- bool exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
- }
-
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
- }
return true;
}

View File

@@ -1,126 +0,0 @@
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -95,11 +95,7 @@
}
}
- final String frameworkRevision = _runGit(
- gitLog(<String>['-n', '1', '--pretty=format:%H']).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ final String frameworkRevision = 'nixpkgs000000000000000000000000000000000';
return FlutterVersion.fromRevision(
clock: clock,
@@ -192,11 +188,7 @@
// TODO(fujino): calculate this relative to frameworkCommitDate for
// _FlutterVersionFromFile so we don't need a git call.
String get frameworkAge {
- return _frameworkAge ??= _runGit(
- FlutterVersion.gitLog(<String>['-n', '1', '--pretty=format:%ar']).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ return 'unknown';
}
void ensureVersionFile();
@@ -327,9 +319,7 @@
/// remote git repository is not reachable due to a network issue.
static Future<String> fetchRemoteFrameworkCommitDate() async {
try {
- // Fetch upstream branch's commit and tags
- await _run(<String>['git', 'fetch', '--tags']);
- return _gitCommitDate(gitRef: kGitTrackingUpstream, workingDirectory: Cache.flutterRoot);
+ return 'unknown';
} on VersionCheckError catch (error) {
globals.printError(error.message);
rethrow;
@@ -354,14 +344,7 @@
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'` ([kUserBranch]).
String getBranchName({bool redactUnknownBranches = false}) {
- _branch ??= () {
- final String branch = _runGit(
- 'git symbolic-ref --short HEAD',
- globals.processUtils,
- flutterRoot,
- );
- return branch == 'HEAD' ? '' : branch;
- }();
+ _branch ??= 'stable';
if (redactUnknownBranches || _branch!.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!kOfficialChannels.contains(_branch) && !kObsoleteBranches.containsKey(_branch)) {
@@ -404,30 +387,7 @@
bool lenient = false,
required String? workingDirectory,
}) {
- final List<String> args = FlutterVersion.gitLog(<String>[
- gitRef,
- '-n',
- '1',
- '--pretty=format:%ad',
- '--date=iso',
- ]);
- try {
- // Don't plumb 'lenient' through directly so that we can print an error
- // if something goes wrong.
- return _runSync(args, lenient: false, workingDirectory: workingDirectory);
- } on VersionCheckError catch (e) {
- if (lenient) {
- final DateTime dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError(
- 'Failed to find the latest git commit date: $e\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- } else {
- rethrow;
- }
- }
+ return 'unknown';
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -541,20 +501,7 @@
@override
String? get repositoryUrl {
if (_repositoryUrl == null) {
- final String gitChannel = _runGit(
- 'git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
- globals.processUtils,
- flutterRoot,
- );
- final int slash = gitChannel.indexOf('/');
- if (slash != -1) {
- final String remote = gitChannel.substring(0, slash);
- _repositoryUrl = _runGit(
- 'git ls-remote --get-url $remote',
- globals.processUtils,
- flutterRoot,
- );
- }
+ _repositoryUrl = 'https://github.com/flutter/flutter.git';
}
return _repositoryUrl;
}
@@ -926,6 +873,16 @@
final String? gitTag;
static GitTagVersion determine(
+ ProcessUtils processUtils,
+ Platform platform, {
+ String? workingDirectory,
+ bool fetchTags = false,
+ String gitRef = 'HEAD',
+ }) {
+ return GitTagVersion.unknown();
+ }
+
+ static GitTagVersion determine_orig(
ProcessUtils processUtils,
Platform platform, {
String? workingDirectory,

View File

@@ -1,80 +1,75 @@
{
"artifactHashes": {
"android-arm-profile/artifacts.zip": "sha256-zDWexI+zuOfmJc4EnnANllZAyNbp0mb82EOIPmech3A=",
"android-arm-profile/darwin-x64.zip": "sha256-hbt0aCFcEl6Wk44k9hezrq6QFrtk07JFjci5MamePts=",
"android-arm-profile/linux-x64.zip": "sha256-lmoROV2f0iHLxvVclpOkXCSN/pS5LDz3LvVTJBsxtd8=",
"android-arm-profile/windows-x64.zip": "sha256-a4p6exLes0AfkTHVd80zk81JP9WwpdkYXMdyo6JhQ2E=",
"android-arm-release/artifacts.zip": "sha256-mjylyqqCjshOuhJ5Os7fxAnWdBz0oY4cE4YKLxmVhpk=",
"android-arm-release/darwin-x64.zip": "sha256-LASl5TmDLj0Qy+UrgtzSOijpT7Oz4rMiNmC5wMXZ5Os=",
"android-arm-release/linux-x64.zip": "sha256-lUDZI1/kiAdd3sI/aswsbIjYg6iePXfuhRPYzQNmnJo=",
"android-arm-release/windows-x64.zip": "sha256-4DH2j5MrPwi3Zn4tmsO8yohANQ0nC1nNjEWFhYGS5e8=",
"android-arm/artifacts.zip": "sha256-/0wqrYzhP4LSZuV8o01TaCHgON94JaE9yva78nr8NRs=",
"android-arm64-profile/artifacts.zip": "sha256-1VsImF6T00WlnJrOjdste1Ct0DYmOKWdjaWyjWPQUv4=",
"android-arm64-profile/darwin-x64.zip": "sha256-nF98oM6jmI1DPrdvqFjjX3HzilqsKxelj3sMQD/sV9s=",
"android-arm64-profile/linux-x64.zip": "sha256-qe3G57ww/H7PoK4Y6CEVjl5LVTecxTvia1fLJgprWUw=",
"android-arm64-profile/windows-x64.zip": "sha256-y9bnrKnX1w0RpYZ8gcShWUMACZCP2vdVWteFy47mTJo=",
"android-arm64-release/artifacts.zip": "sha256-rYRDJNgNjWHS5vxmq60+lafR02vfdyiRDcy5WbzCjzA=",
"android-arm64-release/darwin-x64.zip": "sha256-GQZR3p1OnI/cYw+GMawOId/FPpCCWbwDASTN0hKUXjQ=",
"android-arm64-release/linux-x64.zip": "sha256-ByMH2CSI3eOzYMeM9Kvpi3eljYtybkIpXqE0iJ+p4zk=",
"android-arm64-release/windows-x64.zip": "sha256-pR/QMQzn3KbjZFPBysQ5kAfkcC3Vdqx97jLMQ2iL2Cs=",
"android-arm64/artifacts.zip": "sha256-OxhJ9s1O6O5jLI6rKiisEiHaWvumYgVJLozJEnfjP1A=",
"android-x64-profile/artifacts.zip": "sha256-OS/wqrZK/IcvI1795TdVnlYqsyki8SBNFI34rQeT58U=",
"android-x64-profile/darwin-x64.zip": "sha256-YniOHobbhrxHTSrt4hYNhrz0xpvWIusg19qe5MRbJUk=",
"android-x64-profile/linux-x64.zip": "sha256-9/S7Q5djz2e6TU/NI6N2Y24hsamky4XD+djkCX5JwAg=",
"android-x64-profile/windows-x64.zip": "sha256-wf4CZhFv25svHTbY8cB2v0YyB2EwZqB+wLZf3XQHd50=",
"android-x64-release/artifacts.zip": "sha256-zpNIFJxQuJsEntQDvJgrPUFxaP06skS6T6N8eEW5H6M=",
"android-x64-release/darwin-x64.zip": "sha256-uh2tqQac85zgUH/I9ACUSsdqL46BfPvgosuyECO5j6k=",
"android-x64-release/linux-x64.zip": "sha256-WYK27e9gpn6cZOBVca/6drLH18kE7qZVQu2rKiYhkV0=",
"android-x64-release/windows-x64.zip": "sha256-3gah7k9T9JNUHeKgHy/v4l9O7A6BZrnVtwVbALx4dVg=",
"android-x64/artifacts.zip": "sha256-jrPwJSXQQ2dH7h/HtRJmTvL/uqy9moG5FR2Y6M+6y1M=",
"android-x86/artifacts.zip": "sha256-iGlh72so0ieVraCU77Xix9g2CWfmF1wpjsH2A/eIz/w=",
"darwin-arm64/artifacts.zip": "sha256-BSFNTVaNXE8178rjKiXHU4KZXyGk1pcbnBlDe3AjdGI=",
"darwin-arm64/font-subset.zip": "sha256-uNjn2tEUGrgIFId+4m03Aj7ABcx5w5TJB0aVL0xL2G4=",
"darwin-x64-profile/artifacts.zip": "sha256-G8v4R0bvByd3ek93nDxF16KIdcDaGIUhtMoJAMwzGko=",
"darwin-x64-profile/framework.zip": "sha256-/XY/Ta1sEM3iCZ2qnIGWskHrrzhAIQTnN4x+aRtqOUo=",
"darwin-x64-profile/gen_snapshot.zip": "sha256-eUxbCo8TvFdxz4KoMGHi2IT7kq5WL51ZHFrIUb+7FG4=",
"darwin-x64-release/artifacts.zip": "sha256-N14BAWCnMU9Ezuj/VRbmthxiHP7dtr6YlUG8b2XT37o=",
"darwin-x64-release/framework.zip": "sha256-Q/17YSyMKU0+iObwV7SvyKODI+P7a3ErXlNm4HidHAQ=",
"darwin-x64-release/gen_snapshot.zip": "sha256-rRCTkI5qXMFviMxeTush2t+RSdvP1HxgF2ovGQHDMHI=",
"darwin-x64/artifacts.zip": "sha256-Gt46l5s1lHHTwHxTVRO0W2+ymG/SsuWS6Ee56EUWwCs=",
"darwin-x64/font-subset.zip": "sha256-fDTfVUQp/PayjqEbj5HOkfZEcnMePtrE36tXbpRFaHw=",
"darwin-x64/framework.zip": "sha256-b2q5XpSGV3HvNZc72/6OlfcpxfDoC0MyS7UsCIVa2I8=",
"darwin-x64/gen_snapshot.zip": "sha256-MvJcufyFXJNMwPU80qkU2YyPy28o4D4HWJoII2pjiXs=",
"flutter-web-sdk.zip": "sha256-u+lbjL8mEuaUEZZZ7sXa5w+MQXWFGns7uNxhzaw53O4=",
"flutter_gpu.zip": "sha256-WwtMMiFP+Pi9TQbacTGPBtR80afaqioPgBZOK34YtWk=",
"flutter_patched_sdk.zip": "sha256-SoQomgnpZFSgI4a9eh+7teVZ+KTTqYm3Uyh+99IwVVM=",
"flutter_patched_sdk_product.zip": "sha256-QhDNJ7DkFAWqZG4XLKOB7Nyqg/Tc7bH4e4xUZrJqXGQ=",
"ios-profile/artifacts.zip": "sha256-TWN5VVlzZw0K3dXsS1gyLnvvRGNC9mXlMS4U+52qIOI=",
"ios-release/artifacts.zip": "sha256-I0OY5WGKF3HH66K8MlHrIDsTS9HxBYmBe9uLeLjkjbc=",
"ios/artifacts.zip": "sha256-uO1HQFIswJbiCkY4OSexNI92KPmG90sP7zavjxUmZ3g=",
"linux-arm64-debug/linux-arm64-flutter-gtk.zip": "sha256-ky/wf3lIwViqWuDgcXAdH7r8SdpDaE55nIu2dMMk9g0=",
"linux-arm64-profile/linux-arm64-flutter-gtk.zip": "sha256-HSzTOa0HetnobXfTenrE60kUul/Riy8C5AsyIOaQd2o=",
"linux-arm64-release/linux-arm64-flutter-gtk.zip": "sha256-+hBJ1ELS2rsCcvbYTGllCMkYroLFeWncXaYusfFS+pw=",
"linux-arm64/artifacts.zip": "sha256-J13A0cMXbb7BfIOI8wT4/d2/el4KjmRcz0+azy/sM7A=",
"linux-arm64/font-subset.zip": "sha256-nWwP3VI15gLPN/FRqN5TJ74l2ojbbe3bHhXVdEGztuM=",
"linux-x64-debug/linux-x64-flutter-gtk.zip": "sha256-mPmS92NUxaUrIUtH0BVZKSOYGwYXeLr3qg9YdkjjFYQ=",
"linux-x64-profile/linux-x64-flutter-gtk.zip": "sha256-48SB0A+sKiR55BMt+ZqAxRSxr3ikf/vJTFhnrWSMPk0=",
"linux-x64-release/linux-x64-flutter-gtk.zip": "sha256-WxqyHrIEyjgH/p9AjLqkOSHIsRZFEHNb5XYtAS9BP88=",
"linux-x64/artifacts.zip": "sha256-2jFV0xPe3trdEmC+ApWJfbz1v7T6ZkY3Iq+TmRgmpd4=",
"linux-x64/font-subset.zip": "sha256-eHAeGxsVWtKZhT/7W0TyOY5lMoIkl//rjWAxp0OVZWA=",
"sky_engine.zip": "sha256-t72yVeV6QYQtfIwiJNoL96gSvQD0DJW7wE6k7Ut9RaU=",
"windows-x64-debug/windows-x64-flutter.zip": "sha256-HNpEBvJ4wnCTa50JSxk6PmDaOex+kxPg24U3eq/BGbQ=",
"windows-x64-profile/windows-x64-flutter.zip": "sha256-2DwFbYQgZUjnBn6Zt6mUC1R39Xi0jR+9OeGerD2y4mw=",
"windows-x64-release/windows-x64-flutter.zip": "sha256-DcU909remUeNvvCRym0vGjDjUoJ0tTCALTPGJi8Omcs=",
"windows-x64/artifacts.zip": "sha256-Jvn4GYQPI4HIdxrzIDHssnRUdJ9t5Hmg1ii8T+uSoeY=",
"windows-x64/flutter-cpp-client-wrapper.zip": "sha256-cBNZivR/2ZK70ZJwOUiV9X7f6yuqtJmrYuupOfP4HFk=",
"windows-x64/font-subset.zip": "sha256-NN6mjRubl5SPNvFGHE8fKBn++NWfDYqca5wuquc0uow="
},
"version": "3.32.8",
"engineVersion": "ef0cd000916d64fa0c5d09cc809fa7ad244a5767",
"engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=",
"engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416",
"channel": "stable",
"dartHash": {
"aarch64-darwin": "sha256-UIC8b0p4zM4OOOceRkdsCNYeCBRTZGlI8/DHcXepKPg=",
"aarch64-linux": "sha256-eKMkAJe+47ebAJxp6tIuGq7e3ty+CT6qmACExWYQlsg=",
"x86_64-darwin": "sha256-OTcd89ZPlPWz2cERnD9UkWTFYoxqE7lFG3tEhZ8fkRQ=",
"x86_64-linux": "sha256-DVjAEKNh8/FYixwvV5QvfMr3t6u+A0BP73oQLrY48J0="
"engineHashes": {
"aarch64-linux": {
"aarch64-linux": "sha256-JrbIMYwdfe36y6bHj1eAjYOKPGGp7mfWxWDCoCm7wiQ=",
"x86_64-linux": "sha256-JrbIMYwdfe36y6bHj1eAjYOKPGGp7mfWxWDCoCm7wiQ="
},
"x86_64-linux": {
"aarch64-linux": "sha256-R0ut5hzzBgfjbZFB1ofK4jEmr3CcBKHFJUl3c7nmn0E=",
"x86_64-linux": "sha256-R0ut5hzzBgfjbZFB1ofK4jEmr3CcBKHFJUl3c7nmn0E="
}
},
"dartVersion": "3.8.1",
"engineVersion": "ef0cd000916d64fa0c5d09cc809fa7ad244a5767",
"dartHash": {
"x86_64-linux": "sha256-3eE40VMwrPFD502lIaz+CkD7mBnSI/WqJ3C4DVQ01Z4=",
"aarch64-linux": "sha256-0GXCO00ar5532h+cXBEIe8BhGVKOuGuoPzr1M00muh4=",
"x86_64-darwin": "sha256-S3iGDVLollApke2SnXAcV919qsDTVmz5Gf9fTletr00=",
"aarch64-darwin": "sha256-haHQks9N1mBIqRsYg9sOLw7ra7gC708gsTWfKxvIK1c="
},
"flutterHash": "sha256-s5T16+cMmL2ustJQjwFbfS8G+/TJW/WCEF1IO4WgbXQ=",
"artifactHashes": {
"android": {
"aarch64-darwin": "sha256-hswA4YkMM3uur0F2KuA32g+EXtCPH7SYVZkjr2EFV7o=",
"aarch64-linux": "sha256-1V8hfmK2q2QgbIT+YC/WtFZmkG7xcvrJYPeiN0o4fhY=",
"x86_64-darwin": "sha256-hswA4YkMM3uur0F2KuA32g+EXtCPH7SYVZkjr2EFV7o=",
"x86_64-linux": "sha256-1V8hfmK2q2QgbIT+YC/WtFZmkG7xcvrJYPeiN0o4fhY="
},
"fuchsia": {
"aarch64-darwin": "sha256-WkWLbIpEyrwyB9mcA3ElNecRmCVt8+6y3qKi9zFRR9I=",
"aarch64-linux": "sha256-WkWLbIpEyrwyB9mcA3ElNecRmCVt8+6y3qKi9zFRR9I=",
"x86_64-darwin": "sha256-WkWLbIpEyrwyB9mcA3ElNecRmCVt8+6y3qKi9zFRR9I=",
"x86_64-linux": "sha256-WkWLbIpEyrwyB9mcA3ElNecRmCVt8+6y3qKi9zFRR9I="
},
"ios": {
"aarch64-darwin": "sha256-obbmFnObjvQH6sLL0MsRrFtA0x8yCOo7clMqQzteWGY=",
"aarch64-linux": "sha256-obbmFnObjvQH6sLL0MsRrFtA0x8yCOo7clMqQzteWGY=",
"x86_64-darwin": "sha256-obbmFnObjvQH6sLL0MsRrFtA0x8yCOo7clMqQzteWGY=",
"x86_64-linux": "sha256-obbmFnObjvQH6sLL0MsRrFtA0x8yCOo7clMqQzteWGY="
},
"linux": {
"aarch64-darwin": "sha256-LID4h0JABLwjmrv3XS1MEWTYn/7GmBtybqiLbErfgWA=",
"aarch64-linux": "sha256-LID4h0JABLwjmrv3XS1MEWTYn/7GmBtybqiLbErfgWA=",
"x86_64-darwin": "sha256-k8fVg13YXFFBAI0OKph1DqzfmNk1PYAyy/PVuma2hlM=",
"x86_64-linux": "sha256-k8fVg13YXFFBAI0OKph1DqzfmNk1PYAyy/PVuma2hlM="
},
"macos": {
"aarch64-darwin": "sha256-Y+T2SuM4D8Du/MAQR9DScU8ObPPE7WGxxvC5Km2YmHg=",
"aarch64-linux": "sha256-Y+T2SuM4D8Du/MAQR9DScU8ObPPE7WGxxvC5Km2YmHg=",
"x86_64-darwin": "sha256-Y+T2SuM4D8Du/MAQR9DScU8ObPPE7WGxxvC5Km2YmHg=",
"x86_64-linux": "sha256-Y+T2SuM4D8Du/MAQR9DScU8ObPPE7WGxxvC5Km2YmHg="
},
"universal": {
"aarch64-darwin": "sha256-h4v8Pyw7VqFDWh+VCcz12bgd1o5FIb+cpomR0k570f4=",
"aarch64-linux": "sha256-ZBDA3tS2GwnubeIuXhZ7Zxc75KNim5OCYkkn03KMYGs=",
"x86_64-darwin": "sha256-USoiNw8AUinCwMvrpOTmhSDq/TP1f0N9ZT8l8ZILzOo=",
"x86_64-linux": "sha256-OfSxYyyaRxaUCDR8ZjTdIBQ3PFpRXoA1YHIIooXAKKY="
},
"web": {
"aarch64-darwin": "sha256-jaDnIyn0uwLOblQ1IqU0TlsgBrXyk8wXhlRzAwXLo50=",
"aarch64-linux": "sha256-jaDnIyn0uwLOblQ1IqU0TlsgBrXyk8wXhlRzAwXLo50=",
"x86_64-darwin": "sha256-jaDnIyn0uwLOblQ1IqU0TlsgBrXyk8wXhlRzAwXLo50=",
"x86_64-linux": "sha256-jaDnIyn0uwLOblQ1IqU0TlsgBrXyk8wXhlRzAwXLo50="
},
"windows": {
"x86_64-darwin": "sha256-zJrruuMcgtOXRrkRPoGHovyjABDck0Dzjrz7bCtx4C4=",
"x86_64-linux": "sha256-zJrruuMcgtOXRrkRPoGHovyjABDck0Dzjrz7bCtx4C4="
}
},
"pubspecLock": {
"packages": {
"_fe_analyzer_shared": {
@@ -1051,6 +1046,5 @@
"sdks": {
"dart": ">=3.7.0 <4.0.0"
}
},
"version": "3.32.8"
}
}

View File

@@ -1,51 +0,0 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -321,7 +321,7 @@
bool fatalStorageWarning = true;
static RandomAccessFile? _lock;
- static bool _lockEnabled = true;
+ static bool _lockEnabled = false;
/// Turn off the [lock]/[releaseLock] mechanism.
///
@@ -727,7 +727,6 @@
}
void setStampFor(String artifactName, String version) {
- getStampFileFor(artifactName).writeAsStringSync(version);
}
File getStampFileFor(String artifactName) {
@@ -1015,31 +1014,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
- engineVersion ??= version;
- final String url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
-
- bool exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
- }
-
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
- }
return true;
}

View File

@@ -1,131 +0,0 @@
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -95,11 +95,7 @@
}
}
- final String frameworkRevision = _runGit(
- gitLog(<String>['-n', '1', '--pretty=format:%H']).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ final String frameworkRevision = 'nixpkgs000000000000000000000000000000000';
return FlutterVersion.fromRevision(
clock: clock,
@@ -198,16 +194,7 @@
final String flutterRoot;
String _getTimeSinceCommit({String? revision}) {
- return _runGit(
- FlutterVersion.gitLog(<String>[
- '-n',
- '1',
- '--pretty=format:%ar',
- if (revision != null) revision,
- ]).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ return 'unknown';
}
// TODO(fujino): calculate this relative to frameworkCommitDate for
@@ -356,9 +343,7 @@
/// remote git repository is not reachable due to a network issue.
static Future<String> fetchRemoteFrameworkCommitDate() async {
try {
- // Fetch upstream branch's commit and tags
- await _run(<String>['git', 'fetch', '--tags']);
- return _gitCommitDate(gitRef: kGitTrackingUpstream, workingDirectory: Cache.flutterRoot);
+ return 'unknown';
} on VersionCheckError catch (error) {
globals.printError(error.message);
rethrow;
@@ -383,14 +368,7 @@
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'` ([kUserBranch]).
String getBranchName({bool redactUnknownBranches = false}) {
- _branch ??= () {
- final String branch = _runGit(
- 'git symbolic-ref --short HEAD',
- globals.processUtils,
- flutterRoot,
- );
- return branch == 'HEAD' ? '' : branch;
- }();
+ _branch ??= 'stable';
if (redactUnknownBranches || _branch!.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!kOfficialChannels.contains(_branch) && !kObsoleteBranches.containsKey(_branch)) {
@@ -433,30 +411,7 @@
bool lenient = false,
required String? workingDirectory,
}) {
- final List<String> args = FlutterVersion.gitLog(<String>[
- gitRef,
- '-n',
- '1',
- '--pretty=format:%ad',
- '--date=iso',
- ]);
- try {
- // Don't plumb 'lenient' through directly so that we can print an error
- // if something goes wrong.
- return _runSync(args, lenient: false, workingDirectory: workingDirectory);
- } on VersionCheckError catch (e) {
- if (lenient) {
- final DateTime dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError(
- 'Failed to find the latest git commit date: $e\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- } else {
- rethrow;
- }
- }
+ return 'unknown';
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -585,20 +540,7 @@
@override
String? get repositoryUrl {
if (_repositoryUrl == null) {
- final String gitChannel = _runGit(
- 'git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
- globals.processUtils,
- flutterRoot,
- );
- final int slash = gitChannel.indexOf('/');
- if (slash != -1) {
- final String remote = gitChannel.substring(0, slash);
- _repositoryUrl = _runGit(
- 'git ls-remote --get-url $remote',
- globals.processUtils,
- flutterRoot,
- );
- }
+ _repositoryUrl = 'https://github.com/flutter/flutter.git';
}
return _repositoryUrl;
}
@@ -970,6 +912,16 @@
final String? gitTag;
static GitTagVersion determine(
+ ProcessUtils processUtils,
+ Platform platform, {
+ String? workingDirectory,
+ bool fetchTags = false,
+ String gitRef = 'HEAD',
+ }) {
+ return GitTagVersion.unknown();
+ }
+
+ static GitTagVersion determine_orig(
ProcessUtils processUtils,
Platform platform, {
String? workingDirectory,

View File

@@ -1,80 +1,75 @@
{
"artifactHashes": {
"android-arm-profile/artifacts.zip": "sha256-tkMKTImxVqFBQhJDVD2NB0thlB/A1NFRekV1ScYLwVM=",
"android-arm-profile/darwin-x64.zip": "sha256-ktPTy7G41qtJ5oOeE6mfKK3IQQlBAmIBtFm7cUEOkxQ=",
"android-arm-profile/linux-x64.zip": "sha256-3Imdiu+I4WmOqsYmJjnyRFkOOfgIJjPbDUba6V08VmQ=",
"android-arm-profile/windows-x64.zip": "sha256-jJEhtr8Jvuak7n5Wq0t2wMMk2J6Vpmu5WlbXl3zN1AE=",
"android-arm-release/artifacts.zip": "sha256-WxypxJNW28+v88bGjfksIYSiCVdDkOnqzlBOJSPxwGQ=",
"android-arm-release/darwin-x64.zip": "sha256-J17mW6Xfbd+YT5N7n1Y+QTRK9DVk8l1ai37UDdt3rEY=",
"android-arm-release/linux-x64.zip": "sha256-gs/SzGsz9cjp6qM2Izqg0CbfX5WWFE1Cgy3X8mIB5Mc=",
"android-arm-release/windows-x64.zip": "sha256-ON/g8l1MlXB53CDjF8fZgOJ69l32WGhMnD5Bnxn7nys=",
"android-arm/artifacts.zip": "sha256-/1CR0aybIBZGopc0O5A9jG9Sn0MWlPts2WkhFva+72c=",
"android-arm64-profile/artifacts.zip": "sha256-geB9xlwjS+TDcE2CabNwX4R3gLwLmELO3OvJLMhaCG8=",
"android-arm64-profile/darwin-x64.zip": "sha256-cx8D1W5ezsf0DoWTU4nQycFtER59uSu5T8Mbrq7F4mc=",
"android-arm64-profile/linux-x64.zip": "sha256-bp3WdqCC0uD3gcbtcTpe0Bk28Co75PEjlYunN0nAGR0=",
"android-arm64-profile/windows-x64.zip": "sha256-bVDWw5Z7MHUqezYVdO5wZT7mnTSzmBoI/4PAFopsOyw=",
"android-arm64-release/artifacts.zip": "sha256-0/Q7w98SG69nEd2S2pp8djnk7zmC1YfLIW126tQtooc=",
"android-arm64-release/darwin-x64.zip": "sha256-9kcha9KcoHsEgY6jSdP92ETk+BqFeQ7LsgD0ubHkNLE=",
"android-arm64-release/linux-x64.zip": "sha256-JqVh/V7HBzbsa/9iacL2RZFf3X9GFs2llsDaTbOQdsU=",
"android-arm64-release/windows-x64.zip": "sha256-Xrtl3WBXvzLnn/I1vCsGIS+DyTCE9gJYBLDucn/H8u4=",
"android-arm64/artifacts.zip": "sha256-e3+ybL9AG3xN559EcWBtBxitudQd9HUluEHB15IX7ps=",
"android-x64-profile/artifacts.zip": "sha256-5bvosBPGtU2T1GGLGkPmyTVJ90JBdrGK+8C79mgSRSA=",
"android-x64-profile/darwin-x64.zip": "sha256-7vIRNLkQmVGhc48GtdYfC4oA3d35kPQtj3vcIKBchJc=",
"android-x64-profile/linux-x64.zip": "sha256-wYYyhpVXNjUPmoSbarHkTv2xSPUkmnSSVaDaYGNSTJM=",
"android-x64-profile/windows-x64.zip": "sha256-1FXPNfRQjncl5Pyg5x4TslWeCOIyrKBhjVBFkGLzHeM=",
"android-x64-release/artifacts.zip": "sha256-mRoPNcpq5hBL/AxskFK8ccbvKwzgb2vEUVJ9WtgUlH0=",
"android-x64-release/darwin-x64.zip": "sha256-AfWv2mUDxFzwDK/dGl/TrrkP2YyyOGNmfde6bj06AtE=",
"android-x64-release/linux-x64.zip": "sha256-4demp82PCXeOje3l+qOc/Eq+ngY8QybWE4iFGVK6lNc=",
"android-x64-release/windows-x64.zip": "sha256-3mQXqHuOhwDTRlsknFA8R/27luOzs28glJVD+3G/5EI=",
"android-x64/artifacts.zip": "sha256-BheP9zRanNkBOVzPwQvYp4jd9l/MIcnbmkshlwfT6Dc=",
"android-x86/artifacts.zip": "sha256-vXZo+hOtp1hRDvBBJfNmqlE6/ettAB9iEGdJZ/AeYKg=",
"darwin-arm64/artifacts.zip": "sha256-4CqgWDqeTGgNfmllemwbK692tRJ6y6O0/S8WdHPr2cI=",
"darwin-arm64/font-subset.zip": "sha256-gyTIBlcwE0UZZ/zVZIK2CkIoqQlbixcp54RBmyCgiJ4=",
"darwin-x64-profile/artifacts.zip": "sha256-Q7vaWylDWDSi8Fm2rnjX2OZrg9suz/oZIMLG+L8LPfg=",
"darwin-x64-profile/framework.zip": "sha256-t1FS8OI8Ptxpfker8th1KkWlKDb7lvd76o3vT5zLSos=",
"darwin-x64-profile/gen_snapshot.zip": "sha256-lzPl2i1XCdzmpV5Si5R/xju7JnmXz5N3MuTOWQHo6UY=",
"darwin-x64-release/artifacts.zip": "sha256-BXxo25VzpbNGsedjuXgOqnhDo1iOpDdXZ8ECYcCcgSY=",
"darwin-x64-release/framework.zip": "sha256-S22KfsuOjv9b4A/6F9cj47E4gGo1SYlP6xCRqV4D3iY=",
"darwin-x64-release/gen_snapshot.zip": "sha256-YR1Mqh3xMvlrLBaBC8q9TAloYWmBng15LdIDYq6JBMk=",
"darwin-x64/artifacts.zip": "sha256-eL9Y7UHaso/MKN0mSx8W4OqxwzDn/csuX8M8UwAjFWA=",
"darwin-x64/font-subset.zip": "sha256-vBUjrHafLzmJR13cFWr46flx4A9HE9p72DDfGIXHEcc=",
"darwin-x64/framework.zip": "sha256-oBeGU6XuQrXmF4z7ln7mUMsJMHg5XDjikxXgBKMJQ28=",
"darwin-x64/gen_snapshot.zip": "sha256-b9FUB6TQmGw5k+M2Z3y56CvInw/LTrPL9YyG5D4Uqoc=",
"flutter-web-sdk.zip": "sha256-0LQD3PWbBXc34qhxAHB/ESYjvpKndFheDYtMFxW6V2I=",
"flutter_gpu.zip": "sha256-b7GxH12dA1rGr1TUMFAm0R2xCGTwUIYHr0/Pktck+Rg=",
"flutter_patched_sdk.zip": "sha256-qiZzEVkaRfD3ELEmsQQrN9tvF9MMiEsRioGcaT6qW5E=",
"flutter_patched_sdk_product.zip": "sha256-jAD6sghpvJb/WUuPaT8SQGWnNCBE82qAOF41E8gE/LE=",
"ios-profile/artifacts.zip": "sha256-c8UEecqig9GwF3p+rS+KoCSieN1bfxX4vbL3RnNa9qU=",
"ios-release/artifacts.zip": "sha256-nfQ8YxiKXY4LYjiSfDGub6afhlnSPDIZ2+9wYrWkpsI=",
"ios/artifacts.zip": "sha256-63HYgql1rNuOqZtyCDyThXzFiE5YCLGqCw5XFtZfEn0=",
"linux-arm64-debug/linux-arm64-flutter-gtk.zip": "sha256-/bTubsiLpGYDywasjZxIylUitAQDFe83MQbC1E/PXLo=",
"linux-arm64-profile/linux-arm64-flutter-gtk.zip": "sha256-K7RhTflYahi7rQ9V4vhoHgG7iUkyUMx1BgdVKcayxuw=",
"linux-arm64-release/linux-arm64-flutter-gtk.zip": "sha256-m06sitBb919gU4G4g0hE0pCxW36H+d15NRQNCLvW3v4=",
"linux-arm64/artifacts.zip": "sha256-Sn3DR+eIvjae5SS7sX60IaFLDsEXOLBSxtKE4pTj6mM=",
"linux-arm64/font-subset.zip": "sha256-lGHk7ac3yS1Q51qRP5pj5y626TJzz3AzQTlx38N1hLI=",
"linux-x64-debug/linux-x64-flutter-gtk.zip": "sha256-ntz4GCTMutdQgqSxdC69YtIZFct4UkvYz5AbJT/6rVQ=",
"linux-x64-profile/linux-x64-flutter-gtk.zip": "sha256-kKePD4dJdAIBiEL2rBqGZCzP7PRlukEVq+yoTvW2p94=",
"linux-x64-release/linux-x64-flutter-gtk.zip": "sha256-oftxkU+eDRLWggV+EAymWk0pWsz3K5VaL6so9KpZAJo=",
"linux-x64/artifacts.zip": "sha256-NjqBtYiJahp52E7V7Px/wnGZVWjsFmPKxAbMIYL4kGg=",
"linux-x64/font-subset.zip": "sha256-dZXC7iFVzb/V8QTbfscdkdtjTzdMy7ce0Z1GlX+jm9E=",
"sky_engine.zip": "sha256-Zq7h04ARytTgc3yBUHNeUw50dzOPquZaiXtEC62RCFU=",
"windows-x64-debug/windows-x64-flutter.zip": "sha256-NhJsnViwfq+PGeCEqLNnx2lHDQgUptsRun3RStkbeCI=",
"windows-x64-profile/windows-x64-flutter.zip": "sha256-m07X3s+PYps2GzHNt4HfuRiJjXQse6v14GGwjh9yqiE=",
"windows-x64-release/windows-x64-flutter.zip": "sha256-PY5eIoQdDN58L41mnfk3LImf8FlRsp5ue9nbnYouvM4=",
"windows-x64/artifacts.zip": "sha256-eDq8AoAXetZoMM1Zovw1Jm2mGFHWWbmg2XzsSb558Rk=",
"windows-x64/flutter-cpp-client-wrapper.zip": "sha256-nqgeZnzp7dKgs+lp2jVrRgvvRD+MGi2NceqivM6Qk0I=",
"windows-x64/font-subset.zip": "sha256-1WbKyP4By37Tci6nQ2S7OsCKnWScflYk7T5L0P0DGuQ="
},
"version": "3.35.7",
"engineVersion": "035316565ad77281a75305515e4682e6c4c6f7ca",
"engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=",
"engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416",
"channel": "stable",
"dartHash": {
"aarch64-darwin": "sha256-AdBnLbgmZvcvlFLfOO4VFqcs2bwpgYvT6t34LkBVYVI=",
"aarch64-linux": "sha256-1i918/G/tEoi+9XPCltHx1hRbOyl3Me87IiJbiWD57o=",
"x86_64-darwin": "sha256-TGel6P9oew5ao8DAMS5kCxLl1eknjZG7Jc7A32YofXk=",
"x86_64-linux": "sha256-7CLoEnFYLe+B0+EOKlVa5dPYHGlRRlo9Fs/EeTjp+So="
"engineHashes": {
"aarch64-linux": {
"aarch64-linux": "sha256-v2L0MQRTXvWngb8fu/AR9iofq2CDq1HFedXE8cSzOws=",
"x86_64-linux": "sha256-v2L0MQRTXvWngb8fu/AR9iofq2CDq1HFedXE8cSzOws="
},
"x86_64-linux": {
"aarch64-linux": "sha256-RKfKhFwlwVEguWqI6OinTqdCM3yNTP/5PwevREmS4Nk=",
"x86_64-linux": "sha256-RKfKhFwlwVEguWqI6OinTqdCM3yNTP/5PwevREmS4Nk="
}
},
"dartVersion": "3.9.2",
"engineVersion": "035316565ad77281a75305515e4682e6c4c6f7ca",
"dartHash": {
"x86_64-linux": "sha256-ZJcii2WBCE4PNt5+S2nH4hj+WoZuhRLFkzMlSZEa01Y=",
"aarch64-linux": "sha256-EzNApYsHor1suB9dFgJuewMqa0v7cADKLUzLym5GLOY=",
"x86_64-darwin": "sha256-mjWHCF5voWLKlqBKYhl2OKg2aDx0pyIQ1TlF6k4MQz0=",
"aarch64-darwin": "sha256-1rAfqatlOdphdi6dZSfUfKywAbdwRn6ijo60isjV3Lw="
},
"flutterHash": "sha256-0GI3P11vys6JU+H5MXKznHTItOXZwap7bxHzgj6umc4=",
"artifactHashes": {
"android": {
"aarch64-darwin": "sha256-BbwfmKPmxZUPVoZEE687vudBCBPzVM/C9ehPEAPr6Jw=",
"aarch64-linux": "sha256-Pgc/ybLcRFJkbGUI2eY689yxOv2VyKdO/F5vGkTg/tM=",
"x86_64-darwin": "sha256-BbwfmKPmxZUPVoZEE687vudBCBPzVM/C9ehPEAPr6Jw=",
"x86_64-linux": "sha256-Pgc/ybLcRFJkbGUI2eY689yxOv2VyKdO/F5vGkTg/tM="
},
"fuchsia": {
"aarch64-darwin": "sha256-qpHjEpuIK1hI6ga1qr0Q/t5S2Jjk8oUpnkeXsIeu7UM=",
"aarch64-linux": "sha256-qpHjEpuIK1hI6ga1qr0Q/t5S2Jjk8oUpnkeXsIeu7UM=",
"x86_64-darwin": "sha256-qpHjEpuIK1hI6ga1qr0Q/t5S2Jjk8oUpnkeXsIeu7UM=",
"x86_64-linux": "sha256-qpHjEpuIK1hI6ga1qr0Q/t5S2Jjk8oUpnkeXsIeu7UM="
},
"ios": {
"aarch64-darwin": "sha256-ZjNJhDXqv9dg9Gn62TRYX1Vb4Qn0adS5nxxpYZOGsgY=",
"aarch64-linux": "sha256-ZjNJhDXqv9dg9Gn62TRYX1Vb4Qn0adS5nxxpYZOGsgY=",
"x86_64-darwin": "sha256-ZjNJhDXqv9dg9Gn62TRYX1Vb4Qn0adS5nxxpYZOGsgY=",
"x86_64-linux": "sha256-ZjNJhDXqv9dg9Gn62TRYX1Vb4Qn0adS5nxxpYZOGsgY="
},
"linux": {
"aarch64-darwin": "sha256-TB9BOiV1Z1cKJKusNW4O0oJEJCt9XmWN+g4yCXtyepc=",
"aarch64-linux": "sha256-TB9BOiV1Z1cKJKusNW4O0oJEJCt9XmWN+g4yCXtyepc=",
"x86_64-darwin": "sha256-7BocNpo89xSXNy6yob+EESVfalm2olwR/knVfq9I1VA=",
"x86_64-linux": "sha256-7BocNpo89xSXNy6yob+EESVfalm2olwR/knVfq9I1VA="
},
"macos": {
"aarch64-darwin": "sha256-vnV12shNi630OuyWTey/31vsmAcF7UMEgfdBZBXWc4c=",
"aarch64-linux": "sha256-vnV12shNi630OuyWTey/31vsmAcF7UMEgfdBZBXWc4c=",
"x86_64-darwin": "sha256-vnV12shNi630OuyWTey/31vsmAcF7UMEgfdBZBXWc4c=",
"x86_64-linux": "sha256-vnV12shNi630OuyWTey/31vsmAcF7UMEgfdBZBXWc4c="
},
"universal": {
"aarch64-darwin": "sha256-oPUDsJxKbbWEH1XgxOFoBnVYJAjgeCBKIrYtBafWtWU=",
"aarch64-linux": "sha256-ae6UH4K09lcl7UZzD/WKFxWUKEZQsLmizODs/RMKcis=",
"x86_64-darwin": "sha256-wxDWrT35CUIEQaKeIK0adr0oPfv6to60Z6R+8zrwhmU=",
"x86_64-linux": "sha256-CxvOlq8nxeY5esRanl2N7oO4RFgBTwQcRdS7Pp/5tt8="
},
"web": {
"aarch64-darwin": "sha256-T+LR7Yo2hEy24u3aS+ehp9nyRBB+3dNDyF6jw1oOd1o=",
"aarch64-linux": "sha256-T+LR7Yo2hEy24u3aS+ehp9nyRBB+3dNDyF6jw1oOd1o=",
"x86_64-darwin": "sha256-T+LR7Yo2hEy24u3aS+ehp9nyRBB+3dNDyF6jw1oOd1o=",
"x86_64-linux": "sha256-T+LR7Yo2hEy24u3aS+ehp9nyRBB+3dNDyF6jw1oOd1o="
},
"windows": {
"x86_64-darwin": "sha256-xTWgw8JE/4R9UcdZmLEbMk+yL2V3zfAIXDRli9XYe5k=",
"x86_64-linux": "sha256-xTWgw8JE/4R9UcdZmLEbMk+yL2V3zfAIXDRli9XYe5k="
}
},
"pubspecLock": {
"packages": {
"_fe_analyzer_shared": {
@@ -1081,6 +1076,5 @@
"sdks": {
"dart": ">=3.9.0-21.0.dev <4.0.0"
}
},
"version": "3.35.7"
}
}

View File

@@ -1,12 +0,0 @@
--- a/bin/internal/content_aware_hash.sh
+++ b/bin/internal/content_aware_hash.sh
@@ -13,6 +13,9 @@
set -e
+echo '0000000000000000000000000000000000000000'
+exit 0
+
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
unset GIT_DIR

View File

@@ -1,51 +0,0 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -318,7 +318,7 @@
var fatalStorageWarning = true;
static RandomAccessFile? _lock;
- static var _lockEnabled = true;
+ static var _lockEnabled = false;
/// Turn off the [lock]/[releaseLock] mechanism.
///
@@ -721,7 +721,6 @@
}
void setStampFor(String artifactName, String version) {
- getStampFileFor(artifactName).writeAsStringSync(version);
}
File getStampFileFor(String artifactName) {
@@ -1010,31 +1009,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
- engineVersion ??= version;
- final url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
-
- var exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
- }
-
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
- }
return true;
}

View File

@@ -1,131 +0,0 @@
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -97,11 +97,7 @@
}
}
- final String frameworkRevision = _runGit(
- gitLog(<String>['-n', '1', '--pretty=format:%H']).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ final String frameworkRevision = 'nixpkgs000000000000000000000000000000000';
return FlutterVersion.fromRevision(
clock: clock,
@@ -207,16 +203,7 @@
final String flutterRoot;
String _getTimeSinceCommit({String? revision}) {
- return _runGit(
- FlutterVersion.gitLog(<String>[
- '-n',
- '1',
- '--pretty=format:%ar',
- if (revision != null) revision,
- ]).join(' '),
- globals.processUtils,
- flutterRoot,
- );
+ return 'unknown';
}
// TODO(fujino): calculate this relative to frameworkCommitDate for
@@ -380,9 +367,7 @@
/// remote git repository is not reachable due to a network issue.
static Future<String> fetchRemoteFrameworkCommitDate() async {
try {
- // Fetch upstream branch's commit and tags
- await _run(<String>['git', 'fetch', '--tags']);
- return _gitCommitDate(gitRef: kGitTrackingUpstream, workingDirectory: Cache.flutterRoot);
+ return 'unknown';
} on VersionCheckError catch (error) {
globals.printError(error.message);
rethrow;
@@ -407,14 +392,7 @@
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'` ([kUserBranch]).
String getBranchName({bool redactUnknownBranches = false}) {
- _branch ??= () {
- final String branch = _runGit(
- 'git symbolic-ref --short HEAD',
- globals.processUtils,
- flutterRoot,
- );
- return branch == 'HEAD' ? '' : branch;
- }();
+ _branch ??= 'stable';
if (redactUnknownBranches || _branch!.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!kOfficialChannels.contains(_branch) && !kObsoleteBranches.containsKey(_branch)) {
@@ -457,30 +435,7 @@
bool lenient = false,
required String? workingDirectory,
}) {
- final List<String> args = FlutterVersion.gitLog(<String>[
- gitRef,
- '-n',
- '1',
- '--pretty=format:%ad',
- '--date=iso',
- ]);
- try {
- // Don't plumb 'lenient' through directly so that we can print an error
- // if something goes wrong.
- return _runSync(args, lenient: false, workingDirectory: workingDirectory);
- } on VersionCheckError catch (e) {
- if (lenient) {
- final dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError(
- 'Failed to find the latest git commit date: $e\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- } else {
- rethrow;
- }
- }
+ return 'unknown';
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -621,20 +576,7 @@
@override
String? get repositoryUrl {
if (_repositoryUrl == null) {
- final String gitChannel = _runGit(
- 'git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
- globals.processUtils,
- flutterRoot,
- );
- final int slash = gitChannel.indexOf('/');
- if (slash != -1) {
- final String remote = gitChannel.substring(0, slash);
- _repositoryUrl = _runGit(
- 'git ls-remote --get-url $remote',
- globals.processUtils,
- flutterRoot,
- );
- }
+ _repositoryUrl = 'https://github.com/flutter/flutter.git';
}
return _repositoryUrl;
}
@@ -1015,6 +957,16 @@
final String gitTag;
static GitTagVersion determine(
+ ProcessUtils processUtils,
+ Platform platform, {
+ String? workingDirectory,
+ bool fetchTags = false,
+ String gitRef = 'HEAD',
+ }) {
+ return GitTagVersion.unknown();
+ }
+
+ static GitTagVersion determine_orig(
ProcessUtils processUtils,
Platform platform, {
String? workingDirectory,

View File

@@ -1,80 +1,75 @@
{
"artifactHashes": {
"android-arm-profile/artifacts.zip": "sha256-SszXOMnso0LzdaOUl5I2v9Kfx+xFfrssoB6d5wk8IQ8=",
"android-arm-profile/darwin-x64.zip": "sha256-eEmHXcgcsNt5AXoV/g876veTV4hGTHFx8KPs/pB1h44=",
"android-arm-profile/linux-x64.zip": "sha256-UStYtnQ2bO0QYwsLYlvDcAxd02kauagXAndHERlXhYE=",
"android-arm-profile/windows-x64.zip": "sha256-QzhKpS9nPLfcxUHipL9emSROXxAukOOOy/4Bv9g4UFg=",
"android-arm-release/artifacts.zip": "sha256-DOn06RWlhwJDeVqr6slARQywnbLdRHp45UXA8ek0xTA=",
"android-arm-release/darwin-x64.zip": "sha256-hWULmwI30CgXHBr/DPuQwsUWdEYcEb1zu2wDrlQ8dbI=",
"android-arm-release/linux-x64.zip": "sha256-7Pkw0ahZkFT/CM0xdJPGqfjFgg8UcSoPfKawMlI7uSo=",
"android-arm-release/windows-x64.zip": "sha256-Kq6EURxjwsnzwaFziy3wshrgr14+Nz50Mug6gHGKByk=",
"android-arm/artifacts.zip": "sha256-PDy8hUidPU/KhQ7jzv3scnquh8W1Lu2N/DzrC2xjyhw=",
"android-arm64-profile/artifacts.zip": "sha256-8v9xjQQ9sCdIJc9m3gfb5GikjTnMLOZNhqV4HuyxjKM=",
"android-arm64-profile/darwin-x64.zip": "sha256-0DWhGSixA3wBMk4cy14JnyGs9qz9MXbGAVLQdHtltqI=",
"android-arm64-profile/linux-x64.zip": "sha256-muSzoz1hv1/itvt9RE2PoJtPGLWP6vTTOX1Mzz+H4kU=",
"android-arm64-profile/windows-x64.zip": "sha256-vxLVdkEJL3eriZDIKgoUoaTRgEwxGh+/8LLpeRSPc1g=",
"android-arm64-release/artifacts.zip": "sha256-T00v6QgwlD8yeb+KZaq5Oze7BNi7QVk2umouGMxzcDk=",
"android-arm64-release/darwin-x64.zip": "sha256-jONivWNSZxD3ZdhNA0+3UBsI5SBr6Ghxgub34vDj66w=",
"android-arm64-release/linux-x64.zip": "sha256-DHxJksRVK4dYoxI3mb7MfQrTki8CrTFurjtgj9f+7cg=",
"android-arm64-release/windows-x64.zip": "sha256-r0B8VB16L/zGyEopOUoFJj+Pb9WgfG0Iv+U5z8d6PK4=",
"android-arm64/artifacts.zip": "sha256-hfxdM6OoWyqh5iwyXNo5qXLvvIONhdA/60g1SsPOjZU=",
"android-x64-profile/artifacts.zip": "sha256-h+Lhj5j9CzLGUu9f3oX8kZ75B0s7iehmr/D7uv3t5yk=",
"android-x64-profile/darwin-x64.zip": "sha256-cHGALDMpEuzlW8kW+kB5H1Tk8E4KrTiiclj5ZmOcMp4=",
"android-x64-profile/linux-x64.zip": "sha256-cta/XKPOwgyIJUR3l1Qdmaexh60WQ3RiBlCwM4hc0Q0=",
"android-x64-profile/windows-x64.zip": "sha256-h6CPE4lPvSxCziroNuRYtSPqEmMfDeau/7MW7F4Ne5E=",
"android-x64-release/artifacts.zip": "sha256-cyGK3qsmfnK1kD+kD23PUy6EeJOz4eGqQlRnQcY1K7Y=",
"android-x64-release/darwin-x64.zip": "sha256-gImreJnjCb+OF3dXQE4WE1S0h13Z/5xFmVuBcUJvGrY=",
"android-x64-release/linux-x64.zip": "sha256-43NlGPjZK8V2i6Tv5rRhZBI3ItpSSIXrke13/uAGct8=",
"android-x64-release/windows-x64.zip": "sha256-CcLvO3w1LLlMTVQ5TR8sTL5sCMZXsGVa5u5j1fh/mSs=",
"android-x64/artifacts.zip": "sha256-ALbGKIFJ9n+cvE4+00doce+0LenwbOUyQtiflC2GJ7M=",
"android-x86/artifacts.zip": "sha256-ovnEERQizyUxcucOxLqxrK1dBO5IqKHsI7ob94w8G4o=",
"darwin-arm64/artifacts.zip": "sha256-+yIE6rmPxgTv8Uuhi8lzyMTG5zpb0R2Li7P/xhkvRSA=",
"darwin-arm64/font-subset.zip": "sha256-5yR3y+FYn2Fkudqe9QiLWDbCE811Ds9hac4jTCLiW1w=",
"darwin-x64-profile/artifacts.zip": "sha256-jD4X0HBjJIbuBsamH8bexBWGcMqhyk3hSOMKtempgPQ=",
"darwin-x64-profile/framework.zip": "sha256-NNDGYSL7/9841I2siCzFwjRaZu8Td4c+f/JF1Q2IenE=",
"darwin-x64-profile/gen_snapshot.zip": "sha256-CBGLnupxRxFk16ww97RC3XZRr53pKYQX6PtMfM+53sk=",
"darwin-x64-release/artifacts.zip": "sha256-4dA2edSUJHJfdGb9JwfkBe60R2TuENN3R8RlwUEh1Hk=",
"darwin-x64-release/framework.zip": "sha256-QiQwwJtwYutkbAhF0YtWuBP3mMRJ+4W0Kns//sXzpzU=",
"darwin-x64-release/gen_snapshot.zip": "sha256-a1ajKvgccl/745zxbGPNtqBIzNrkuHWNh9DNxS1Gn8U=",
"darwin-x64/artifacts.zip": "sha256-qVdAKm7Crnm0DEkw9PTf4KBA45PdoGZdsr5F5BWXtLw=",
"darwin-x64/font-subset.zip": "sha256-hLgb0BCZXwOlch1nD8SK7Bf2ao9gE1IUjlThRYxg/8c=",
"darwin-x64/framework.zip": "sha256-wLWLQpjFCitYNUJpMNsH3kCKRe+ADQixrEWSrKgK/w0=",
"darwin-x64/gen_snapshot.zip": "sha256-gbxqc2Rr0ftDftiV5l8FG3oFtpJ1fkB+TzQXCyiMEqk=",
"flutter-web-sdk.zip": "sha256-2mtnmqOWwnHd6wLyxEpaTCzSAMSXxLaBSgZBetum3N0=",
"flutter_gpu.zip": "sha256-+4BSuZJDwZoUMnd99U2FJa9A6+1ZsR4gpGyjfNszVlU=",
"flutter_patched_sdk.zip": "sha256-0IJy6Rhm41zE4uanx0KClZ2C3YOaKrT34ZmIgkyyFbs=",
"flutter_patched_sdk_product.zip": "sha256-XJtmN6N3RMJRJA78xHg5wsfXrcoKXelC4CJXVOUhyCw=",
"ios-profile/artifacts.zip": "sha256-65Qje/KLH0Y/r1iowRiTdXHOPX+4TNXkxRtA2T9pyP8=",
"ios-release/artifacts.zip": "sha256-tfYI/LC3GyjVOxvuAWbWq9/oYuHLl2iZxZ9CFTWwzoI=",
"ios/artifacts.zip": "sha256-njLT9/SY6fhqZYdBlF7LruNG40y+0CxmCeTd9HGoURk=",
"linux-arm64-debug/linux-arm64-flutter-gtk.zip": "sha256-SZ5o61Wz4DUFiLPDwR4BE2c/Ppm9wU9zqpO4cVg6sjk=",
"linux-arm64-profile/linux-arm64-flutter-gtk.zip": "sha256-TEY+99KUeI8sLWNGcG3bAAhbhhXDPl+jKzQMq9XO6N0=",
"linux-arm64-release/linux-arm64-flutter-gtk.zip": "sha256-pWknANDo3Jb0ctSAE8gBAwpjEPfxoXhBzu98BsQrLPI=",
"linux-arm64/artifacts.zip": "sha256-u/wxbplJm8pEGiZ4PM8apWcYwSXrV85JbfVqtn8MQXc=",
"linux-arm64/font-subset.zip": "sha256-S2SY5yXZht/Wj3GF4t+VPdJDNxe4q8aeiFvRboJDevk=",
"linux-x64-debug/linux-x64-flutter-gtk.zip": "sha256-3DiNbB+xSa/bYqoi/29JdGaIv+fIzrpfKFH1toQQo/M=",
"linux-x64-profile/linux-x64-flutter-gtk.zip": "sha256-m2h6C1ApGqIBfZ01agnzngbuhzAapmzrpc4FzwjjlN0=",
"linux-x64-release/linux-x64-flutter-gtk.zip": "sha256-Mcb7/sF0bc4L0T73iuUWou/OOlcuOuwQrRfqLQMrCO4=",
"linux-x64/artifacts.zip": "sha256-ie03ozwWndpB3ztxugUY4v0gCHav2chK6PbgxheKI/k=",
"linux-x64/font-subset.zip": "sha256-NKJnqJsOGO6Gh0/GJ/kLOhncmYIwRHSP6tx5fm909Wc=",
"sky_engine.zip": "sha256-nz7bVhV2odmt16WL4yp4eMa1/ecg1IGTewEvgPagIsY=",
"windows-x64-debug/windows-x64-flutter.zip": "sha256-bG/Yv0yrNMTH8aBgRQBTaG6Wo2KsUYUAccjWhWY+FW4=",
"windows-x64-profile/windows-x64-flutter.zip": "sha256-2/3kncn1RB1U41T83xudVsRqXhD3kGiiPbbAixeyQA0=",
"windows-x64-release/windows-x64-flutter.zip": "sha256-NL1801xcnuJ60D/KF8A0F8gEJ9TGFhnR8+mwKFnC4V4=",
"windows-x64/artifacts.zip": "sha256-rXQrattA8ykNsOzQlcaKX7EJt43gfOBtXyg9r2/Voq4=",
"windows-x64/flutter-cpp-client-wrapper.zip": "sha256-Qg4orxxNDofGOb9iiEapIjXh5aRdAewft7XZn/jw1FM=",
"windows-x64/font-subset.zip": "sha256-bVoEA88BeTe0zqjQEKzXgG4xfamSXv1oUdSqPwoB3pQ="
},
"version": "3.38.10",
"engineVersion": "cafcda5721a78a7884db92f13c5e89f7643d52dd",
"engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=",
"engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416",
"channel": "stable",
"dartHash": {
"aarch64-darwin": "sha256-99gMhvkzSJmYEsGuD3kBN1e3l685Xyy6cNICegC+Vk4=",
"aarch64-linux": "sha256-Z8mPnmppTtPLNiY0Ny1pRzBAs3EoNtQsr82zxWwKBOs=",
"x86_64-darwin": "sha256-pd37vWDOIKGdek/CuUSH7sVyiKqlLOW6GLT4IkzkwYA=",
"x86_64-linux": "sha256-1DudOiG4LvKjfTGUW5nmuI9fjcROwZG0c/1inXjQuZQ="
"engineHashes": {
"aarch64-linux": {
"aarch64-linux": "sha256-qhOj6VT1aKhBApEr5R10NwalozUPMQKuUXfhcscTDTs=",
"x86_64-linux": "sha256-qhOj6VT1aKhBApEr5R10NwalozUPMQKuUXfhcscTDTs="
},
"x86_64-linux": {
"aarch64-linux": "sha256-VriQI7YmeM/HrZvLPRllxn5D/0r5xJiCzsn4XeBXO+A=",
"x86_64-linux": "sha256-VriQI7YmeM/HrZvLPRllxn5D/0r5xJiCzsn4XeBXO+A="
}
},
"dartVersion": "3.10.9",
"engineVersion": "cafcda5721a78a7884db92f13c5e89f7643d52dd",
"dartHash": {
"x86_64-linux": "sha256-Js8cesRAseVfa5CCQSmnJJVBYl+S7Zy7ax/vNbWMjQ0=",
"aarch64-linux": "sha256-Ba7CCHPzor8H6ksrQUqDnx82i92OSE4qiihMaDKNexI=",
"x86_64-darwin": "sha256-btQavXZ3CVM0ByGlZJ5z2TUfXsPljY4iFeU1rgf4KQE=",
"aarch64-darwin": "sha256-zmEK01ooqIKtVlw+7JlDAVvviFOcaqOrbGPkdirst6A="
},
"flutterHash": "sha256-dFVejSD3l2C6FM3/vimOId5Nklctv7ISO9uDhLTNf80=",
"artifactHashes": {
"android": {
"aarch64-darwin": "sha256-NFvkU3aDAmCAuO+ZrNaY5CJpPyioc6eB6cFZfziXEQU=",
"aarch64-linux": "sha256-eHu5nWrxht1O6dP6LQ2UHNpPMNaRt/vL+cY2Okhtn0g=",
"x86_64-darwin": "sha256-NFvkU3aDAmCAuO+ZrNaY5CJpPyioc6eB6cFZfziXEQU=",
"x86_64-linux": "sha256-eHu5nWrxht1O6dP6LQ2UHNpPMNaRt/vL+cY2Okhtn0g="
},
"fuchsia": {
"aarch64-darwin": "sha256-DUlLvOGzLasLtZgndXew3l6w7VLDnrE5NqN3em1MVXE=",
"aarch64-linux": "sha256-DUlLvOGzLasLtZgndXew3l6w7VLDnrE5NqN3em1MVXE=",
"x86_64-darwin": "sha256-DUlLvOGzLasLtZgndXew3l6w7VLDnrE5NqN3em1MVXE=",
"x86_64-linux": "sha256-DUlLvOGzLasLtZgndXew3l6w7VLDnrE5NqN3em1MVXE="
},
"ios": {
"aarch64-darwin": "sha256-+aKuaOXWEzDXWG2tMz7u3MLuiHSa3XyYHrfBGwRxUHI=",
"aarch64-linux": "sha256-+aKuaOXWEzDXWG2tMz7u3MLuiHSa3XyYHrfBGwRxUHI=",
"x86_64-darwin": "sha256-+aKuaOXWEzDXWG2tMz7u3MLuiHSa3XyYHrfBGwRxUHI=",
"x86_64-linux": "sha256-+aKuaOXWEzDXWG2tMz7u3MLuiHSa3XyYHrfBGwRxUHI="
},
"linux": {
"aarch64-darwin": "sha256-IMa7QTMRYoWlJcI/SCO6aBtmKtIozQAcAgeQFWCFgb4=",
"aarch64-linux": "sha256-IMa7QTMRYoWlJcI/SCO6aBtmKtIozQAcAgeQFWCFgb4=",
"x86_64-darwin": "sha256-nmLLXotJuHrFrpRMjdb/38l/rPRDiFvFf0BwfVvs9V8=",
"x86_64-linux": "sha256-nmLLXotJuHrFrpRMjdb/38l/rPRDiFvFf0BwfVvs9V8="
},
"macos": {
"aarch64-darwin": "sha256-p/ysd+1EOSaKmHRWYr/lYCo8H1oty4GC0Moaw+PC72A=",
"aarch64-linux": "sha256-p/ysd+1EOSaKmHRWYr/lYCo8H1oty4GC0Moaw+PC72A=",
"x86_64-darwin": "sha256-p/ysd+1EOSaKmHRWYr/lYCo8H1oty4GC0Moaw+PC72A=",
"x86_64-linux": "sha256-p/ysd+1EOSaKmHRWYr/lYCo8H1oty4GC0Moaw+PC72A="
},
"universal": {
"aarch64-darwin": "sha256-viiNdnQKAaTO91yNwGrSwr5jT2Zm+38rLNCyb7N3faw=",
"aarch64-linux": "sha256-u9qKNkrdxkIVP4+rn0vzDSY37twJ/TLV7nfX6IqRj+4=",
"x86_64-darwin": "sha256-ztUb0vhegvskVdXcIi6xQtfJdIZTCWQB8zfR0CTLD54=",
"x86_64-linux": "sha256-Xlm/ds/m0nm2cAXszCxCCjMNDyyK4AcldrvnwYImxSE="
},
"web": {
"aarch64-darwin": "sha256-CkFJ96IWOk3q+VjPzpieyp8IMiTaTKgnAQpyltHeMnw=",
"aarch64-linux": "sha256-CkFJ96IWOk3q+VjPzpieyp8IMiTaTKgnAQpyltHeMnw=",
"x86_64-darwin": "sha256-CkFJ96IWOk3q+VjPzpieyp8IMiTaTKgnAQpyltHeMnw=",
"x86_64-linux": "sha256-CkFJ96IWOk3q+VjPzpieyp8IMiTaTKgnAQpyltHeMnw="
},
"windows": {
"x86_64-darwin": "sha256-HId39NR+rbe1fqEssNb7gD6bvmeLj1N9UJYV8hxJFt0=",
"x86_64-linux": "sha256-HId39NR+rbe1fqEssNb7gD6bvmeLj1N9UJYV8hxJFt0="
}
},
"pubspecLock": {
"packages": {
"_fe_analyzer_shared": {
@@ -1091,6 +1086,5 @@
"sdks": {
"dart": ">=3.9.0 <4.0.0"
}
},
"version": "3.38.10"
}
}

View File

@@ -1,12 +0,0 @@
--- a/bin/internal/content_aware_hash.sh
+++ b/bin/internal/content_aware_hash.sh
@@ -13,6 +13,9 @@
set -e
+echo '0000000000000000000000000000000000000000'
+exit 0
+
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
unset GIT_DIR

View File

@@ -1,51 +0,0 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -318,7 +318,7 @@
var fatalStorageWarning = true;
static RandomAccessFile? _lock;
- static var _lockEnabled = true;
+ static var _lockEnabled = false;
/// Turn off the [lock]/[releaseLock] mechanism.
///
@@ -721,7 +721,6 @@
}
void setStampFor(String artifactName, String version) {
- getStampFileFor(artifactName).writeAsStringSync(version);
}
File getStampFileFor(String artifactName) {
@@ -1010,31 +1009,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
- engineVersion ??= version;
- final url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
-
- var exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
- }
-
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
- }
return true;
}

View File

@@ -1,131 +0,0 @@
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -99,10 +99,7 @@
}
}
- final String frameworkRevision = git
- .logSync(['-n', '1', '--pretty=format:%H'], workingDirectory: flutterRoot)
- .stdout
- .trim();
+ final String frameworkRevision = 'nixpkgs000000000000000000000000000000000';
return FlutterVersion.fromRevision(
clock: clock,
@@ -222,10 +219,7 @@
final String flutterRoot;
String _getTimeSinceCommit({String? revision}) {
- return _git
- .logSync(['-n', '1', '--pretty=format:%ar', ?revision], workingDirectory: flutterRoot)
- .stdout
- .trim();
+ return 'unknown';
}
// TODO(fujino): calculate this relative to frameworkCommitDate for
@@ -391,13 +385,7 @@
/// remote git repository is not reachable due to a network issue.
Future<String> _fetchRemoteFrameworkCommitDate() async {
try {
- // Fetch upstream branch's commit and tags
- await _run(_git, ['fetch', '--tags']);
- return _gitCommitDate(
- git: _git,
- gitRef: kGitTrackingUpstream,
- workingDirectory: Cache.flutterRoot,
- );
+ return 'unknown';
} on VersionCheckError catch (error) {
globals.printError(error.message);
rethrow;
@@ -422,13 +410,7 @@
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'` ([kUserBranch]).
String getBranchName({bool redactUnknownBranches = false}) {
- _branch ??= () {
- final String branch = _git
- .runSync(['symbolic-ref', '--short', 'HEAD'], workingDirectory: flutterRoot)
- .stdout
- .trim();
- return branch == 'HEAD' ? '' : branch;
- }();
+ _branch ??= 'stable';
if (redactUnknownBranches || _branch!.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!kOfficialChannels.contains(_branch) && !kObsoleteBranches.containsKey(_branch)) {
@@ -464,31 +446,7 @@
required Git git,
required String? workingDirectory,
}) {
- final RunResult result = git.logSync([
- gitRef,
- '-n',
- '1',
- '--pretty=format:%ad',
- '--date=iso',
- ], workingDirectory: workingDirectory);
- if (result.exitCode == 0) {
- return result.stdout.trim();
- }
- final error = VersionCheckError(
- 'Command exited with code ${result.exitCode}: ${result.command.join(' ')}\n'
- 'Standard out: ${result.stdout}\n'
- 'Standard error: ${result.stderr}',
- );
- if (lenient) {
- final dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError(
- 'Failed to find the latest git commit date: $error\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- }
- throw error;
+ return 'unknown';
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -639,23 +597,7 @@
@override
String? get repositoryUrl {
if (_repositoryUrl == null) {
- final String gitChannel = _git
- .runSync([
- 'rev-parse',
- '--abbrev-ref',
- '--symbolic',
- kGitTrackingUpstream,
- ], workingDirectory: flutterRoot)
- .stdout
- .trim();
- final int slash = gitChannel.indexOf('/');
- if (slash != -1) {
- final String remote = gitChannel.substring(0, slash);
- _repositoryUrl = _git
- .runSync(['ls-remote', '--get-url', remote], workingDirectory: flutterRoot)
- .stdout
- .trim();
- }
+ _repositoryUrl = 'https://github.com/flutter/flutter.git';
}
return _repositoryUrl;
}
@@ -1005,6 +947,16 @@
final String gitTag;
static GitTagVersion determine(
+ Platform platform, {
+ required Git git,
+ String? workingDirectory,
+ bool fetchTags = false,
+ String gitRef = 'HEAD',
+ }) {
+ return GitTagVersion.unknown();
+ }
+
+ static GitTagVersion determine_orig(
Platform platform, {
required Git git,
String? workingDirectory,

View File

@@ -1,80 +1,75 @@
{
"artifactHashes": {
"android-arm-profile/artifacts.zip": "sha256-plu68ELMftDhiYcgkJBaE8asLzo2ctLl/2ba4efaBlg=",
"android-arm-profile/darwin-x64.zip": "sha256-YqIngn4CqUWFTw7DJ0uzQbTC5LPXy/eMS7j3fpdk0Zs=",
"android-arm-profile/linux-x64.zip": "sha256-mysciyN6YhdyMU1eJuGbVVNWF65NiPn9hLv0TdYYIZ0=",
"android-arm-profile/windows-x64.zip": "sha256-OHZ0sgA1cY4PA9W2Ih8sSTeM+DKMZUtYl7wUVcFZiOw=",
"android-arm-release/artifacts.zip": "sha256-TYHND/VUpanPdCII9d9Db66M4U3Lsu3/Pbol8UNBCMk=",
"android-arm-release/darwin-x64.zip": "sha256-sEPX65dQSMVliEnYTCxN06ZKjp1RwhMeoSuhH/LZNS0=",
"android-arm-release/linux-x64.zip": "sha256-tP3BZFvzhIK5CawnU+ubmq+GRFqfPJ5POoaoHG+RdD4=",
"android-arm-release/windows-x64.zip": "sha256-Y3sDe7MtG0NRHvnLLIjUIXOsXXrRclhexta41SUa9Qs=",
"android-arm/artifacts.zip": "sha256-Y4ocz8l+LI1ojslfOloU3KgCC2i8etsEmZY99UnoAI4=",
"android-arm64-profile/artifacts.zip": "sha256-VAocgCx7m8pM8PXK/mLzqNaJBzRfg3cCl45uVT7KdQU=",
"android-arm64-profile/darwin-x64.zip": "sha256-UXz/SAQstAtTmjdSdxql7OUlqsnkzr56vwnMkToeObk=",
"android-arm64-profile/linux-x64.zip": "sha256-iprtcLB/sCngKjPcN3lHaqLL2QndGo3KbQIsdnqtlKE=",
"android-arm64-profile/windows-x64.zip": "sha256-x5RmwOpJ+O77IxhTJ2+wXlMqgaNdT9dCV6p1aMooSl0=",
"android-arm64-release/artifacts.zip": "sha256-oQI+gLEf0NsWYVH/9124njBEctiBUKvuNWnghaaLO9s=",
"android-arm64-release/darwin-x64.zip": "sha256-wWjvqLRtsm+0SDYYg8lw+vCBNBDKzcJpzOkmEuSdEls=",
"android-arm64-release/linux-x64.zip": "sha256-YmrheUHylvRK/FlOZkRMD9i47K5U8obOraRFsXKhwhs=",
"android-arm64-release/windows-x64.zip": "sha256-riqR9TEIb9f/QaWcPbhkNUIEdJ5ZQIKKxoD5KlCB5yc=",
"android-arm64/artifacts.zip": "sha256-UZUCwJxdjiZy4UZz6xCyuWsSmequIptaPxCIeczw8Vg=",
"android-x64-profile/artifacts.zip": "sha256-+mbN3pO70AcmEJZYOb4or2BV8p9yYjZYHxZaNSb5QPk=",
"android-x64-profile/darwin-x64.zip": "sha256-w2ggxB3eSCwvKCohnJlbX258nQUMjK8s4jXkr74m4aw=",
"android-x64-profile/linux-x64.zip": "sha256-Vggd6cRe2d3zFSG570+TZUoHNPJuVHjleSQnDfqKsxQ=",
"android-x64-profile/windows-x64.zip": "sha256-4zguzW7Tm7nscfApeeaHbYPy9+Jw3o22gRxXZZ79ae8=",
"android-x64-release/artifacts.zip": "sha256-DfdyXrqSGxemAlvF/nwjcWkjo2d/fwWOyVWGPiM3Ff8=",
"android-x64-release/darwin-x64.zip": "sha256-H8r9NtoVKfI0Y09HKBA2TzjPZhBTktUrJyZsXJL1Z+Y=",
"android-x64-release/linux-x64.zip": "sha256-HZEh7f0vWDPtqYAqJ5CdgAhpUJW5RWLg25yyDpM3rX4=",
"android-x64-release/windows-x64.zip": "sha256-5zNvcGkL9ArsrZ+PHvWi97kUc6h+EWckIUGM/KDz1Qw=",
"android-x64/artifacts.zip": "sha256-O+3ykJd+Z7ZB2sZbwe+KtdP2JiatnI4di0l8DsuUofc=",
"android-x86/artifacts.zip": "sha256-iLM7ZfYMPM3Lmbvo7XDJW0zFqu1tS7NxmbImq8Ke9hU=",
"darwin-arm64/artifacts.zip": "sha256-MVnRN8HvmsLqnsiBpNvbEvgGg4ino7SWgp+9Y/Kq76M=",
"darwin-arm64/font-subset.zip": "sha256-capuWYsdAFYRZGeSGoRpLfw116GMXTZQn18VTYRk7ss=",
"darwin-x64-profile/artifacts.zip": "sha256-UEVqrW7LcDMNe7vLnul9qnyvfA7bXULxv7FDRUzXhpU=",
"darwin-x64-profile/framework.zip": "sha256-+kxuSBSFLPAjcBee7DEupLnJP0HW5yzXF78MGLsur9o=",
"darwin-x64-profile/gen_snapshot.zip": "sha256-Q8mHzXPiAx2HReJHaYnWVLbf2PiuK5f0GFtT2Y+jqTA=",
"darwin-x64-release/artifacts.zip": "sha256-J+2vH/MLJ61kvVkIXxx1NGl2kSDPC8xFEvqeoopxwW4=",
"darwin-x64-release/framework.zip": "sha256-MsqwiLv7oTySmkeibNBQvmT63Fh5c8bGtexWRnWhIT8=",
"darwin-x64-release/gen_snapshot.zip": "sha256-ZvzW84hd3dyhsJLNw3bGUDH1vjuLzd6bFh+LY70NDLQ=",
"darwin-x64/artifacts.zip": "sha256-Ovq1yaTvYQjyr1ZYtdC/ngeQvvCOTBAjE7IV0wYCCE4=",
"darwin-x64/font-subset.zip": "sha256-IHLrPa4fAqPrdeHYdsIz93BHO0Np+2MSCbk7C2sgwwk=",
"darwin-x64/framework.zip": "sha256-EQjB10gVKzjdmaiIOf46U6YbAHaCVmdzHXPc6Ds8KcE=",
"darwin-x64/gen_snapshot.zip": "sha256-4+J8H82bxIFviUvvthyBZGrBwYO11mFJErL2whooZFY=",
"flutter-web-sdk.zip": "sha256-7rZynFWlGy0SJ2wCRlItpvwEBK2bIUqsm+f97FF5js4=",
"flutter_gpu.zip": "sha256-+xx4iFMM6cm4eYJUqp2iq/UWCSjtmn22RNEG8z6stvQ=",
"flutter_patched_sdk.zip": "sha256-SwWY3Gxv3hYZAzmVAJwwLl51CFdC4Pfgq8+VLsVHarY=",
"flutter_patched_sdk_product.zip": "sha256-nxOERMQz0qq7EFVm6OWpl8BR6E+20xLG0du5Jj+YHbE=",
"ios-profile/artifacts.zip": "sha256-RL1GqX0/6fv+SeUW3FNyfKQl/bpTM84STQSzHLCSh7E=",
"ios-release/artifacts.zip": "sha256-gnRjcv8bz1du/w9T8bZBaspUqIkeKxPB0BqPsbofq34=",
"ios/artifacts.zip": "sha256-qjr2yU4XsbdiyJwAK6v7bINiALIIOFyUmWpKFhaDou0=",
"linux-arm64-debug/linux-arm64-flutter-gtk.zip": "sha256-WmN2CNXlSslMxwQO8siUbvOL1C2B7DyAiubOpof0hps=",
"linux-arm64-profile/linux-arm64-flutter-gtk.zip": "sha256-RZJOPNYA/TuoLGQfpOveJ0dhBs4xKf4Iy3MmCLBoBE8=",
"linux-arm64-release/linux-arm64-flutter-gtk.zip": "sha256-qQFBvIOsQwLEnsSlfV+r9yK/3rBQyyIQZayJzarO9iI=",
"linux-arm64/artifacts.zip": "sha256-JnPSiHx6hYCK2kx/zQqxvjbIGZPwH5UDI4dZyJ5kPIU=",
"linux-arm64/font-subset.zip": "sha256-9TcFWpN3suISmjNgje7WSqygiWbu9Q5t6SAfhqZlF00=",
"linux-x64-debug/linux-x64-flutter-gtk.zip": "sha256-og0JAIZL/Arklv4cpeOMhqhN+n2VcVWJg6T0G3hb1sQ=",
"linux-x64-profile/linux-x64-flutter-gtk.zip": "sha256-LXOooWgdQcjm4rc7RXi8765snfvovIxXDVfCaOSBc/o=",
"linux-x64-release/linux-x64-flutter-gtk.zip": "sha256-ICePn3G3SngJ5O78B0YvUf0lspWXJBRi3ESUOmRhtzI=",
"linux-x64/artifacts.zip": "sha256-15A66Yj0IUzvmXcijWIFFaYGuXccJp0L1rqg7APkwiM=",
"linux-x64/font-subset.zip": "sha256-YcYgMtvtIJekxpAByUkF8OViQxe1+EBczpKer15meeA=",
"sky_engine.zip": "sha256-qIs/zBZ9VvCU4PUNrmJRPvF0UsEZ6fe4HVIGoYEYdhs=",
"windows-x64-debug/windows-x64-flutter.zip": "sha256-4QYdKTF2GipzX+KS0FkEwQV9MBEkKUjUi7Nav21bv2k=",
"windows-x64-profile/windows-x64-flutter.zip": "sha256-a7ANXvvQ2nawAdPOxOuTgrQMgFSihCtQhzAiOQJtOLE=",
"windows-x64-release/windows-x64-flutter.zip": "sha256-qLG8IChKep+nwYcogcM5JOGP0wZwdUPdjf4mg8TPmVU=",
"windows-x64/artifacts.zip": "sha256-2GZ4oVJ/XjiNDs0goanWPbmhkiwARGU+GsrhZnTdzd0=",
"windows-x64/flutter-cpp-client-wrapper.zip": "sha256-lqxP9xCNa7ClZyNIaxnZv/MorPFmV8haDde/Sm2DG4Q=",
"windows-x64/font-subset.zip": "sha256-t0hARPeFDhVqad2H1dlhvkf6l3a4EcsoVHotageUghA="
},
"version": "3.41.6",
"engineVersion": "425cfb54d01a9472b3e81d9e76fd63a4a44cfbcb",
"engineSwiftShaderHash": "sha256-qbtCl2nTpmtp9dnaoXc7rF3RqLnAZEmzw1BzPoCRWrc=",
"engineSwiftShaderRev": "794b0cfce1d828d187637e6d932bae484fbe0976",
"channel": "stable",
"dartHash": {
"aarch64-darwin": "sha256-DwyZtAeZLuaX2MFVPzhERiFeX45wI9sTc4Y2SVopRE8=",
"linux": "sha256-y2F+wB0M5dq6koxGpCs9BExGU7p8tFOIiRqfdf8ip+8=",
"x86_64-darwin": "sha256-GHTjTHJmbIPfsAbF4AmxjDETSw9YD04/6lGecoe1xrA="
"engineHashes": {
"aarch64-linux": {
"aarch64-linux": "sha256-MDmnLj7uUgAQ3UIgU4XU8r57TMv50tFdfmYYcFhcsxM=",
"x86_64-linux": "sha256-MDmnLj7uUgAQ3UIgU4XU8r57TMv50tFdfmYYcFhcsxM="
},
"x86_64-linux": {
"aarch64-linux": "sha256-93ut4VKfLefvB/dNAlf7MrfchM8dS4uhvyhM0Lt94jQ=",
"x86_64-linux": "sha256-93ut4VKfLefvB/dNAlf7MrfchM8dS4uhvyhM0Lt94jQ="
}
},
"dartVersion": "3.11.4",
"engineHash": "sha256-DJwtw5yJsTou6mXb5lSjP1two72rRqdO2Q/+WkhWGS8=",
"engineVersion": "425cfb54d01a9472b3e81d9e76fd63a4a44cfbcb",
"dartHash": {
"x86_64-linux": "sha256-UtYvBbAHzLcRfPQcGb7aHIfBRLJ+pgCxa0ycjqj8j9Q=",
"aarch64-linux": "sha256-w1um8N4fXrvyNQZhK//DR8e6lMOkx1EQyrEVeJIWbTw=",
"x86_64-darwin": "sha256-GHTjTHJmbIPfsAbF4AmxjDETSw9YD04/6lGecoe1xrA=",
"aarch64-darwin": "sha256-DwyZtAeZLuaX2MFVPzhERiFeX45wI9sTc4Y2SVopRE8="
},
"flutterHash": "sha256-oI/Ml2gT1jStnpAwS/SBant3ja8d7hSEZ74kin8kENk=",
"artifactHashes": {
"android": {
"aarch64-darwin": "sha256-XqHuTqBB5htEaOXwBWW2JE7KIHfQ4AnyTVTu6ekrL34=",
"aarch64-linux": "sha256-+0pmhXISuitKlG94LraIAr0qDu7ob4DrefMiBcZBbRU=",
"x86_64-darwin": "sha256-XqHuTqBB5htEaOXwBWW2JE7KIHfQ4AnyTVTu6ekrL34=",
"x86_64-linux": "sha256-+0pmhXISuitKlG94LraIAr0qDu7ob4DrefMiBcZBbRU="
},
"fuchsia": {
"aarch64-darwin": "sha256-CZpjr9MPSxKW37Mz3/E11drpCQRKVHrG8VDU0qVl45E=",
"aarch64-linux": "sha256-CZpjr9MPSxKW37Mz3/E11drpCQRKVHrG8VDU0qVl45E=",
"x86_64-darwin": "sha256-CZpjr9MPSxKW37Mz3/E11drpCQRKVHrG8VDU0qVl45E=",
"x86_64-linux": "sha256-CZpjr9MPSxKW37Mz3/E11drpCQRKVHrG8VDU0qVl45E="
},
"ios": {
"aarch64-darwin": "sha256-GFDc9AwM9WCO8Y0KUclhQwSsHBz6KVuFFx6OtbHAPy4=",
"aarch64-linux": "sha256-GFDc9AwM9WCO8Y0KUclhQwSsHBz6KVuFFx6OtbHAPy4=",
"x86_64-darwin": "sha256-GFDc9AwM9WCO8Y0KUclhQwSsHBz6KVuFFx6OtbHAPy4=",
"x86_64-linux": "sha256-GFDc9AwM9WCO8Y0KUclhQwSsHBz6KVuFFx6OtbHAPy4="
},
"linux": {
"aarch64-darwin": "sha256-/rAQETXAXGblIinEfTmwV29lFfHj4Ws9BvD1MZ/bnqM=",
"aarch64-linux": "sha256-/rAQETXAXGblIinEfTmwV29lFfHj4Ws9BvD1MZ/bnqM=",
"x86_64-darwin": "sha256-Q/3ba2UhzMaJrOAFz6HaHAbgcTHEztMUPg+SEAt0PAM=",
"x86_64-linux": "sha256-Q/3ba2UhzMaJrOAFz6HaHAbgcTHEztMUPg+SEAt0PAM="
},
"macos": {
"aarch64-darwin": "sha256-HPLmvF32alDhh1jRigp/zJU77nLueDFEsDmM4eBIdos=",
"aarch64-linux": "sha256-HPLmvF32alDhh1jRigp/zJU77nLueDFEsDmM4eBIdos=",
"x86_64-darwin": "sha256-HPLmvF32alDhh1jRigp/zJU77nLueDFEsDmM4eBIdos=",
"x86_64-linux": "sha256-HPLmvF32alDhh1jRigp/zJU77nLueDFEsDmM4eBIdos="
},
"universal": {
"aarch64-darwin": "sha256-kJv9nhT15oWafKEjahk0Dlh8sko6DGvrfpBowlDKps4=",
"aarch64-linux": "sha256-XVUgeHwC0BgqeMWvkhMwi8k2yrcWNbUPTMw7F++UkV4=",
"x86_64-darwin": "sha256-9xkjn2IOfOIy4xtUO43YfJwwYXcL7LHvJ3FVTa7jt5w=",
"x86_64-linux": "sha256-l56TIx2e3hCxMzyhzZLE8vo4H59XWnSofyPfa1i5Oyo="
},
"web": {
"aarch64-darwin": "sha256-oJQjHSkQS+P2jNEr1GAJp61bNk05579okyGK5BovjRA=",
"aarch64-linux": "sha256-oJQjHSkQS+P2jNEr1GAJp61bNk05579okyGK5BovjRA=",
"x86_64-darwin": "sha256-oJQjHSkQS+P2jNEr1GAJp61bNk05579okyGK5BovjRA=",
"x86_64-linux": "sha256-oJQjHSkQS+P2jNEr1GAJp61bNk05579okyGK5BovjRA="
},
"windows": {
"x86_64-darwin": "sha256-rDuCsweWYvlT6Z8kGr1AK0UMzRUpn8MYscdF7qqmbnc=",
"x86_64-linux": "sha256-rDuCsweWYvlT6Z8kGr1AK0UMzRUpn8MYscdF7qqmbnc="
}
},
"pubspecLock": {
"packages": {
"_fe_analyzer_shared": {
@@ -1091,7 +1086,5 @@
"sdks": {
"dart": ">=3.10.0-0.0.dev <4.0.0"
}
},
"version": "3.41.6"
}
}

View File

@@ -1,12 +0,0 @@
--- a/bin/internal/content_aware_hash.sh
+++ b/bin/internal/content_aware_hash.sh
@@ -13,6 +13,9 @@
set -e
+echo '0000000000000000000000000000000000000000'
+exit 0
+
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
unset GIT_DIR

View File

@@ -1,51 +0,0 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -318,7 +319,7 @@
var fatalStorageWarning = true;
static RandomAccessFile? _lock;
- static var _lockEnabled = true;
+ static var _lockEnabled = false;
/// Turn off the [lock]/[releaseLock] mechanism.
///
@@ -721,7 +722,6 @@
}
void setStampFor(String artifactName, String version) {
- getStampFileFor(artifactName).writeAsStringSync(version);
}
File getStampFileFor(String artifactName) {
@@ -1010,31 +1010,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
- engineVersion ??= version;
- final url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
-
- var exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
- }
-
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
- }
return true;
}

View File

@@ -1,131 +0,0 @@
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -99,10 +99,7 @@ abstract class FlutterVersion {
}
}
- final String frameworkRevision = git
- .logSync(['-n', '1', '--pretty=format:%H'], workingDirectory: flutterRoot)
- .stdout
- .trim();
+ final String frameworkRevision = 'nixpkgs000000000000000000000000000000000';
return FlutterVersion.fromRevision(
clock: clock,
@@ -222,10 +219,7 @@ abstract class FlutterVersion {
final String flutterRoot;
String _getTimeSinceCommit({String? revision}) {
- return _git
- .logSync(['-n', '1', '--pretty=format:%ar', ?revision], workingDirectory: flutterRoot)
- .stdout
- .trim();
+ return 'unknown';
}
// TODO(fujino): calculate this relative to frameworkCommitDate for
@@ -391,13 +385,7 @@ abstract class FlutterVersion {
/// remote git repository is not reachable due to a network issue.
Future<String> _fetchRemoteFrameworkCommitDate() async {
try {
- // Fetch upstream branch's commit and tags
- await _run(_git, ['fetch', '--tags']);
- return _gitCommitDate(
- git: _git,
- gitRef: kGitTrackingUpstream,
- workingDirectory: Cache.flutterRoot,
- );
+ return 'unknown';
} on VersionCheckError catch (error) {
globals.printError(error.message);
rethrow;
@@ -422,13 +410,7 @@ abstract class FlutterVersion {
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'` ([kUserBranch]).
String getBranchName({bool redactUnknownBranches = false}) {
- _branch ??= () {
- final String branch = _git
- .runSync(['symbolic-ref', '--short', 'HEAD'], workingDirectory: flutterRoot)
- .stdout
- .trim();
- return branch == 'HEAD' ? '' : branch;
- }();
+ _branch ??= 'stable';
if (redactUnknownBranches || _branch!.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!kOfficialChannels.contains(_branch) && !kObsoleteBranches.containsKey(_branch)) {
@@ -464,31 +446,7 @@ String _gitCommitDate({
required Git git,
required String? workingDirectory,
}) {
- final RunResult result = git.logSync([
- gitRef,
- '-n',
- '1',
- '--pretty=format:%ad',
- '--date=iso',
- ], workingDirectory: workingDirectory);
- if (result.exitCode == 0) {
- return result.stdout.trim();
- }
- final error = VersionCheckError(
- 'Command exited with code ${result.exitCode}: ${result.command.join(' ')}\n'
- 'Standard out: ${result.stdout}\n'
- 'Standard error: ${result.stderr}',
- );
- if (lenient) {
- final dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError(
- 'Failed to find the latest git commit date: $error\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- }
- throw error;
+ return 'unknown';
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -639,23 +597,7 @@ class _FlutterVersionGit extends FlutterVersion {
@override
String? get repositoryUrl {
if (_repositoryUrl == null) {
- final String gitChannel = _git
- .runSync([
- 'rev-parse',
- '--abbrev-ref',
- '--symbolic',
- kGitTrackingUpstream,
- ], workingDirectory: flutterRoot)
- .stdout
- .trim();
- final int slash = gitChannel.indexOf('/');
- if (slash != -1) {
- final String remote = gitChannel.substring(0, slash);
- _repositoryUrl = _git
- .runSync(['ls-remote', '--get-url', remote], workingDirectory: flutterRoot)
- .stdout
- .trim();
- }
+ _repositoryUrl = 'https://github.com/flutter/flutter.git';
}
return _repositoryUrl;
}
@@ -1010,6 +952,16 @@ class GitTagVersion {
String? workingDirectory,
bool fetchTags = false,
String gitRef = 'HEAD',
+ }) {
+ return GitTagVersion.unknown();
+ }
+
+ static GitTagVersion determine_orig(
+ Platform platform, {
+ required Git git,
+ String? workingDirectory,
+ bool fetchTags = false,
+ String gitRef = 'HEAD',
}) {
if (fetchTags) {
final String channel = git

View File

@@ -0,0 +1,211 @@
{
lib,
stdenv,
darwin,
callPackage,
flutter,
supportedTargetFlutterPlatforms ? [
"universal"
"web"
]
++ lib.optional (stdenv.hostPlatform.isLinux && !(flutter ? engine)) "linux"
++ lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isDarwin) "android"
++ lib.optionals stdenv.hostPlatform.isDarwin [
"macos"
"ios"
],
artifactHashes ? flutter.artifactHashes,
extraPkgConfigPackages ? [ ],
extraLibraries ? [ ],
extraIncludes ? [ ],
extraCxxFlags ? [ ],
extraCFlags ? [ ],
extraLinkerFlags ? [ ],
makeWrapper,
writeShellScript,
wrapGAppsHook3,
gitMinimal,
which,
pkg-config,
atk,
cairo,
gdk-pixbuf,
glib,
gtk3,
harfbuzz,
libepoxy,
pango,
libx11,
xorgproto,
libdeflate,
zlib,
cmake,
ninja,
clang,
symlinkJoin,
}:
let
supportsLinuxDesktopTarget = builtins.elem "linux" supportedTargetFlutterPlatforms;
flutterPlatformArtifacts = lib.genAttrs supportedTargetFlutterPlatforms (
flutterPlatform:
(callPackage ./artifacts/prepare-artifacts.nix {
src = callPackage ./artifacts/fetch-artifacts.nix {
inherit flutterPlatform;
systemPlatform = stdenv.hostPlatform.system;
flutter = callPackage ./wrapper.nix { inherit flutter; };
hash = artifactHashes.${flutterPlatform}.${stdenv.hostPlatform.system} or "";
};
})
);
cacheDir = symlinkJoin {
name = "flutter-cache-dir";
paths = builtins.attrValues flutterPlatformArtifacts;
postBuild = ''
mkdir --parents "$out/bin/cache"
ln --symbolic '${flutter}/bin/cache/dart-sdk' "$out/bin/cache"
'';
passthru.flutterPlatform = flutterPlatformArtifacts;
};
# By default, Flutter stores downloaded files (such as the Pub cache) in the SDK directory.
# Wrap it to ensure that it does not do that, preferring home directories instead.
immutableFlutter = writeShellScript "flutter_immutable" ''
export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"}
${flutter}/bin/flutter "$@"
'';
# Tools that the Flutter tool depends on.
tools = [
gitMinimal
which
];
# Libraries that Flutter apps depend on at runtime.
appRuntimeDeps = lib.optionals supportsLinuxDesktopTarget [
atk
cairo
gdk-pixbuf
glib
gtk3
harfbuzz
libepoxy
pango
libx11
libdeflate
];
# Development packages required for compilation.
appBuildDeps =
let
# https://discourse.nixos.org/t/handling-transitive-c-dependencies/5942/3
deps =
pkg: lib.filter lib.isDerivation ((pkg.buildInputs or [ ]) ++ (pkg.propagatedBuildInputs or [ ]));
withKey = pkg: {
key = pkg.outPath;
val = pkg;
};
collect = pkg: lib.map withKey ([ pkg ] ++ deps pkg);
in
lib.map (e: e.val) (
lib.genericClosure {
startSet = lib.map withKey appRuntimeDeps;
operator = item: collect item.val;
}
);
# Some header files and libraries are not properly located by the Flutter SDK.
# They must be manually included.
appStaticBuildDeps =
(lib.optionals supportsLinuxDesktopTarget [
libx11
xorgproto
zlib
])
++ extraLibraries;
# Tools used by the Flutter SDK to compile applications.
buildTools = lib.optionals supportsLinuxDesktopTarget [
pkg-config
cmake
ninja
clang
];
# Nix-specific compiler configuration.
pkgConfigPackages = map (lib.getOutput "dev") (appBuildDeps ++ extraPkgConfigPackages);
includeFlags = map (pkg: "-isystem ${lib.getOutput "dev" pkg}/include") (
appStaticBuildDeps ++ extraIncludes
);
linkerFlags =
(map (pkg: "-rpath,${lib.getOutput "lib" pkg}/lib") appRuntimeDeps) ++ extraLinkerFlags;
in
(callPackage ./sdk-symlink.nix { }) (
stdenv.mkDerivation {
pname = "flutter-wrapped";
inherit (flutter) version;
nativeBuildInputs = [
makeWrapper
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]
++ lib.optionals supportsLinuxDesktopTarget [
glib
wrapGAppsHook3
];
passthru = flutter.passthru // {
inherit (flutter) version;
unwrapped = flutter;
updateScript = ./update/update.py;
inherit cacheDir;
};
dontUnpack = true;
dontWrapGApps = true;
installPhase = ''
runHook preInstall
for path in ${
builtins.concatStringsSep " " (
builtins.foldl' (
paths: pkg:
paths
++ (map (directory: "'${pkg}/${directory}/pkgconfig'") [
"lib"
"share"
])
) [ ] pkgConfigPackages
)
}; do
addToSearchPath FLUTTER_PKG_CONFIG_PATH "$path"
done
mkdir --parents $out/bin
makeWrapper '${immutableFlutter}' $out/bin/flutter \
--set-default ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \
''
+ lib.optionalString (flutter ? engine && flutter.engine.meta.available) ''
--set-default FLUTTER_ENGINE "${flutter.engine}" \
--add-flags "--local-engine-host ${flutter.engine.outName}" \
''
+ ''
--suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \
--suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \
--suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \
--prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \
--prefix CFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCFlags)}' \
--prefix LDFLAGS "''\t" '${
builtins.concatStringsSep " " (map (flag: "-Wl,${flag}") linkerFlags)
}' \
''${gappsWrapperArgs[@]}
runHook postInstall
'';
inherit (flutter) meta;
}
)

View File

@@ -675,7 +675,6 @@ mapAliases {
eureka-ideas = throw "'eureka-ideas' has been removed as it has been unmaintained upstream since April 2023"; # Added 2026-02-07
evolve-core = throw "'evolve-core' has been removed, as it hindered the removal of flutter329"; # Added 2026-01-25
eww-wayland = throw "'eww-wayland' has been renamed to/replaced by 'eww'"; # Converted to throw 2025-10-27
expidus = throw "'expidus' has been removed from nixpkgs due to it not being maintained"; # Added 2026-03-17
f3d_egl = warnAlias "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # Added 2025-07-18
fabs = throw "'fabs' has been removed due to being broken for more than a year; see RFC 180"; # Added 2026-02-05
fast-cli = throw "'fast-cli' has been removed because it was unmaintainable in nixpkgs"; # Added 2025-11-17

View File

@@ -3811,14 +3811,13 @@ with pkgs;
flutterPackages-source = recurseIntoAttrs (
callPackage ../development/compilers/flutter { useNixpkgsEngine = true; }
);
flutterPackages =
if stdenv.hostPlatform.isLinux then flutterPackages-source else flutterPackages-bin;
flutterPackages = flutterPackages-bin;
flutter = flutterPackages.stable;
flutter341 = flutterPackages.v3_41;
flutter338 = flutterPackages-bin.v3_38;
flutter335 = flutterPackages-bin.v3_35;
flutter332 = flutterPackages-bin.v3_32;
flutter329 = flutterPackages-bin.v3_29;
flutter338 = flutterPackages.v3_38;
flutter335 = flutterPackages.v3_35;
flutter332 = flutterPackages.v3_32;
flutter329 = flutterPackages.v3_29;
fpc = callPackage ../development/compilers/fpc { };
@@ -11379,6 +11378,14 @@ with pkgs;
enlightenment = recurseIntoAttrs (callPackage ../desktops/enlightenment { });
expidus = recurseIntoAttrs (
callPackages ../desktops/expidus {
# Use the Nix built Flutter Engine for testing.
# Also needed when we eventually package Genesis Shell.
flutterPackages = flutterPackages-source;
}
);
gnome2 = recurseIntoAttrs (callPackage ../desktops/gnome-2 { });
gnome = recurseIntoAttrs (callPackage ../desktops/gnome { });