mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
flutterPackages-source.v3_23.engine: fix building
This commit is contained in:
parent
2572634a6d
commit
46a0243923
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user