summary refs log tree commit diff
path: root/pkgs/development/tools/rbspy/default.nix
diff options
context:
space:
mode:
authorStanisław Pitucha <viraptor@gmail.com>2022-05-09 20:39:18 +1000
committerStanisław Pitucha <viraptor@gmail.com>2022-06-09 21:23:23 +1000
commit9c573c0833285c5337493389e6ba4f8a8519b51e (patch)
tree89af27f0795a1440aa917b9aa7fefd1e7b386297 /pkgs/development/tools/rbspy/default.nix
parent7f2ee91864e25978d395618ec74d4886be16f2bf (diff)
downloadnixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar.gz
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar.bz2
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar.lz
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar.xz
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.tar.zst
nixpkgs-9c573c0833285c5337493389e6ba4f8a8519b51e.zip
rbspy: 0.11.1 -> 0.12.1
Diffstat (limited to 'pkgs/development/tools/rbspy/default.nix')
-rw-r--r--pkgs/development/tools/rbspy/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix
index beb4df0f168..fbd97882428 100644
--- a/pkgs/development/tools/rbspy/default.nix
+++ b/pkgs/development/tools/rbspy/default.nix
@@ -1,18 +1,32 @@
-{ stdenv, rustPlatform, fetchFromGitHub, lib}:
+{ stdenv, rustPlatform, fetchFromGitHub, lib, ruby, which}:
 rustPlatform.buildRustPackage rec {
   pname = "rbspy";
-  version = "0.11.1";
+  version = "0.12.1";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-9BeQHwwnirK5Wquj6Tal8yCU/NXZGaPjXZe3cy5m98s=";
+    sha256 = "FnUUX7qQWVZMHtWvneTLzBL1YYwF8v4e1913Op4Lvbw=";
   };
 
-  cargoSha256 = "sha256-DHdfv6210wAkL9vXxLr76ejFWU/eV/q3lmgsYa5Rn54=";
+  cargoSha256 = "98vmUoWSehX/9rMlHNSvKHJvJxW99pOhS08FI3OeLGo=";
   doCheck = true;
 
+  # 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 = ''
+    substituteInPlace src/core/process.rs \
+      --replace /usr/bin/which '${which}/bin/which'
+    substituteInPlace src/sampler/mod.rs \
+      --replace /usr/bin/which '${which}/bin/which'
+    substituteInPlace src/core/initialize.rs \
+      --replace 'fn test_initialize_with_disallowed_process(' '#[ignore] fn test_initialize_with_disallowed_process(' \
+      --replace 'fn test_get_exec_trace(' '#[ignore] fn test_get_exec_trace(' \
+  '';
+
+  nativeBuildInputs = [ ruby which ];
+
   meta = with lib; {
     broken = (stdenv.isLinux && stdenv.isAarch64);
     homepage = "https://rbspy.github.io/";