1 diff --git a/src/portable/install.rs b/src/portable/install.rs
2 index 15944e4..f873349 100644
3 --- a/src/portable/install.rs
4 +++ b/src/portable/install.rs
5 @@ -134,8 +134,16 @@ fn unpack_package(cache_file: &Path, target_dir: &Path) -> anyhow::Result<()> {
6 for entry in arch.entries()? {
7 let mut entry = entry?;
8 let path = entry.path()?;
9 + let is_inside_bin = {
10 + let mut path_iter = path.iter();
11 + path_iter.next(); // discards first folder
12 + path_iter.as_path().starts_with("bin")
14 if let Some(path) = build_path(&target_dir, &path)? {
15 - entry.unpack(path)?;
16 + entry.unpack(&path)?;
18 + nix_patchelf_if_needed(&path);
22 bar.finish_and_clear();
23 @@ -222,3 +230,11 @@ pub fn package(pkg_info: &PackageInfo) -> anyhow::Result<InstallInfo> {
28 +fn nix_patchelf_if_needed(dest_path: &Path) {
29 + let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
30 + .arg("--set-interpreter")
31 + .arg("@dynamicLinker@")