Build error when running Flutter app

I am trying to run a Flutter app in a nixos development shell. when i follow the nixos wiki example, i am getting an error on ‘flutter run’. It looks like the development shell does not have correctly configured environment variables for cmake. How can i fix it?

output from ‘flutter run’ command

Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                   
CMake Error in CMakeLists.txt:
  Imported target "PkgConfig::GTK" includes non-existent path

    "/nix/store/l0zdl1j9gc4w9j5b5k725m8fhlvmx7cb-graphite2-1.3.14/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
2 Likes

Note there is an official wiki now: Flutter - NixOS Wiki

This looks to me more like your nix store is corrupted, can you verify it?

Any solution? I have only added flutter package for web and Linux development. Facing this issue.