Use devenv instead of flake
This commit is contained in:
8
.envrc
8
.envrc
@@ -1 +1,7 @@
|
|||||||
use flake
|
export DIRENV_WARN_TIMEOUT=20s
|
||||||
|
|
||||||
|
eval "$(devenv direnvrc)"
|
||||||
|
|
||||||
|
# The use_devenv function supports passing flags to the devenv command
|
||||||
|
# For example: use devenv --impure --option services.postgres.enable:bool true
|
||||||
|
use devenv
|
||||||
|
|||||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -43,3 +43,15 @@ app.*.map.json
|
|||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
/.direnv/
|
/.direnv/
|
||||||
|
|
||||||
|
# Devenv
|
||||||
|
.devenv*
|
||||||
|
devenv.local.nix
|
||||||
|
|
||||||
|
# direnv
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
# pre-commit
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
.android
|
||||||
|
android/app/.cxx/
|
||||||
|
|||||||
103
devenv.lock
Normal file
103
devenv.lock
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"devenv": {
|
||||||
|
"locked": {
|
||||||
|
"dir": "src/modules",
|
||||||
|
"lastModified": 1747717470,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "devenv",
|
||||||
|
"rev": "c7f2256ee4a4a4ee9cbf1e82a6e49b253c374995",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "src/modules",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "devenv",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747046372,
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747372754,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1746807397,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "devenv-nixpkgs",
|
||||||
|
"rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"ref": "rolling",
|
||||||
|
"repo": "devenv-nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"devenv": "devenv",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks": [
|
||||||
|
"git-hooks"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
37
devenv.nix
Normal file
37
devenv.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
android = {
|
||||||
|
enable = true;
|
||||||
|
emulator.enable = false;
|
||||||
|
flutter.enable = true;
|
||||||
|
|
||||||
|
buildTools.version = [
|
||||||
|
"34.0.0"
|
||||||
|
"33.0.1"
|
||||||
|
];
|
||||||
|
platforms.version = [
|
||||||
|
"27"
|
||||||
|
"28"
|
||||||
|
"29"
|
||||||
|
"30"
|
||||||
|
"31"
|
||||||
|
"32"
|
||||||
|
"33"
|
||||||
|
"34"
|
||||||
|
"35"
|
||||||
|
];
|
||||||
|
ndk.enable = true;
|
||||||
|
ndk.version = [
|
||||||
|
"25.1.8937393"
|
||||||
|
"26.3.11579264"
|
||||||
|
"27.2.12479018"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
15
devenv.yaml
Normal file
15
devenv.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
|
||||||
|
inputs:
|
||||||
|
nixpkgs:
|
||||||
|
url: github:cachix/devenv-nixpkgs/rolling
|
||||||
|
|
||||||
|
# If you're using non-OSS software, you can set allowUnfree to true.
|
||||||
|
allowUnfree: true
|
||||||
|
|
||||||
|
# If you're willing to use a package that's vulnerable
|
||||||
|
# permittedInsecurePackages:
|
||||||
|
# - "openssl-1.1.1w"
|
||||||
|
|
||||||
|
# If you have more than one devenv you can merge them
|
||||||
|
#imports:
|
||||||
|
# - ./backend
|
||||||
61
flake.lock
generated
61
flake.lock
generated
@@ -1,61 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1745953386,
|
|
||||||
"narHash": "sha256-Qk3dfcQzXEG9m4/znM6sYQs2Y/2c5pTP8Kdygwm42Z4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "13497c5ef45da38d78fe8c9ab768a63d513c35dd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
85
flake.nix
85
flake.nix
@@ -1,85 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Flutter";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
outputs =
|
|
||||||
{
|
|
||||||
self,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
flake-utils,
|
|
||||||
}:
|
|
||||||
flake-utils.lib.eachDefaultSystem (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs-unstable {
|
|
||||||
inherit system;
|
|
||||||
config = {
|
|
||||||
android_sdk.accept_license = true;
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
|
||||||
buildToolsVersions = [
|
|
||||||
"34.0.0"
|
|
||||||
"33.0.1"
|
|
||||||
];
|
|
||||||
platformVersions = [
|
|
||||||
"27"
|
|
||||||
"28"
|
|
||||||
"29"
|
|
||||||
"30"
|
|
||||||
"31"
|
|
||||||
"32"
|
|
||||||
"33"
|
|
||||||
"34"
|
|
||||||
"35"
|
|
||||||
];
|
|
||||||
abiVersions = [
|
|
||||||
"armeabi-v7a"
|
|
||||||
"arm64-v8a"
|
|
||||||
];
|
|
||||||
includeNDK = true;
|
|
||||||
ndkVersions = [ "27.2.12479018" ];
|
|
||||||
};
|
|
||||||
# androidSdk = androidComposition.androidsdk;
|
|
||||||
androidSdk = pkgs.androidenv.androidPkgs.androidsdk;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShell =
|
|
||||||
with pkgs;
|
|
||||||
mkShell {
|
|
||||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
|
||||||
buildInputs = [
|
|
||||||
flutter
|
|
||||||
androidSdk
|
|
||||||
jdk17
|
|
||||||
|
|
||||||
# Needed by flutter_secure_storage
|
|
||||||
libsecret.dev
|
|
||||||
jsoncpp.dev
|
|
||||||
|
|
||||||
gtk3.dev
|
|
||||||
pcre2.dev
|
|
||||||
libsysprof-capture
|
|
||||||
util-linux.dev
|
|
||||||
libselinux.dev
|
|
||||||
libsepol.dev
|
|
||||||
libthai.dev
|
|
||||||
libgcrypt.dev
|
|
||||||
libdatrie.dev
|
|
||||||
libgpg-error.dev
|
|
||||||
xorg.libXdmcp.dev
|
|
||||||
lerc.dev
|
|
||||||
libxkbcommon.dev
|
|
||||||
libepoxy.dev
|
|
||||||
xorg.libXtst
|
|
||||||
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
BIN
flutter_01.png
Normal file
BIN
flutter_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
1
flutter_jank_metrics_01.json
Normal file
1
flutter_jank_metrics_01.json
Normal file
File diff suppressed because one or more lines are too long
12
ios/RunnerTests/RunnerTests.swift
Normal file
12
ios/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import Flutter
|
||||||
|
import UIKit
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
3
local.properties
Normal file
3
local.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# This file was automatically generated by nix-shell.
|
||||||
|
sdk.dir=/nix/store/h2bpv7cnfxmpsfk875jspixz25npv09a-androidsdk/libexec/android-sdk
|
||||||
|
ndk.dir=/nix/store/h2bpv7cnfxmpsfk875jspixz25npv09a-androidsdk/libexec/android-sdk/ndk/
|
||||||
12
macos/RunnerTests/RunnerTests.swift
Normal file
12
macos/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user