Merge pull request #315991 from ExpidusOS/fix/flutter-moreutils

flutter: drop moreutils for more bash
This commit is contained in:
Peder Bergebakken Sundt 2024-06-13 02:28:56 +02:00 committed by GitHub
commit 88c0896b01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,6 @@
, pkg-config
, jq
, yq
, moreutils
}:
# absolutely no mac support for now
@ -73,11 +72,15 @@ let
extraPackageConfigSetup = ''
# https://github.com/flutter/flutter/blob/3.13.8/packages/flutter_tools/lib/src/dart/pub.dart#L755
if [ "$('${yq}/bin/yq' '.flutter.generate // false' pubspec.yaml)" = "true" ]; then
export TEMP_PACKAGES=$(mktemp)
'${jq}/bin/jq' '.packages |= . + [{
name: "flutter_gen",
rootUri: "flutter_gen",
languageVersion: "2.12",
}]' "$out" | '${moreutils}/bin/sponge' "$out"
}]' "$out" > "$TEMP_PACKAGES"
cp "$TEMP_PACKAGES" "$out"
rm "$TEMP_PACKAGES"
unset TEMP_PACKAGES
fi
'';
};