From 0bdff430a4e804b42cc600bbe3b9b88ea4c86784 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 12 Dec 2014 01:19:50 -0600 Subject: [PATCH] nixpkgs: rr 2.0.0 -> 3.0.0, with 64bit support Signed-off-by: Austin Seipp --- .../development/tools/analysis/rr/default.nix | 24 +++++++++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index c2ab7a334fe..992d797c189 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -1,17 +1,27 @@ -{ stdenv, fetchFromGitHub, cmake, libpfm, zlib }: +{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, python }: stdenv.mkDerivation rec { - version = "2.0.0"; + version = "3.0.0"; name = "rr-${version}"; src = fetchFromGitHub { owner = "mozilla"; repo = "rr"; rev = version; - sha256 = "0mlxkj35zmm15dgnc7rfynnh2s2hpym01147vwc8pwv8qgab903s"; + sha256 = "1h4ddq7mmi0sfj6mh1qg2bfs3x7gz5qmn9dlnmpkrp38rqgnnhrg"; }; - buildInputs = [ cmake libpfm zlib ]; + 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="; meta = { @@ -25,7 +35,7 @@ stdenv.mkDerivation rec { ''; license = "custom"; - maintainers = [ stdenv.lib.maintainers.pierron ]; - platforms = [ "i686-linux" ]; + maintainers = with stdenv.lib.maintainers; [ pierron thoughtpolice ]; + platforms = stdenv.lib.platforms.linux; }; -} \ No newline at end of file +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c26ec089063..515c7f45279 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4699,7 +4699,7 @@ let remake = callPackage ../development/tools/build-managers/remake { }; - rr = callPackage_i686 ../development/tools/analysis/rr { }; + rr = callPackage ../development/tools/analysis/rr { }; saleae-logic = callPackage ../development/tools/misc/saleae-logic { };