From 56ef6eeb43f2ea9c47701bbe4534999aca78dd34 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 16 Oct 2018 09:54:51 -0500 Subject: [PATCH 1/4] radare2: 2.9.0 -> 3.0.0 --- .../tools/analysis/radare2/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index f10b820a73ea..4a2a32bf22a4 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -86,21 +86,21 @@ in { # # DO NOT EDIT! Automatically generated by ./update.py radare2 = generic { - version_commit = "19349"; - gittap = "2.9.0"; - gittip = "d5e9539ec8068ca2ab4759dc3b0697781ded4cc8"; - rev = "2.9.0"; - version = "2.9.0"; - sha256 = "0zz6337p9095picfvjrcnqaxdi2a2b68h9my523ilnw8ynwfhdzw"; - cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a"; - cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4"; + version_commit = "19720"; + gittap = "3.0.0"; + gittip = "13e3ebd2aa6653eb5b6bdd65a93dcddf3550fcfa"; + rev = "3.0.0"; + version = "3.0.0"; + sha256 = "0awbk9v7qjkarscaqzyly310f04dxgndxvxwxbjrsswqlp206b40"; + cs_tip = "e2c1cd46c06744beaceff42dd882de3a90f0a37c"; + cs_sha256 = "1czzqj8zdjgh7h2ixi26ij3mm4bgm4xw2slin6fv73nic8yaw722"; }; r2-for-cutter = generic { - version_commit = "19349"; + version_commit = "19720"; gittap = "2.8.0-189-gf82b28982"; gittip = "f82b289822825e4c7403734f3b95dfd7f5e4f725"; rev = "f82b289822825e4c7403734f3b95dfd7f5e4f725"; - version = "2018-08-14"; + version = "2018-08-13"; sha256 = "0zc2a09xmwbxphxd1b0ia0zm8323wfcmxwwx6k239681jj9qwgr1"; cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a"; cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4"; From f88957d1701d08e61dc44653d34524fa930b2778 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 16 Oct 2018 11:57:44 -0500 Subject: [PATCH 2/4] radare2: libuv and actually use deps we're providing Particularly openssl and zlib. There are others we may wish to provide but for now let's at least use the ones in buildInputs :). --- pkgs/development/tools/analysis/radare2/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index 4a2a32bf22a4..a6dbb8e601fe 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -2,6 +2,7 @@ , callPackage , ninja, meson , pkgconfig , libusb, readline, libewf, perl, zlib, openssl +, libuv , gtk2 ? null, vte ? null, gtkdialog ? null , python ? null , ruby ? null @@ -62,12 +63,15 @@ let "-Dr2_gittip=${gittip}" # 2.8.0 expects this, but later it becomes an option with default=false. "-Dcapstone_in_builddir=true" + + "-Duse_sys_openssl=true" + "-Duse_sys_zlib=true" ]; enableParallelBuilding = true; nativeBuildInputs = [ pkgconfig ninja meson ]; - buildInputs = [ readline libusb libewf perl zlib openssl] + buildInputs = [ readline libusb libewf perl zlib openssl libuv ] ++ optional useX11 [gtkdialog vte gtk2] ++ optional rubyBindings [ruby] ++ optional pythonBindings [python] From 6fdc1655649076262a93cddd4cb389457a0287e4 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 16 Oct 2018 12:35:16 -0500 Subject: [PATCH 3/4] r2-for-cutter: revert accidental change to version info --- pkgs/development/tools/analysis/radare2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index a6dbb8e601fe..7e7f10ea7ff0 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -100,11 +100,11 @@ in { cs_sha256 = "1czzqj8zdjgh7h2ixi26ij3mm4bgm4xw2slin6fv73nic8yaw722"; }; r2-for-cutter = generic { - version_commit = "19720"; + version_commit = "19349"; gittap = "2.8.0-189-gf82b28982"; gittip = "f82b289822825e4c7403734f3b95dfd7f5e4f725"; rev = "f82b289822825e4c7403734f3b95dfd7f5e4f725"; - version = "2018-08-13"; + version = "2018-08-14"; sha256 = "0zc2a09xmwbxphxd1b0ia0zm8323wfcmxwwx6k239681jj9qwgr1"; cs_tip = "782ea67e17a391ca0d3faafdc365b335a1a8930a"; cs_sha256 = "1maww4ir78a193pm3f8lr2kdkizi7rywn68ffa65ipyr7j4pl6i4"; From 26dfc0c533a226de7bc2b0e93f6cac6009247e6e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 16 Oct 2018 14:01:08 -0500 Subject: [PATCH 4/4] radare2: fix update script to handle invocation from elsewhere It looks like `with Path:` is supposed to be a context-manager for changing directory but it doesn't seem to work and the only way I've found to make that work is if we made our own and annotated it. Instead just use nix search path to tell the expression where to find the file it looks for. Also re-use SCRIPT_DIR elsewhere instead of re-"computing" it. --- pkgs/development/tools/analysis/radare2/update.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/analysis/radare2/update.py b/pkgs/development/tools/analysis/radare2/update.py index 45920fd1e4bf..684d70bc0bc4 100755 --- a/pkgs/development/tools/analysis/radare2/update.py +++ b/pkgs/development/tools/analysis/radare2/update.py @@ -38,10 +38,9 @@ def get_radare2_rev() -> str: def get_cutter_version() -> str: version_expr = """ -(with import {}; (builtins.parseDrvName (qt5.callPackage ./cutter.nix {}).name).version) +(with import {}; (builtins.parseDrvName (qt5.callPackage {}).name).version) """ - with SCRIPT_DIR: - return sh("nix", "eval", "--raw", version_expr.strip()) + return sh("nix", "eval", "--raw", version_expr.strip(), "-I", "radare2={0}".format(SCRIPT_DIR)) def get_r2_cutter_rev() -> str: @@ -109,7 +108,7 @@ def main() -> None: "https://github.com/radare/radare2", ".", ) - nix_file = str(Path(__file__).parent.joinpath("default.nix")) + nix_file = str(SCRIPT_DIR.joinpath("default.nix")) radare2_info = get_repo_info(dirname, radare2_rev)