flutter.mkFlutterApp: Don't use autoPatchelf on package cache

While this may be beneficial for packages that ship native binaries, this causes issues due to Flutter packages that have inappropriately uploaded build artifacts (such as those from example subprojects) to pub.dev.
This commit is contained in:
hacker1024 2023-04-14 01:41:58 +10:00
parent cedcb0b772
commit 8f9aa6b18b

View File

@ -1,6 +1,5 @@
{ lib
, stdenvNoCC
, autoPatchelfHook
, nukeReferences
, llvmPackages_13
, cacert
@ -111,12 +110,10 @@ let
});
nativeBuildInputs = [ flutter autoPatchelfHook ] ++ lib.optionals (args ? nativeBuildInputs) args.nativeBuildInputs;
nativeBuildInputs = [ flutter ] ++ lib.optionals (args ? nativeBuildInputs) args.nativeBuildInputs;
buildInputs = lib.optionals (args ? buildInputs) args.buildInputs;
dontAutoPatchelf = true;
configurePhase = ''
runHook preConfigure
@ -152,8 +149,6 @@ let
# prepare
export HOME="$depsFolder"
# binaries need to be patched
autoPatchelf -- "$depsFolder"
runHook postConfigure
'';
@ -187,9 +182,6 @@ let
ln -s $f $out/bin/$(basename $f)
done
# this confuses autopatchelf hook otherwise
rm -rf "$depsFolder"
# make *.so executable
find $out/app -iname "*.so" -type f -exec chmod +x {} +