summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-02-18 14:57:07 -0600
committerWill Dietz <w@wdtz.org>2018-02-18 14:57:07 -0600
commit06cb5d8f92184682860861d2eaacac455f20d2ea (patch)
treec8a69ff7142d2459f6cfa4e7f1aadb0ccf37752b /pkgs
parent9800a0d398e50e91d6cc176350fcc8d47b15d452 (diff)
downloadnixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar.gz
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar.bz2
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar.lz
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar.xz
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.tar.zst
nixlib-06cb5d8f92184682860861d2eaacac455f20d2ea.zip
radare2: use capstone rev used by default, not release from 2015.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/analysis/radare2/default.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix
index f68a83f183b8..6a7992b01311 100644
--- a/pkgs/development/tools/analysis/radare2/default.nix
+++ b/pkgs/development/tools/analysis/radare2/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchFromGitHub, fetchurl, fetchpatch, pkgconfig, libusb, readline, libewf, perl, zlib, openssl,
+{stdenv, fetchFromGitHub, fetchgit, fetchurl, fetchpatch, pkgconfig, libusb, readline, libewf, perl, zlib, openssl, git,
 gtk2 ? null, vte ? null, gtkdialog ? null,
 python ? null,
 ruby ? null,
@@ -24,21 +24,22 @@ stdenv.mkDerivation rec {
   };
 
   postPatch = let
-    cs_ver = "3.0.4"; # version from $sourceRoot/shlr/Makefile
-    capstone = fetchurl {
-      url = "https://github.com/aquynh/capstone/archive/${cs_ver}.tar.gz";
-      sha256 = "1whl5c8j6vqvz2j6ay2pyszx0jg8d3x8hq66cvgghmjchvsssvax";
+    cs_tip = "bdbc57de63725a98732ddc34b48de96f8ada66f2"; # version from $sourceRoot/shlr/Makefile
+    capstone = fetchgit {
+      url = "https://github.com/aquynh/capstone.git";
+      rev = cs_tip;
+      sha256 = "1sqxpjf2dlrg87dm9p39p5d1qzahrnfnrjijpv1xg1shax439jni";
+      leaveDotGit = true;
     };
   in ''
-    if ! grep -F "CS_VER=${cs_ver}" shlr/Makefile; then echo "CS_VER mismatch"; exit 1; fi
-    substituteInPlace shlr/Makefile --replace CS_RELEASE=0 CS_RELEASE=1
-    cp ${capstone} shlr/capstone-${cs_ver}.tar.gz
-
+    if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
+    cp -r ${capstone} shlr/capstone
+    chmod -R u+rw shlr/capstone
   '';
 
   enableParallelBuilding = true;
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig git ];
   buildInputs = [ readline libusb libewf perl zlib openssl]
     ++ optional useX11 [gtkdialog vte gtk2]
     ++ optional rubyBindings [ruby]