flutter flake
This commit is contained in:
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Flutter 3.13.x";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
|
|
||||||
android-nixpkgs = {
|
|
||||||
url = "github:tadfisher/android-nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
outputs = { self, nixpkgs, flake-utils, android-nixpkgs }:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config = {
|
|
||||||
android_sdk.accept_license = true;
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
|
||||||
buildToolsVersions = [ "30.0.3" "34.0.0" "33.0.1"];
|
|
||||||
platformVersions = [ "35" "34" "33" "28" ];
|
|
||||||
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
|
|
||||||
};
|
|
||||||
androidCustomPackage = android-nixpkgs.sdk.${system} (
|
|
||||||
sdkPkgs: with sdkPkgs; [
|
|
||||||
build-tools-30.0.3
|
|
||||||
build-tools-34.0.0
|
|
||||||
]
|
|
||||||
);
|
|
||||||
androidSdk = androidComposition.androidsdk;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShell =
|
|
||||||
with pkgs; mkShell rec {
|
|
||||||
shellHook = ''
|
|
||||||
nu
|
|
||||||
exit
|
|
||||||
'';
|
|
||||||
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/34.0.0/aapt2";
|
|
||||||
|
|
||||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
|
||||||
buildInputs = [
|
|
||||||
flutter
|
|
||||||
androidSdk # The customized SDK that we've made above
|
|
||||||
# jdk17
|
|
||||||
jdk21
|
|
||||||
|
|
||||||
(vscode-with-extensions.override {
|
|
||||||
vscode = vscodium;
|
|
||||||
vscodeExtensions = with vscode-extensions; [
|
|
||||||
vscodevim.vim
|
|
||||||
dart-code.dart-code
|
|
||||||
dart-code.flutter
|
|
||||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace[
|
|
||||||
{
|
|
||||||
name = "awesome-flutter-snippets";
|
|
||||||
publisher = "nash";
|
|
||||||
version = "4.0.1";
|
|
||||||
sha256 = "lXdos/xB18h3Z0YfkgEk55G2JvRMYudUUIltugQjylU=";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
44
Shells/flutter/flake.nix
Normal file
44
Shells/flutter/flake.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
description = "Flutter 3.13.x";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
android_sdk.accept_license = true;
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||||
|
buildToolsVersions = [ "28.0.3" "33.0.1" ];
|
||||||
|
platformVersions = [ "33" "34" "28" ];
|
||||||
|
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
|
||||||
|
};
|
||||||
|
androidSdk = androidComposition.androidsdk;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShell =
|
||||||
|
with pkgs; mkShell rec {
|
||||||
|
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/33.0.1/aapt2";
|
||||||
|
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
||||||
|
buildInputs = [
|
||||||
|
flutter324
|
||||||
|
androidSdk
|
||||||
|
jdk17
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
zsh
|
||||||
|
|
||||||
|
exit
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
61
shells/flutter/flake.lock
generated
61
shells/flutter/flake.lock
generated
@@ -1,61 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710146030,
|
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721138476,
|
|
||||||
"narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Flutter 3.13.x";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config = {
|
|
||||||
android_sdk.accept_license = true;
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
buildToolsVersion = "34.0.0";
|
|
||||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
|
||||||
buildToolsVersions = [ buildToolsVersion "28.0.3" ];
|
|
||||||
platformVersions = [ "34" "28" ];
|
|
||||||
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
|
|
||||||
};
|
|
||||||
androidSdk = androidComposition.androidsdk;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShell =
|
|
||||||
with pkgs; mkShell rec {
|
|
||||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
|
||||||
buildInputs = [
|
|
||||||
flutter
|
|
||||||
androidSdk # The customized SDK that we've made above
|
|
||||||
jdk17
|
|
||||||
|
|
||||||
|
|
||||||
(vscode-with-extensions.override {
|
|
||||||
vscode = vscodium;
|
|
||||||
vscodeExtensions = with vscode-extensions; [
|
|
||||||
vscodevim.vim
|
|
||||||
dart-code.flutter
|
|
||||||
jnoortheen.nix-ide
|
|
||||||
];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user