add flutter env

This commit is contained in:
Fabien Freling 2023-10-04 14:20:49 +02:00
commit 6509bdfaa8
3 changed files with 99 additions and 0 deletions

33
flake.nix Normal file
View file

@ -0,0 +1,33 @@
{
description = "FabApp";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-22.11";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = {
# Put your original flake attributes here.
};
systems = [ "x86_64-linux" ];
# https://flake.parts/module-arguments.html#persystem-module-parameters
perSystem = { pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
devShells.default = with pkgs;
let
vscodeCustom = pkgs.vscode-with-extensions.override {
vscodeExtensions = with pkgs.vscode-extensions;
[ dart-code.flutter ];
};
in mkShell { buildInputs = [ just flutter vscodeCustom ]; };
};
};
}