depot/third_party/nixpkgs/pkgs/development/compilers/flutter/patches/override-operating-system.patch
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

13 lines
667 B
Diff

diff --git a/packages/flutter_tools/lib/src/base/platform.dart b/packages/flutter_tools/lib/src/base/platform.dart
index 45da89ad4c..2d79dbaece 100644
--- a/packages/flutter_tools/lib/src/base/platform.dart
+++ b/packages/flutter_tools/lib/src/base/platform.dart
@@ -132,7 +132,7 @@ class LocalPlatform extends Platform {
String get pathSeparator => io.Platform.pathSeparator;
@override
- String get operatingSystem => io.Platform.operatingSystem;
+ String get operatingSystem => io.Platform.environment['NIX_FLUTTER_OPERATING_SYSTEM'] ?? io.Platform.operatingSystem;
@override
String get operatingSystemVersion => io.Platform.operatingSystemVersion;