diff options
author | Tristan Ross <tristan.ross@midstall.com> | 2024-06-25 22:15:45 -0700 |
---|---|---|
committer | Tristan Ross <tristan.ross@midstall.com> | 2024-06-25 22:15:45 -0700 |
commit | 46a0243923a19886b8e5515c24d8007497273260 (patch) | |
tree | ee0491cc299f0da146a1bbda88c4f70515d0fcd2 /pkgs | |
parent | 2572634a6d50fdd1aafbd4f98c3553a08ec3f011 (diff) |
flutterPackages-source.v3_23.engine: fix building
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/flutter/engine/package.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/development/compilers/flutter/engine/package.nix b/pkgs/development/compilers/flutter/engine/package.nix index 09133fea5fa91..a87088dc8131d 100644 --- a/pkgs/development/compilers/flutter/engine/package.nix +++ b/pkgs/development/compilers/flutter/engine/package.nix @@ -83,6 +83,8 @@ let }; outName = "host_${runtimeMode}${lib.optionalString (!isOptimized) "_unopt --unoptimized"}"; + + dartPath = "${if (lib.versionAtLeast flutterVersion "3.23") then "flutter/third_party" else "third_party"}/dart"; in stdenv.mkDerivation (finalAttrs: { pname = "flutter-engine-${runtimeMode}${lib.optionalString (!isOptimized) "-unopt"}"; @@ -168,14 +170,14 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ gtk3 ]; patchtools = [ - "third_party/dart/tools/sdks/dart-sdk/bin/dart" + "${dartPath}/tools/sdks/dart-sdk/bin/dart" "flutter/third_party/gn/gn" ]; dontPatch = true; patchgit = [ - "third_party/dart" + dartPath "flutter" "." ] ++ lib.optional (lib.versionAtLeast flutterVersion "3.21") "flutter/third_party/skia"; @@ -183,6 +185,8 @@ stdenv.mkDerivation (finalAttrs: { postUnpack = '' pushd ${src.name} + cp ${./pkg-config.py} src/build/config/linux/pkg-config.py + cp -pr --reflink=auto $swiftshader src/flutter/third_party/swiftshader chmod -R u+w -- src/flutter/third_party/swiftshader @@ -190,7 +194,8 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p src/flutter/buildtools/${constants.alt-platform} ln -s ${llvm} src/flutter/buildtools/${constants.alt-platform}/clang - ln -s ${dart} src/third_party/dart/tools/sdks/dart-sdk + + ln -s ${dart} src/${dartPath}/tools/sdks/dart-sdk ${lib.optionalString (stdenv.isLinux) '' for patchtool in ''${patchtools[@]}; do @@ -210,9 +215,8 @@ stdenv.mkDerivation (finalAttrs: { popd done - dart src/third_party/dart/tools/generate_package_config.dart - cp ${./pkg-config.py} src/build/config/linux/pkg-config.py - echo "${dartSdkVersion}" >src/third_party/dart/sdk/version + dart src/${dartPath}/tools/generate_package_config.dart + echo "${dartSdkVersion}" >src/${dartPath}/sdk/version rm -rf src/third_party/angle/.git python3 src/flutter/tools/pub_get_offline.py |