From 56a690d7fb6d0ea98e67ed4ee0113d4f7ca17f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 11 Aug 2022 09:23:55 +0200 Subject: [PATCH] rustup: also patch binaries in libexec fixes https://github.com/NixOS/nixpkgs/issues/186052 --- .../rustup/0001-dynamically-patchelf-binaries.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch index 13649b387a3e..2b191031da60 100644 --- a/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch +++ b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch @@ -1,8 +1,8 @@ diff --git a/src/dist/component/package.rs b/src/dist/component/package.rs -index 3beddf54..0f859b8d 100644 +index 73a533b5..408ab815 100644 --- a/src/dist/component/package.rs +++ b/src/dist/component/package.rs -@@ -113,6 +113,7 @@ impl Package for DirectoryPackage { +@@ -113,6 +113,7 @@ fn install<'a>( } else { builder.move_file(path.clone(), &src_path)? } @@ -10,13 +10,13 @@ index 3beddf54..0f859b8d 100644 } "dir" => { if self.copy { -@@ -135,6 +136,29 @@ impl Package for DirectoryPackage { +@@ -135,6 +136,29 @@ fn components(&self) -> Vec { } } +fn nix_patchelf_if_needed(dest_path: &Path, src_path: &Path) { + let (is_bin, is_lib) = if let Some(p) = src_path.parent() { -+ (p.ends_with("bin"), p.ends_with("lib")) ++ (p.ends_with("bin") || p.ends_with("libexec"), p.ends_with("lib")) + } else { + (false, false) + }; @@ -38,5 +38,5 @@ index 3beddf54..0f859b8d 100644 +} + #[derive(Debug)] - pub struct TarPackage<'a>(DirectoryPackage, temp::Dir<'a>); + pub(crate) struct TarPackage<'a>(DirectoryPackage, temp::Dir<'a>);