Add nix flake for reproducible development environment
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,3 +42,4 @@ app.*.map.json
|
|||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
/.direnv/
|
||||||
|
|||||||
29
.metadata
29
.metadata
@@ -1,11 +1,11 @@
|
|||||||
# This file tracks properties of this Flutter project.
|
# This file tracks properties of this Flutter project.
|
||||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
#
|
#
|
||||||
# This file should be version controlled.
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
version:
|
version:
|
||||||
revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
revision: "nixpkgs000000000000000000000000000000000"
|
||||||
channel: stable
|
channel: "stable"
|
||||||
|
|
||||||
project_type: app
|
project_type: app
|
||||||
|
|
||||||
@@ -13,26 +13,11 @@ project_type: app
|
|||||||
migration:
|
migration:
|
||||||
platforms:
|
platforms:
|
||||||
- platform: root
|
- platform: root
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
create_revision: nixpkgs000000000000000000000000000000000
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
base_revision: nixpkgs000000000000000000000000000000000
|
||||||
- platform: android
|
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
- platform: ios
|
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
- platform: linux
|
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
- platform: macos
|
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
- platform: web
|
- platform: web
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
create_revision: nixpkgs000000000000000000000000000000000
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
base_revision: nixpkgs000000000000000000000000000000000
|
||||||
- platform: windows
|
|
||||||
create_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
base_revision: b4bce91dd0f168179d46a7ae5eceb3572ba9637a
|
|
||||||
|
|
||||||
# User provided section
|
# User provided section
|
||||||
|
|
||||||
|
|||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"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": 1734466380,
|
||||||
|
"narHash": "sha256-BERwUGx7BMin5JqBYWjjD/QLZpREQBloR2CpPBc6opY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "96ec91155148c857617fbf98ec1eabc61485181b",
|
||||||
|
"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
|
||||||
|
}
|
||||||
44
flake.nix
Normal file
44
flake.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildToolsVersion = "33.0.2";
|
||||||
|
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||||
|
buildToolsVersions = [ buildToolsVersion ];
|
||||||
|
platformVersions = [ "33" ];
|
||||||
|
abiVersions = [ "arm64-v8a" ];
|
||||||
|
};
|
||||||
|
androidSdk = androidComposition.androidsdk;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShell =
|
||||||
|
with pkgs;
|
||||||
|
mkShell rec {
|
||||||
|
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
||||||
|
buildInputs = [
|
||||||
|
flutter
|
||||||
|
androidSdk
|
||||||
|
jdk11
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user