From 29107c388ab49aea062d272fba2ca4bf9b44e3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Sat, 23 Jul 2022 20:17:46 +1000 Subject: [PATCH] rbspy: fix compilation with rust 1.62 --- pkgs/development/tools/rbspy/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix index fbd97882428f..4e7135233baa 100644 --- a/pkgs/development/tools/rbspy/default.nix +++ b/pkgs/development/tools/rbspy/default.nix @@ -1,4 +1,11 @@ -{ stdenv, rustPlatform, fetchFromGitHub, lib, ruby, which}: +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, fetchpatch +, ruby +, which +}: rustPlatform.buildRustPackage rec { pname = "rbspy"; version = "0.12.1"; @@ -13,6 +20,15 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "98vmUoWSehX/9rMlHNSvKHJvJxW99pOhS08FI3OeLGo="; doCheck = true; + patches = [ + # Backport rust 1.62 support. Should be removed in the next rbspy release. + (fetchpatch { + name = "rust-1.62.patch"; + url = "https://github.com/rbspy/rbspy/commit/f5a8eecfbf2ad0b3ff9105115988478fb760d54d.patch"; + sha256 = "sha256-+04rvEXU7/lx5IQkk3Bhe+KLN8PwxZ0j4nH5ySnS154="; + }) + ]; + # Tests in initialize.rs rely on specific PIDs being queried and attaching # tracing to forked processes, which don't work well with the isolated build. preCheck = ''