Loading pkgs/development/compilers/flutter/default.nix +2 −2 Original line number Diff line number Diff line { useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }@args: { useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }: let mkCustomFlutter = args: callPackage ./flutter.nix args; wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; }; Loading @@ -19,7 +19,7 @@ let , pubspecLock , artifactHashes , channel }@fargs: }: let args = { inherit version engineVersion engineSwiftShaderRev engineSwiftShaderHash engineHashes enginePatches patches pubspecLock artifactHashes useNixpkgsEngine channel; Loading pkgs/development/compilers/flutter/sdk-symlink.nix +22 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,28 @@ let if [ -d '${flutter.sdk}/.git' ]; then ln -s '${flutter.sdk}/.git' "$out" fi # For iOS/macOS builds, *.xcframework/'s from the pre-built # artifacts are copied into each built app. However, the symlinkJoin # means that the *.xcframework's contain symlinks into the nix store, # which causes issues when actually running the apps. # # We'll fix this by only linking to an outer *.xcframework dir instead # of trying to symlinkJoin the files inside the *.xcframework. artifactsDir="$out/bin/cache/artifacts/engine" shopt -s globstar for file in "$artifactsDir"/**/*.xcframework/Info.plist; do # Get the unwrapped path from the Info.plist inside each .xcframework origFile="$(readlink -f "$file")" origFrameworkDir="$(dirname "$origFile")" # Remove the symlinkJoin .xcframework dir and replace it with a symlink # to the unwrapped .xcframework dir. frameworkDir="$(dirname "$file")" rm -r "$frameworkDir" ln -s "$origFrameworkDir" "$frameworkDir" done shopt -u globstar ''; passthru = flutter.passthru // { Loading pkgs/development/compilers/flutter/wrapper.nix +1 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ , extraCFlags ? [ ] , extraLinkerFlags ? [ ] , makeWrapper , runCommandLocal , writeShellScript , wrapGAppsHook3 , git Loading @@ -39,7 +38,6 @@ , cmake , ninja , clang , lndir , symlinkJoin }: Loading @@ -56,7 +54,7 @@ let }; })); cacheDir = symlinkJoin rec { cacheDir = symlinkJoin { name = "flutter-cache-dir"; paths = builtins.attrValues flutterPlatformArtifacts; postBuild = '' Loading Loading
pkgs/development/compilers/flutter/default.nix +2 −2 Original line number Diff line number Diff line { useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }@args: { useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }: let mkCustomFlutter = args: callPackage ./flutter.nix args; wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; }; Loading @@ -19,7 +19,7 @@ let , pubspecLock , artifactHashes , channel }@fargs: }: let args = { inherit version engineVersion engineSwiftShaderRev engineSwiftShaderHash engineHashes enginePatches patches pubspecLock artifactHashes useNixpkgsEngine channel; Loading
pkgs/development/compilers/flutter/sdk-symlink.nix +22 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,28 @@ let if [ -d '${flutter.sdk}/.git' ]; then ln -s '${flutter.sdk}/.git' "$out" fi # For iOS/macOS builds, *.xcframework/'s from the pre-built # artifacts are copied into each built app. However, the symlinkJoin # means that the *.xcframework's contain symlinks into the nix store, # which causes issues when actually running the apps. # # We'll fix this by only linking to an outer *.xcframework dir instead # of trying to symlinkJoin the files inside the *.xcframework. artifactsDir="$out/bin/cache/artifacts/engine" shopt -s globstar for file in "$artifactsDir"/**/*.xcframework/Info.plist; do # Get the unwrapped path from the Info.plist inside each .xcframework origFile="$(readlink -f "$file")" origFrameworkDir="$(dirname "$origFile")" # Remove the symlinkJoin .xcframework dir and replace it with a symlink # to the unwrapped .xcframework dir. frameworkDir="$(dirname "$file")" rm -r "$frameworkDir" ln -s "$origFrameworkDir" "$frameworkDir" done shopt -u globstar ''; passthru = flutter.passthru // { Loading
pkgs/development/compilers/flutter/wrapper.nix +1 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ , extraCFlags ? [ ] , extraLinkerFlags ? [ ] , makeWrapper , runCommandLocal , writeShellScript , wrapGAppsHook3 , git Loading @@ -39,7 +38,6 @@ , cmake , ninja , clang , lndir , symlinkJoin }: Loading @@ -56,7 +54,7 @@ let }; })); cacheDir = symlinkJoin rec { cacheDir = symlinkJoin { name = "flutter-cache-dir"; paths = builtins.attrValues flutterPlatformArtifacts; postBuild = '' Loading