diff --git a/Makefile b/Makefile index 1b4c563..9843398 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,10 @@ watch: find cyberwow/lib/ -name '*.dart' | \ entr kill -USR1 `cat /tmp/flutter.pid` +watch-build: + find cyberwow/lib/ -name '*.dart' | \ + entr $(MAKE) build-debug + run: cd cyberwow && \ flutter run --debug --pid-file /tmp/flutter.pid @@ -67,7 +71,7 @@ collect: build: cd cyberwow && \ - flutter build apk --target-platform android-arm64 + flutter build apk --target-platform android-arm64 -v build-debug: cd cyberwow && \ @@ -83,7 +87,7 @@ script := etc/scripts/build-external-libs wow: clean-external-libs collect-wownero build -wow-fake: clean-external-libs collect-wownero-fake build +wow-no-native: build clean-external-libs: $(script)/clean.sh @@ -122,10 +126,6 @@ wownero: openssl boost sodium toolchain-wow collect-wownero: wownero $(script)/collect.sh -collect-wownero-fake: - $(script)/collect-fake.sh - - # etc remove-exif: diff --git a/README.md b/README.md index a45172e..c64e22d 100644 --- a/README.md +++ b/README.md @@ -64,3 +64,7 @@ The resulting apk is `cyberwow/build/app/outputs/apk/release/app-release.apk`. Sending the arguments to an unopened CyberWOW app will cause `wownerod` to use them on start up, for example: `--add-exclusive-node 192.168.1.3` + +## F-droid build status + + diff --git a/cyberwow/android/app/build.gradle b/cyberwow/android/app/build.gradle index 63160d1..26a5cfe 100644 --- a/cyberwow/android/app/build.gradle +++ b/cyberwow/android/app/build.gradle @@ -41,8 +41,8 @@ android { applicationId "org.wownero.cyberwow" minSdkVersion 26 targetSdkVersion 29 - versionCode 23 - versionName "0.7.0.0-j" + versionCode 24 + versionName "0.7.0.0-k" } if(project.hasProperty("RELEASE_STORE_FILE")) { diff --git a/cyberwow/lib/controller/helper.dart b/cyberwow/lib/controller/helper.dart deleted file mode 100644 index 9513d25..0000000 --- a/cyberwow/lib/controller/helper.dart +++ /dev/null @@ -1,36 +0,0 @@ -/* - -Copyright 2019 fuwa - -This file is part of CyberWOW. - -CyberWOW is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -CyberWOW is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with CyberWOW. If not, see . - -*/ - -import 'dart:async'; -import 'dart:io'; - -import 'package:path_provider/path_provider.dart'; -import 'package:flutter/foundation.dart'; - -Future getBinaryPath(final String name) async { - final tmpDir = await getTemporaryDirectory(); - return tmpDir.path + '/' + name; -} - -Future binaryExists(final String name) async { - final binPath = await getBinaryPath(name); - return new File(binPath).exists(); -} diff --git a/cyberwow/lib/controller/process/run.dart b/cyberwow/lib/logic/controller/process/run.dart similarity index 89% rename from cyberwow/lib/controller/process/run.dart rename to cyberwow/lib/logic/controller/process/run.dart index e74490f..b572fd4 100644 --- a/cyberwow/lib/controller/process/run.dart +++ b/cyberwow/lib/logic/controller/process/run.dart @@ -26,10 +26,9 @@ import 'dart:io'; import 'dart:async'; import 'dart:convert'; -import '../helper.dart'; -import '../../config.dart' as config; -import '../../logging.dart'; -import '../../logic/sensor/helper.dart' as helper; +import '../../../config.dart' as config; +import '../../../logging.dart'; +import '../../sensor/helper.dart' as helper; typedef ShouldExit = bool Function(); @@ -80,7 +79,11 @@ Stream runBinary if (input != null) { printInput(); } - await for (final line in outputProcess.stdout.transform(utf8.decoder)) { + + final _stdout = outputProcess.stdout + .transform(utf8.decoder).transform(const LineSplitter()); + + await for (final line in _stdout) { log.finest('process output: ' + line); yield line; } diff --git a/cyberwow/lib/controller/refresh.dart b/cyberwow/lib/logic/controller/refresh.dart similarity index 91% rename from cyberwow/lib/controller/refresh.dart rename to cyberwow/lib/logic/controller/refresh.dart index 855e70c..8f6c20d 100644 --- a/cyberwow/lib/controller/refresh.dart +++ b/cyberwow/lib/logic/controller/refresh.dart @@ -23,11 +23,10 @@ import 'package:logging/logging.dart'; import 'dart:ui'; import 'dart:async'; -import 'rpc/rpc.dart' as rpc; -import '../config.dart'; -import '../logging.dart'; -import '../helper.dart'; +import '../../config.dart'; +import '../../logging.dart'; +import '../../helper.dart'; typedef GetNotificationFunc = AppLifecycleState Function(); diff --git a/cyberwow/lib/logic/interface/rpc/rpc.dart b/cyberwow/lib/logic/interface/rpc/rpc.dart new file mode 100644 index 0000000..741417d --- /dev/null +++ b/cyberwow/lib/logic/interface/rpc/rpc.dart @@ -0,0 +1,79 @@ +/* + +Copyright 2019 fuwa + +This file is part of CyberWOW. + +CyberWOW is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +CyberWOW is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with CyberWOW. If not, see . + +*/ + +import 'dart:async'; +import 'dart:convert'; + +import 'package:http/http.dart' as http; +import 'package:flutter/foundation.dart'; + +import '../../../config.dart' as config; +import '../../../helper.dart'; +import '../../../logging.dart'; + +Future rpcHTTP(final String method) async { + final url = 'http://${config.host}:${config.c.port}/json_rpc'; + + final body = json.encode + ( + { + 'jsonrpc': '2.0', + 'method': method, + } + ); + + try { + final response = await http.post + ( url, + body: body + ); + return response; + } + catch (e) { + log.warning(e); + return null; + } +} + +dynamic jsonDecode(final String responseBody) => json.decode(responseBody); + +Future rpc(final String method, {final String field}) async { + final response = await rpcHTTP(method); + + if (response == null) return null; + + if (response.statusCode != 200) { + return null; + } else { + final _body = await compute(jsonDecode, response.body); + final _result = _body['result']; + if (_result == null) return null; + + final _field = field == null ? _result : _result[field]; + + return _field; + } +} + +Future rpcString(final String method, {final String field}) async { + final _field = await rpc(method, field: field); + return pretty(_field); +} diff --git a/cyberwow/lib/logic/interface/rpc/rpc2.dart b/cyberwow/lib/logic/interface/rpc/rpc2.dart new file mode 100644 index 0000000..58c28d4 --- /dev/null +++ b/cyberwow/lib/logic/interface/rpc/rpc2.dart @@ -0,0 +1,64 @@ +/* + +Copyright 2019 fuwa + +This file is part of CyberWOW. + +CyberWOW is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +CyberWOW is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with CyberWOW. If not, see . + +*/ + +import 'dart:async'; +import 'dart:convert'; +import 'dart:math'; + +import 'package:http/http.dart' as http; +import 'package:flutter/foundation.dart'; +import 'package:intl/intl.dart'; + +import '../../../config.dart' as config; +import '../../../helper.dart'; +import '../../../logging.dart'; + +Future rpc2(final String method) async { + final url = 'http://${config.host}:${config.c.port}/${method}'; + + try { + final response = await http.post + ( url, + ); + return response; + } + catch (e) { + log.warning(e); + return null; + } +} + +dynamic jsonDecode(final String responseBody) => json.decode(responseBody); + +Future rpc2String(final String method, {final String field}) async { + final response = await rpc2(method); + + if (response == null) return ''; + + if (response.statusCode != 200) { + return ''; + } else { + final _body = await compute(jsonDecode, response.body); + final _field = field == null ? _body: _body[field]; + + return pretty(_field); + } +} diff --git a/cyberwow/lib/controller/daemon.dart b/cyberwow/lib/logic/sensor/daemon.dart similarity index 79% rename from cyberwow/lib/controller/daemon.dart rename to cyberwow/lib/logic/sensor/daemon.dart index 810b4e5..e8ee278 100644 --- a/cyberwow/lib/controller/daemon.dart +++ b/cyberwow/lib/logic/sensor/daemon.dart @@ -23,16 +23,13 @@ import 'dart:async'; import 'dart:convert'; import 'rpc/rpc.dart' as rpc; -import '../config.dart' as config; -import '../logging.dart'; +import '../../config.dart' as config; +import '../../logging.dart'; Future isConnected() async { - final _outPeers = await rpc.outgoingConnectionsCount(); - final _inPeers = await rpc.incomingConnectionsCount(); - - log.finest('outPeers: ${_outPeers}'); - log.finest('inPeers: ${_inPeers}'); - return _outPeers + _inPeers > 0; + final _connections = await rpc.getConnectionsSimple(); + log.finer('cyberwow: _connections: ${_connections}'); + return !_connections.isEmpty; } Future isSynced() async { diff --git a/cyberwow/lib/controller/rpc/rpc.dart b/cyberwow/lib/logic/sensor/rpc/rpc.dart similarity index 62% rename from cyberwow/lib/controller/rpc/rpc.dart rename to cyberwow/lib/logic/sensor/rpc/rpc.dart index f3be620..c806768 100644 --- a/cyberwow/lib/controller/rpc/rpc.dart +++ b/cyberwow/lib/logic/sensor/rpc/rpc.dart @@ -23,65 +23,10 @@ import 'dart:async'; import 'dart:convert'; import 'package:http/http.dart' as http; -import 'package:flutter/foundation.dart'; -import '../../config.dart' as config; -import '../../helper.dart'; -import '../../logging.dart'; - -int rpcID = 0; - -Future rpcHTTP(final String method) async { - final url = 'http://${config.host}:${config.c.port}/json_rpc'; - - rpcID += 1; - - final body = json.encode - ( - { - 'jsonrpc': '2.0', - 'id': rpcID.toString(), - 'method': method, - } - ); - - try { - final response = await http.post - ( url, - body: body - ); - return response; - } - catch (e) { - log.warning(e); - return null; - } -} - -dynamic jsonDecode(final String responseBody) => json.decode(responseBody); - -Future rpc(final String method, {final String field}) async { - final response = await rpcHTTP(method); - - if (response == null) return null; - - if (response.statusCode != 200) { - return null; - } else { - final _body = await compute(jsonDecode, response.body); - final _result = _body['result']; - if (_result == null) return null; - - final _field = field == null ? _result : _result[field]; - - return _field; - } -} - -Future rpcString(final String method, {final String field}) async { - final _field = await rpc(method, field: field); - return pretty(_field); -} +import '../../../helper.dart'; +import '../../../logging.dart'; +import '../../interface/rpc/rpc.dart'; Future syncInfo() => rpc('sync_info'); Future syncInfoString() => rpcString('sync_info'); diff --git a/cyberwow/lib/controller/rpc/rpc2.dart b/cyberwow/lib/logic/sensor/rpc/rpc2.dart similarity index 66% rename from cyberwow/lib/controller/rpc/rpc2.dart rename to cyberwow/lib/logic/sensor/rpc/rpc2.dart index de7e471..59cfd23 100644 --- a/cyberwow/lib/controller/rpc/rpc2.dart +++ b/cyberwow/lib/logic/sensor/rpc/rpc2.dart @@ -25,45 +25,12 @@ import 'dart:math'; import 'package:http/http.dart' as http; import 'package:flutter/foundation.dart'; -import 'package:intl/intl.dart'; -import '../../config.dart' as config; -import '../../helper.dart'; -import '../../logging.dart'; +import '../../../helper.dart'; +import '../../../logging.dart'; +import '../../interface/rpc/rpc2.dart' as rpc2; -Future rpc2(final String method) async { - final url = 'http://${config.host}:${config.c.port}/${method}'; - - try { - final response = await http.post - ( url, - ); - return response; - } - catch (e) { - log.warning(e); - return null; - } -} - -dynamic jsonDecode(final String responseBody) => json.decode(responseBody); - -Future rpc2String(final String method, {final String field}) async { - final response = await rpc2(method); - - if (response == null) return ''; - - if (response.statusCode != 200) { - return ''; - } else { - final _body = await compute(jsonDecode, response.body); - final _field = field == null ? _body: _body[field]; - - return pretty(_field); - } -} - -Future getTransactionPool() async => rpc2('get_transaction_pool'); +Future getTransactionPool() async => rpc2.rpc2('get_transaction_pool'); Future>> getTransactionPoolSimple() async { final response = await getTransactionPool(); diff --git a/cyberwow/lib/controller/rpc/rpcView.dart b/cyberwow/lib/logic/view/rpc/rpc.dart similarity index 98% rename from cyberwow/lib/controller/rpc/rpcView.dart rename to cyberwow/lib/logic/view/rpc/rpc.dart index a92d5e6..7fc0427 100644 --- a/cyberwow/lib/controller/rpc/rpcView.dart +++ b/cyberwow/lib/logic/view/rpc/rpc.dart @@ -21,8 +21,8 @@ along with CyberWOW. If not, see . import 'package:intl/intl.dart'; -import '../../config.dart' as config; -import '../../helper.dart'; +import '../../../config.dart' as config; +import '../../../helper.dart'; Map getConnectionView(Map x) { const _remove = diff --git a/cyberwow/lib/controller/rpc/rpc2View.dart b/cyberwow/lib/logic/view/rpc/rpc2.dart similarity index 97% rename from cyberwow/lib/controller/rpc/rpc2View.dart rename to cyberwow/lib/logic/view/rpc/rpc2.dart index cd260e6..4d8d7af 100644 --- a/cyberwow/lib/controller/rpc/rpc2View.dart +++ b/cyberwow/lib/logic/view/rpc/rpc2.dart @@ -23,8 +23,8 @@ import 'dart:math'; import 'package:intl/intl.dart'; -import '../../config.dart' as config; -import '../../helper.dart'; +import '../../../config.dart' as config; +import '../../../helper.dart'; Map txView(Map x) { const _remove = diff --git a/cyberwow/lib/main.dart b/cyberwow/lib/main.dart index 02f5702..a440236 100644 --- a/cyberwow/lib/main.dart +++ b/cyberwow/lib/main.dart @@ -28,7 +28,7 @@ import 'dart:io'; import 'dart:async'; import 'config.dart' as config; -import 'controller/process/run.dart' as process; +import 'logic/controller/process/run.dart' as process; import 'logging.dart'; import 'state.dart' as state; import 'widget.dart' as widget; diff --git a/cyberwow/lib/state/loading.dart b/cyberwow/lib/state/loading.dart index 3c9bd38..2fd8751 100644 --- a/cyberwow/lib/state/loading.dart +++ b/cyberwow/lib/state/loading.dart @@ -21,7 +21,6 @@ along with CyberWOW. If not, see . import 'package:shared_preferences/shared_preferences.dart'; -import '../controller/helper.dart'; import '../config.dart' as config; import '../logging.dart'; import '../helper.dart'; diff --git a/cyberwow/lib/state/resyncing.dart b/cyberwow/lib/state/resyncing.dart index 6196111..fd2569e 100644 --- a/cyberwow/lib/state/resyncing.dart +++ b/cyberwow/lib/state/resyncing.dart @@ -22,9 +22,9 @@ along with CyberWOW. If not, see . import 'dart:async'; import 'dart:collection'; -import '../controller/rpc/rpc.dart' as rpc; -import '../controller/daemon.dart' as daemon; -import '../controller/refresh.dart' as refresh; +import '../logic/controller/refresh.dart' as refresh; +import '../logic/sensor/rpc/rpc.dart' as rpc; +import '../logic/sensor/daemon.dart' as daemon; import '../config.dart' as config; import '../logging.dart'; diff --git a/cyberwow/lib/state/synced.dart b/cyberwow/lib/state/synced.dart index ac3e9b7..15d4f0d 100644 --- a/cyberwow/lib/state/synced.dart +++ b/cyberwow/lib/state/synced.dart @@ -26,12 +26,12 @@ import 'dart:collection'; import 'package:flutter/material.dart'; import '../config.dart' as config; -import '../controller/daemon.dart' as daemon; -import '../controller/refresh.dart' as refresh; -import '../controller/rpc/rpc.dart' as rpc; -import '../controller/rpc/rpc2.dart' as rpc; -import '../controller/rpc/rpc2View.dart' as rpc2View; -import '../controller/rpc/rpcView.dart' as rpcView; +import '../logic/sensor/daemon.dart' as daemon; +import '../logic/controller/refresh.dart' as refresh; +import '../logic/sensor/rpc/rpc.dart' as rpc; +import '../logic/sensor/rpc/rpc2.dart' as rpc; +import '../logic/view/rpc/rpc2.dart' as rpc2View; +import '../logic/view/rpc/rpc.dart' as rpcView; import '../helper.dart'; import '../logging.dart'; @@ -66,7 +66,7 @@ class SyncedState extends AppState { } void appendInput(final String line) { - stdout.addLast(config.c.promptString + line + '\n'); + stdout.addLast(config.c.promptString + line); syncState(); processInput.add(line); diff --git a/cyberwow/lib/state/syncing.dart b/cyberwow/lib/state/syncing.dart index 3cc10a8..80cf59b 100644 --- a/cyberwow/lib/state/syncing.dart +++ b/cyberwow/lib/state/syncing.dart @@ -22,9 +22,9 @@ along with CyberWOW. If not, see . import 'dart:async'; import 'dart:collection'; -import '../controller/rpc/rpc.dart' as rpc; -import '../controller/daemon.dart' as daemon; -import '../controller/refresh.dart' as refresh; +import '../logic/sensor/rpc/rpc.dart' as rpc; +import '../logic/sensor/daemon.dart' as daemon; +import '../logic/controller/refresh.dart' as refresh; import '../config.dart' as config; import '../logging.dart'; @@ -34,7 +34,7 @@ import 'exiting.dart'; class SyncingState extends AppState { - final Queue stdout = Queue.from(['']); + final Queue stdout = Queue(); bool synced = false; diff --git a/cyberwow/lib/widget.dart b/cyberwow/lib/widget.dart index 89ac2dc..c289470 100644 --- a/cyberwow/lib/widget.dart +++ b/cyberwow/lib/widget.dart @@ -37,6 +37,6 @@ Widget build(final BuildContext context, final AppState state) { case SyncedState: return synced.build(context, state); case ReSyncingState: return resyncing.build(context, state); case ExitingState: return exiting.build(context, state); - default: Placeholder(); + default: return Placeholder(); } } diff --git a/cyberwow/lib/widget/synced.dart b/cyberwow/lib/widget/synced.dart index 0334cd3..a3db0a6 100644 --- a/cyberwow/lib/widget/synced.dart +++ b/cyberwow/lib/widget/synced.dart @@ -205,6 +205,8 @@ Widget terminalView(BuildContext context, String title, SyncedState state) { textInputAction: TextInputAction.next, autofocus: true, autocorrect: false, + enableSuggestions: false, + keyboardType: TextInputType.visiblePassword, decoration: InputDecoration ( @@ -276,7 +278,7 @@ Widget terminalView(BuildContext context, String title, SyncedState state) { Text ( - state.stdout.join(), + state.stdout.join('\n'), style: Theme.of(context).textTheme.body2, ) ], diff --git a/cyberwow/lib/widget/syncing.dart b/cyberwow/lib/widget/syncing.dart index 4e50b2c..2df3d62 100644 --- a/cyberwow/lib/widget/syncing.dart +++ b/cyberwow/lib/widget/syncing.dart @@ -52,7 +52,7 @@ Widget build(BuildContext context, SyncingState state) { reverse: true, child: Text ( - state.stdout.join(), + state.stdout.join('\n'), style: Theme.of(context).textTheme.body1, ) ) diff --git a/cyberwow/pubspec.lock b/cyberwow/pubspec.lock index 1a5481f..1ec6745 100644 --- a/cyberwow/pubspec.lock +++ b/cyberwow/pubspec.lock @@ -78,14 +78,14 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+2" + version: "0.12.0+4" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "3.1.4" image: dependency: transitive description: @@ -99,14 +99,14 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.0" + version: "0.16.1" logging: dependency: "direct main" description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "0.11.3+2" + version: "0.11.4" matcher: dependency: transitive description: @@ -134,14 +134,28 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.6.5" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.8.0+1" + version: "1.9.0" petitparser: dependency: transitive description: @@ -156,6 +170,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" quiver: dependency: transitive description: @@ -169,28 +190,28 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.6+1" + version: "0.5.6+3" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "0.0.1+6" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.3" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.2+3" + version: "0.1.2+4" sky_engine: dependency: transitive description: flutter @@ -237,7 +258,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.11" + version: "0.2.15" typed_data: dependency: transitive description: @@ -260,5 +281,5 @@ packages: source: hosted version: "3.5.0" sdks: - dart: ">=2.4.0 <3.0.0" + dart: ">=2.5.0 <3.0.0" flutter: ">=1.12.13+hotfix.4 <2.0.0" diff --git a/cyberwow/pubspec.yaml b/cyberwow/pubspec.yaml index 447d4f2..4106a47 100644 --- a/cyberwow/pubspec.yaml +++ b/cyberwow/pubspec.yaml @@ -1,7 +1,7 @@ name: cyberwow description: A new Flutter project. -version: 0.7.0+23 +version: 0.7.0+24 environment: sdk: ">=2.1.0 <3.0.0" diff --git a/etc/nix/fdroid.nix b/etc/nix/fdroid.nix index 291c92c..6af7a6a 100644 --- a/etc/nix/fdroid.nix +++ b/etc/nix/fdroid.nix @@ -18,10 +18,12 @@ let pyasn1 pyasn1-modules python-vagrant + libvirt pyyaml qrcode requests ruamel_yaml + libvirt ] ; python-with-fdroid-packages = pkgs.python3.withPackages fdroid-python-packages diff --git a/etc/nix/shell.nix b/etc/nix/shell.nix index baddbb1..725acd7 100644 --- a/etc/nix/shell.nix +++ b/etc/nix/shell.nix @@ -38,7 +38,7 @@ let with nixpkgs; (buildFHSUserEnv { - name = "sora-tuner-env" + name = "cyberwow-build-env" ; targetPkgs = pkgs: (with pkgs; [ bash @@ -53,7 +53,7 @@ with nixpkgs; # openjdk # jetbrains.jdk # zulu - jdk + jdk12 # dart_dev gnumake gcc @@ -82,10 +82,11 @@ with nixpkgs; ; profile = '' export ANDROID_HOME=~/SDK/Android/Sdk - PATH=~/local/sdk/flutter/bin:$PATH + PATH=~/local/sdk/flutter/beta/bin:$PATH PATH=~/SDK/Android/android-studio/bin:$PATH + PATH=~/SDK/Android/Sdk/tools/bin:$PATH - export ANDROID_NDK_VERSION=r20 + export ANDROID_NDK_VERSION=r20b export ANDROID_NDK_ROOT=~/SDK/Android/ndk-archive/android-ndk-$ANDROID_NDK_VERSION export NDK=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64 PATH=$NDK/bin:$PATH @@ -99,6 +100,7 @@ with nixpkgs; export ANDROID_NDK_VERSION_WOW=r17c export ANDROID_NDK_ROOT_WOW=~/SDK/Android/ndk-archive/android-ndk-$ANDROID_NDK_VERSION_WOW + export ZSH_INIT=${nixpkgs.oh-my-zsh}/share/oh-my-zsh/oh-my-zsh.sh exec zsh ''