{ callPackage, symlinkJoin, lib }:
let
  nixpkgsRoot = "@nixpkgs_root@";
  engineVersion = "@engine_version@";

  systemPlatforms = [
    "x86_64-linux"
    "aarch64-linux"
  ];

  derivations = builtins.map
    (systemPlatform: callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/engine/source.nix" {
      targetPlatform = lib.systems.elaborate systemPlatform;
      version = engineVersion;
      url = "https://github.com/flutter/engine.git@${engineVersion}";
      hashes."${systemPlatform}" = lib.fakeSha256;
    })
    systemPlatforms;
in
symlinkJoin {
  name = "evaluate-derivations";
  paths = derivations;
}
