Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter support #2

Open
mschwaig opened this issue Jul 12, 2021 · 0 comments
Open

Flutter support #2

mschwaig opened this issue Jul 12, 2021 · 0 comments

Comments

@mschwaig
Copy link

I tried building a flutter app with this project, which does not seem to work.

I wanted to share my notes here in case that is helpful.

I tried building https://github.com/GreenPassApp/greenpass-app as a flake with this project.

It seem like dependencies from the flutter SDK end up in the pubspec.yml like this

  flutter_web_plugins:
    dependency: transitive
    description: flutter
    source: sdk
    version: 0.0.0

while regular dependencies look like this

  app_settings:
    dependency: "direct main"
    description:
      name: app_settings
      url: "https://pub.dartlang.org"
    source: hosted
    version: "4.1.1"

The description containing text and not a name and a URL make pub2nix trip and stop adding hashes to pub2nix.lock after encountering the first such dependency.

I think pub2nix can only deal with dependencies of type hosted(the regular most common case) while the types sdk and git would probably have to be handled differently in nix-dart here and in pub2nix.

I am not sure what else would have to be done to get flutter apps building. It seems flutter would have to be invoked instead of dart.

I saw that there is also flutter support in nixpkgs (See NixOS/nixpkgs#36759 (comment)), but I have not looked more closely at that because I am unsure if there is a good way to get dependencies into a sandboxed build that way.

I am not actively working on getting this to work anymore as of now, since it was just an experiment for me. I am also not that familiar with flutter or dart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant