nixpkgs/pkgs/development/tools/analysis/rr/default.nix

42 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, python }:
2014-05-26 01:25:28 +02:00
stdenv.mkDerivation rec {
version = "3.0.0";
name = "rr-${version}";
2014-05-26 01:25:28 +02:00
src = fetchFromGitHub {
owner = "mozilla";
repo = "rr";
rev = version;
sha256 = "1h4ddq7mmi0sfj6mh1qg2bfs3x7gz5qmn9dlnmpkrp38rqgnnhrg";
2014-05-26 01:25:28 +02:00
};
patchPhase = ''
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
''
# On 64bit machines, don't build the 32-bit components for debugging
# 32-bit binaries. This sucks but I don't know how to make 'gcc' cooperate
# easily with how CMake works to build 32 and 64bit binaries at once.
+ stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
substituteInPlace CMakeLists.txt --replace 'if(rr_64BIT)' 'if(false)'
'';
buildInputs = [ cmake libpfm zlib python ];
cmakeFlags = "-DCMAKE_C_FLAGS_RELEASE:STRING= -DCMAKE_CXX_FLAGS_RELEASE:STRING=";
2014-05-26 01:25:28 +02:00
meta = {
homepage = http://rr-project.org/;
description = "Records nondeterministic executions and debugs them deterministically";
longDescription = ''
rr aspires to be your primary debugging tool, replacing -- well,
enhancing -- gdb. You record a failure once, then debug the
recording, deterministically, as many times as you want. Every
time the same execution is replayed.
'';
license = "custom";
maintainers = with stdenv.lib.maintainers; [ pierron thoughtpolice ];
platforms = stdenv.lib.platforms.linux;
2014-05-26 01:25:28 +02:00
};
}