From d96a901cc4af9e5b000b4c7a75acc14a56f26ba4 Mon Sep 17 00:00:00 2001 From: Sergii Maximoff <144961858+maximoffua@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:22:47 +0100 Subject: [PATCH] Update README.md Add usage example for devenv.sh --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 186b321..e661196 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,43 @@ This repository is made for fixing issues with flutter in nixpkgs, specifically [#260278](https://github.com/NixOS/nixpkgs/issues/260278). +# Getting started + +This flake provides the following packages: + +- packages.${system}.flutter +- packages.${system}.dart +- packages.${system}.flutter-unwrapped + +Will add overlays later. + +## With [devenv](https://devenv.sh) + +```yaml +# devenv.yaml +inputs: + nixpkgs: + url: github:NixOS/nixpkgs/nixpkgs-unstable + flutter-nix: + url: github:maximoffua/flutter.nix +``` + +```nix +# devenv.nix +{ + pkgs, + inputs, + ... +}: let + system = pkgs.stdenv.system; + flutter = inputs.flutter-nix.packages.${system}.flutter; +in { + languages.dart.enable = true; + languages.dart.package = flutter; + + enterShell = '' + flutter --version + ''; +} +``` +