tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
flutter: 2.0.3 -> 2.2.1
nanashi0x74
4 years ago
d05d2113
10f447c6
+61
-23
3 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
flutter
default.nix
patches
disable-auto-update.patch
move-cache.patch
+26
-3
pkgs/development/compilers/flutter/default.nix
···
4
getPatches = dir:
5
let files = builtins.attrNames (builtins.readDir dir);
6
in map (f: dir + ("/" + f)) files;
7
-
version = "2.0.3";
0
8
channel = "stable";
9
filename = "flutter_linux_${version}-${channel}.tar.xz";
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
10
in
11
{
12
mkFlutter = mkFlutter;
13
stable = mkFlutter rec {
14
-
inherit dart version;
0
15
pname = "flutter";
16
src = fetchurl {
17
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
18
-
sha256 = "14a63cpkp78rgymmlrppds69jsrdarg33dr43nb7s61r0xfh9icm";
19
};
20
patches = getPatches ./patches;
21
};
···
4
getPatches = dir:
5
let files = builtins.attrNames (builtins.readDir dir);
6
in map (f: dir + ("/" + f)) files;
7
+
version = "2.2.1";
8
+
dartVersion = "2.13.1";
9
channel = "stable";
10
filename = "flutter_linux_${version}-${channel}.tar.xz";
11
+
dartStable = dart.override {
12
+
version = dartVersion;
13
+
sources = {
14
+
"${dartVersion}-x86_64-darwin" = fetchurl {
15
+
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip";
16
+
sha256 = "0kb6r2rmp5d0shvgyy37fmykbgww8qaj4f8k79rmqfv5lwa3izya";
17
+
};
18
+
"${dartVersion}-x86_64-linux" = fetchurl {
19
+
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
20
+
sha256 = "0zq8wngyrw01wjc5s6w1vz2jndms09ifiymjjixxby9k41mr6jrq";
21
+
};
22
+
"${dartVersion}-i686-linux" = fetchurl {
23
+
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-ia32-release.zip";
24
+
sha256 = "0zv4q8xv2i08a6izpyhhnil75qhs40m5mgyvjqjsswqkwqdf7lkj";
25
+
};
26
+
"${dartVersion}-aarch64-linux" = fetchurl {
27
+
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
28
+
sha256 = "0bb9jdmg5p608jmmiqibp13ydiw9avgysxlmljvgsl7wl93j6rgc";
29
+
};
30
+
};
31
+
};
32
in
33
{
34
mkFlutter = mkFlutter;
35
stable = mkFlutter rec {
36
+
dart = dartStable;
37
+
inherit version;
38
pname = "flutter";
39
src = fetchurl {
40
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
41
+
sha256 = "009pwk2casz10gibgjpz08102wxmkq9iq3994b3c2q342g6526g0";
42
};
43
patches = getPatches ./patches;
44
};
+11
-4
pkgs/development/compilers/flutter/patches/disable-auto-update.patch
···
1
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
2
-
index c44f867746..c9eda34e26 100644
3
--- a/bin/internal/shared.sh
4
+++ b/bin/internal/shared.sh
5
@@ -218,8 +218,6 @@ function shared::execute() {
···
12
case "$BIN_NAME" in
13
flutter*)
14
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
15
-
index 3dc7929dd1..e65d70d55b 100644
16
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
17
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
18
-
@@ -246,11 +246,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
19
globals.flutterUsage.suppressAnalytics = true;
20
}
21
22
- globals.flutterVersion.ensureVersionFile();
23
final bool machineFlag = topLevelResults['machine'] as bool;
24
-
- if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) {
0
0
0
0
0
0
0
25
- await globals.flutterVersion.checkFlutterVersionFreshness();
26
- }
27
···
1
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
2
+
index be9320210e..6eb50aae95 100644
3
--- a/bin/internal/shared.sh
4
+++ b/bin/internal/shared.sh
5
@@ -218,8 +218,6 @@ function shared::execute() {
···
12
case "$BIN_NAME" in
13
flutter*)
14
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
15
+
index 550a75bc65..c98a4591cc 100644
16
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
17
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
18
+
@@ -244,7 +244,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
19
globals.flutterUsage.suppressAnalytics = true;
20
}
21
22
- globals.flutterVersion.ensureVersionFile();
23
final bool machineFlag = topLevelResults['machine'] as bool;
24
+
final bool ci = await globals.botDetector.isRunningOnBot;
25
+
final bool redirectedCompletion = !globals.stdio.hasTerminal &&
26
+
@@ -253,10 +252,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
27
+
final bool versionCheckFlag = topLevelResults['version-check'] as bool;
28
+
final bool explicitVersionCheckPassed = topLevelResults.wasParsed('version-check') && versionCheckFlag;
29
+
30
+
- if (topLevelResults.command?.name != 'upgrade' &&
31
+
- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
32
- await globals.flutterVersion.checkFlutterVersionFreshness();
33
- }
34
+24
-16
pkgs/development/compilers/flutter/patches/move-cache.patch
···
1
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
2
-
index a6c59bae07..21f6c9812a 100644
3
--- a/packages/flutter_tools/lib/src/asset.dart
4
+++ b/packages/flutter_tools/lib/src/asset.dart
5
-
@@ -5,6 +5,7 @@
6
import 'package:meta/meta.dart';
7
import 'package:package_config/package_config.dart';
8
9
+import 'base/common.dart';
10
import 'base/context.dart';
0
11
import 'base/file_system.dart';
12
-
import 'base/logger.dart';
13
-
@@ -14,6 +15,7 @@ import 'cache.dart';
14
import 'convert.dart';
15
import 'dart/package_map.dart';
16
-
import 'devfs.dart';
17
+import 'globals.dart' as globals;
0
18
import 'flutter_manifest.dart';
19
import 'license_collector.dart';
20
-
import 'project.dart';
21
-
@@ -377,7 +379,7 @@ class ManifestAssetBundle implements AssetBundle {
22
for (final Map<String, Object> font in family['fonts'] as List<Map<String, Object>>) {
23
final Uri entryUri = _fileSystem.path.toUri(font['asset'] as String);
24
result.add(_Asset(
···
28
entryUri: entryUri,
29
package: null,
30
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
31
-
index 11e3bf3e11..39d6fae0d1 100644
32
--- a/packages/flutter_tools/lib/src/cache.dart
33
+++ b/packages/flutter_tools/lib/src/cache.dart
34
-
@@ -321,8 +321,15 @@ class Cache {
0
0
0
0
0
0
0
0
35
return;
36
}
37
assert(_lock == null);
38
+
39
-
+ final Directory dir = _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
40
+ if (!dir.existsSync()) {
41
+ dir.createSync(recursive: true);
42
+ globals.os.chmod(dir, '755');
43
+ }
44
+
45
final File lockFile =
46
-
- _fileSystem.file(_fileSystem.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
47
-
+ _fileSystem.file(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
48
try {
49
_lock = lockFile.openSync(mode: FileMode.write);
50
} on FileSystemException catch (e) {
51
-
@@ -424,7 +431,7 @@ class Cache {
52
if (_rootOverride != null) {
53
-
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
54
} else {
55
-
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
56
-
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
57
}
58
}
59
···
1
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
2
+
index 80fb16673f..5723f93f9f 100644
3
--- a/packages/flutter_tools/lib/src/asset.dart
4
+++ b/packages/flutter_tools/lib/src/asset.dart
5
+
@@ -7,6 +7,7 @@
6
import 'package:meta/meta.dart';
7
import 'package:package_config/package_config.dart';
8
9
+import 'base/common.dart';
10
import 'base/context.dart';
11
+
import 'base/deferred_component.dart';
12
import 'base/file_system.dart';
13
+
@@ -16,6 +17,7 @@ import 'build_info.dart';
14
+
import 'cache.dart';
15
import 'convert.dart';
16
import 'dart/package_map.dart';
0
17
+import 'globals.dart' as globals;
18
+
import 'devfs.dart';
19
import 'flutter_manifest.dart';
20
import 'license_collector.dart';
21
+
@@ -449,7 +451,7 @@ class ManifestAssetBundle implements AssetBundle {
0
22
for (final Map<String, Object> font in family['fonts'] as List<Map<String, Object>>) {
23
final Uri entryUri = _fileSystem.path.toUri(font['asset'] as String);
24
result.add(_Asset(
···
28
entryUri: entryUri,
29
package: null,
30
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
31
+
index 152d4e75e5..1fcff7e2bd 100644
32
--- a/packages/flutter_tools/lib/src/cache.dart
33
+++ b/packages/flutter_tools/lib/src/cache.dart
34
+
@@ -9,6 +9,7 @@ import 'package:file/memory.dart';
35
+
import 'package:meta/meta.dart';
36
+
import 'package:process/process.dart';
37
+
38
+
+import 'globals.dart' as globals;
39
+
import 'base/common.dart';
40
+
import 'base/error_handling_io.dart';
41
+
import 'base/file_system.dart';
42
+
@@ -298,8 +299,15 @@ class Cache {
43
return;
44
}
45
assert(_lock == null);
46
+
47
+
+ final Directory dir = _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath!, '.cache', 'flutter'));
48
+ if (!dir.existsSync()) {
49
+ dir.createSync(recursive: true);
50
+ globals.os.chmod(dir, '755');
51
+ }
52
+
53
final File lockFile =
54
+
- _fileSystem.file(_fileSystem.path.join(flutterRoot!, 'bin', 'cache', 'lockfile'));
55
+
+ _fileSystem.file(_fileSystem.path.join(globals.fsUtils.homeDirPath!, '.cache', 'flutter', 'lockfile'));
56
try {
57
_lock = lockFile.openSync(mode: FileMode.write);
58
} on FileSystemException catch (e) {
59
+
@@ -404,7 +412,7 @@ class Cache {
60
if (_rootOverride != null) {
61
+
return _fileSystem.directory(_fileSystem.path.join(_rootOverride!.path, 'bin', 'cache'));
62
} else {
63
+
- return _fileSystem.directory(_fileSystem.path.join(flutterRoot!, 'bin', 'cache'));
64
+
+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath!, '.cache', 'flutter'));
65
}
66
}
67