-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdce920
commit 5a9bd5e
Showing
4 changed files
with
124 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import ../../pinned-nixpkgs.nix {}).callPackage ./unstable.nix {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ lib, gcc9Stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto }: | ||
|
||
gcc9Stdenv.mkDerivation rec { | ||
version = "5.4.0"; | ||
pname = "rr"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "mozilla"; | ||
repo = "rr"; | ||
rev = version; | ||
sha256 = "1sfldgkkmsdyaqa28i5agcykc63gwm3zjihd64g86i852w8al2w6"; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' | ||
sed '7i#include <math.h>' -i src/Scheduler.cc | ||
patchShebangs . | ||
''; | ||
|
||
# TODO: remove this preConfigure hook after 5.2.0 since it is fixed upstream | ||
# see https://github.com/mozilla/rr/issues/2269 | ||
preConfigure = ''substituteInPlace CMakeLists.txt --replace "std=c++11" "std=c++14"''; | ||
|
||
nativeBuildInputs = [ cmake pkg-config which ]; | ||
buildInputs = [ | ||
libpfm zlib python3Packages.python python3Packages.pexpect procps gdb capnproto | ||
]; | ||
propagatedBuildInputs = [ gdb ]; # needs GDB to replay programs at runtime | ||
cmakeFlags = [ | ||
"-DCMAKE_C_FLAGS_RELEASE:STRING=" | ||
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=" | ||
"-Ddisable32bit=ON" | ||
]; | ||
|
||
# we turn on additional warnings due to hardening | ||
NIX_CFLAGS_COMPILE = "-Wno-error"; | ||
|
||
hardeningDisable = [ "fortify" ]; | ||
|
||
# FIXME | ||
#doCheck = true; | ||
|
||
preCheck = "export HOME=$TMPDIR"; | ||
|
||
meta = { | ||
homepage = "https://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 = with lib.licenses; [ mit bsd2 ]; | ||
maintainers = with lib.maintainers; [ pierron thoughtpolice ]; | ||
platforms = lib.platforms.x86; | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ callPackage, fetchFromGitHub }: | ||
|
||
let | ||
rr = callPackage ./. {}; | ||
in | ||
|
||
rr.overrideAttrs (old: { | ||
version = "unstable-2020-10-10"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "mozilla"; | ||
repo = "rr"; | ||
|
||
rev = "1817b9d440a2725eeae7ffff2764f6a102989042"; | ||
sha256 = "0m9pxhr539zarfx8kxkxa6k8xari05ylcbmrvkdbgshd5786rxpz"; | ||
|
||
}; | ||
}) |