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: reduce derivation size and refactor #108611

Merged
merged 2 commits into from Jan 6, 2021
Merged

flutter: reduce derivation size and refactor #108611

merged 2 commits into from Jan 6, 2021

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Jan 6, 2021

Motivation for this change

This PR refactors the flutter derivation, with the main objective to reduce derivation size:

Before:
/nix/store/p3avfmvd0yrjpwwml7vvqbjin5vacx2k-flutter-stable-1.22.0       2084894968

After:
/nix/store/750k4z1yj5xsw7ymmwvn7cfjjzkaygzg-flutter-stable-1.22.0       1647047080

Also, bump the packages to the latest versions.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Instead of copying the whole dart derivation to bin/cache/dart-sdk
directory, just symlink it.

Also, make sure that the flutter is build from dart passed as a
parameter.

Before:
/nix/store/p3avfmvd0yrjpwwml7vvqbjin5vacx2k-flutter-stable-1.22.0	2084894968

After:
/nix/store/750k4z1yj5xsw7ymmwvn7cfjjzkaygzg-flutter-stable-1.22.0	1647047080
Copy link
Member

@ericdallo ericdallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thiagokokada
Copy link
Contributor Author

Tested in a local repo:

❯ /nix/store/750k4z1yj5xsw7ymmwvn7cfjjzkaygzg-flutter-stable-1.22.0/bin/flutter pub get
Downloading package sky_engine...                                   0.6s
Downloading flutter_patched_sdk tools...                            0.7s
Downloading flutter_patched_sdk_product tools...                    0.6s
Downloading linux-x64 tools...                                      1.3s
Downloading linux-x64/font-subset tools...                          0.6s
Running "flutter pub get" in mini-meta-repo...                      5.2s

@thiagokokada thiagokokada changed the title flutter: refactor derivation and bump flutter: refactor derivation Jan 6, 2021
@thiagokokada thiagokokada marked this pull request as ready for review January 6, 2021 21:14
@thiagokokada
Copy link
Contributor Author

Opening this PR for review. I will try to bump flutter again after this PR is merged on master: #105311

@thiagokokada
Copy link
Contributor Author

/marvin opt-in
/status needs_reviewer

@marvin-mk2 marvin-mk2 bot added the marvin label Jan 6, 2021
@marvin-mk2
Copy link

marvin-mk2 bot commented Jan 6, 2021

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@thiagokokada thiagokokada changed the title flutter: refactor derivation flutter: reduce derivation size and refactor Jan 6, 2021
@ericdallo
Copy link
Member

/status needs_merger

@thiagokokada
Copy link
Contributor Author

@SuperSandro2000 Why the tag of blocked by PR?

I will leave the bump in a separate PR.

@thiagokokada
Copy link
Contributor Author

Result of nixpkgs-review pr 108611 run on x86_64-linux 1

4 packages built:
  • flutter (flutterPackages.stable)
  • flutter-beta (flutterPackages.beta)
  • flutter-dev (flutterPackages.dev)
  • hover

@kevincox kevincox merged commit 544d4f3 into NixOS:master Jan 6, 2021
@thiagokokada thiagokokada deleted the flutter-refactor-bump branch January 6, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants