diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2020-09-17 15:33:17 -0300 |
---|---|---|
committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2020-09-17 15:33:17 -0300 |
commit | a323331e6ad6a82a276966330057a294cb6b0ab3 (patch) | |
tree | a76b4aa89153c1beecacbf8362e3d220867abaf1 /pkgs/development/interpreters/dart | |
parent | 9c73e34d1810ca72379d9c53254e32f46b9a074d (diff) |
dart: Fix dart2native by patching all ELFs
Before:
$ /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/dart2native hello.dart
Failed to generate native files:
ProcessException: No such file or directory
Command: /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/utils/gen_snapshot --snapshot-kind=app-aot-elf --elf=/tmp/HSHJQU/snapshot.aot /tmp/HSHJQU/kernel.dill
After:
$ /nix/store/czw7kpdmcqa76a9j00v2pjygrq7gy4c7-dart-2.7.2/bin/dart2native hello.dart
Generated: /home/thiagoko/hello.exe
$ ./hello.exe
Hello, World!
Diffstat (limited to 'pkgs/development/interpreters/dart')
-rw-r--r-- | pkgs/development/interpreters/dart/default.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/dart/default.nix b/pkgs/development/interpreters/dart/default.nix index 050e7f14979c..6ce43d55173b 100644 --- a/pkgs/development/interpreters/dart/default.nix +++ b/pkgs/development/interpreters/dart/default.nix @@ -69,9 +69,7 @@ stdenv.mkDerivation { mkdir -p $out cp -R * $out/ echo $libPath - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath $libPath \ - $out/bin/dart + find $out/bin -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \; ''; libPath = makeLibraryPath [ stdenv.cc.cc ]; |