Loading pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch +8 −8 Original line number Diff line number Diff line diff --git a/src/dist/component/package.rs b/src/dist/component/package.rs index dfccc661..85233f3b 100644 index dc545d4b62..4dd8ade86e 100644 --- a/src/dist/component/package.rs +++ b/src/dist/component/package.rs @@ -113,6 +113,7 @@ impl Package for DirectoryPackage { @@ -130,6 +130,7 @@ } else { builder.move_file(path.clone(), &src_path)? } + nix_patchelf_if_needed(&target.prefix().path().join(path.clone())) } "dir" => { ComponentPartKind::Dir => { if self.copy { @@ -135,6 +136,176 @@ impl Package for DirectoryPackage { @@ -152,6 +153,176 @@ } } Loading @@ -31,7 +31,7 @@ index dfccc661..85233f3b 100644 + .parent() + .ok_or(anyhow!("failed to get parent directory"))? + .with_file_name("nix-support"); + let mut file = std::fs::File::create(dest_lld_path)?; + let mut file = fs::File::create(dest_lld_path)?; + ld_wrapper_path.push("ld-wrapper.sh"); + + let wrapped_script = format!( Loading Loading @@ -184,6 +184,6 @@ index dfccc661..85233f3b 100644 + } +} + #[derive(Debug)] pub(crate) struct TarPackage<'a>(DirectoryPackage, temp::Dir<'a>); /// Handle the async result of io operations /// Replaces op.result with Ok(()) fn filter_result(op: &mut CompletedIo) -> io::Result<()> { pkgs/development/tools/rust/rustup/default.nix +8 −7 Original line number Diff line number Diff line Loading @@ -25,16 +25,16 @@ in rustPlatform.buildRustPackage (finalAttrs: { pname = "rustup"; version = "1.28.2"; version = "1.29.0"; src = fetchFromGitHub { owner = "rust-lang"; repo = "rustup"; tag = finalAttrs.version; hash = "sha256-iX5hEaQwCW9MuyafjXml8jV3EDnxRNUlOoy3Cur/Iyw="; hash = "sha256-jbB0nmXtc95Ac+YfmyELh6n5OTRMmeDPT4OFIlJNrZc="; }; cargoHash = "sha256-KljaAzYHbny7KHOO51MotdmNpHCKWdt6kc/FIpFN6c0="; cargoHash = "sha256-m/KoXNJh00zYKZo7MIJsBvo4zldfKdofrUh8AItJqXI="; nativeBuildInputs = [ makeBinaryWrapper Loading Loading @@ -78,9 +78,7 @@ rustPlatform.buildRustPackage (finalAttrs: { # TODO: Investigate this. doCheck = !stdenv.hostPlatform.isDarwin; # Random failures when running tests in parallel. preCheck = '' export NIX_BUILD_CORES=1 ''; dontUseCargoParallelTests = true; # skip failing tests checkFlags = [ Loading @@ -89,7 +87,10 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=suite::cli_exact::check_updates_some" "--skip=suite::cli_exact::check_updates_with_update" # rustup-init is not used in nix rustup "--skip=suite::cli_ui::rustup_init_ui_doc_text_tests" "--skip=suite::cli_rustup_init_ui" # reaches out to the network to test TLS roots, which can't be done in the # build sandbox "--skip=suite::static_roots::store_static_roots" ]; postInstall = '' Loading Loading
pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch +8 −8 Original line number Diff line number Diff line diff --git a/src/dist/component/package.rs b/src/dist/component/package.rs index dfccc661..85233f3b 100644 index dc545d4b62..4dd8ade86e 100644 --- a/src/dist/component/package.rs +++ b/src/dist/component/package.rs @@ -113,6 +113,7 @@ impl Package for DirectoryPackage { @@ -130,6 +130,7 @@ } else { builder.move_file(path.clone(), &src_path)? } + nix_patchelf_if_needed(&target.prefix().path().join(path.clone())) } "dir" => { ComponentPartKind::Dir => { if self.copy { @@ -135,6 +136,176 @@ impl Package for DirectoryPackage { @@ -152,6 +153,176 @@ } } Loading @@ -31,7 +31,7 @@ index dfccc661..85233f3b 100644 + .parent() + .ok_or(anyhow!("failed to get parent directory"))? + .with_file_name("nix-support"); + let mut file = std::fs::File::create(dest_lld_path)?; + let mut file = fs::File::create(dest_lld_path)?; + ld_wrapper_path.push("ld-wrapper.sh"); + + let wrapped_script = format!( Loading Loading @@ -184,6 +184,6 @@ index dfccc661..85233f3b 100644 + } +} + #[derive(Debug)] pub(crate) struct TarPackage<'a>(DirectoryPackage, temp::Dir<'a>); /// Handle the async result of io operations /// Replaces op.result with Ok(()) fn filter_result(op: &mut CompletedIo) -> io::Result<()> {
pkgs/development/tools/rust/rustup/default.nix +8 −7 Original line number Diff line number Diff line Loading @@ -25,16 +25,16 @@ in rustPlatform.buildRustPackage (finalAttrs: { pname = "rustup"; version = "1.28.2"; version = "1.29.0"; src = fetchFromGitHub { owner = "rust-lang"; repo = "rustup"; tag = finalAttrs.version; hash = "sha256-iX5hEaQwCW9MuyafjXml8jV3EDnxRNUlOoy3Cur/Iyw="; hash = "sha256-jbB0nmXtc95Ac+YfmyELh6n5OTRMmeDPT4OFIlJNrZc="; }; cargoHash = "sha256-KljaAzYHbny7KHOO51MotdmNpHCKWdt6kc/FIpFN6c0="; cargoHash = "sha256-m/KoXNJh00zYKZo7MIJsBvo4zldfKdofrUh8AItJqXI="; nativeBuildInputs = [ makeBinaryWrapper Loading Loading @@ -78,9 +78,7 @@ rustPlatform.buildRustPackage (finalAttrs: { # TODO: Investigate this. doCheck = !stdenv.hostPlatform.isDarwin; # Random failures when running tests in parallel. preCheck = '' export NIX_BUILD_CORES=1 ''; dontUseCargoParallelTests = true; # skip failing tests checkFlags = [ Loading @@ -89,7 +87,10 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=suite::cli_exact::check_updates_some" "--skip=suite::cli_exact::check_updates_with_update" # rustup-init is not used in nix rustup "--skip=suite::cli_ui::rustup_init_ui_doc_text_tests" "--skip=suite::cli_rustup_init_ui" # reaches out to the network to test TLS roots, which can't be done in the # build sandbox "--skip=suite::static_roots::store_static_roots" ]; postInstall = '' Loading