Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bf1b39d12770
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6fed64710ae6
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Feb 21, 2019

  1. radare2: 3.2.1 -> 3.3.0

    Mic92 committed Feb 21, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    codetheweb Max Isom
    Copy the full SHA
    c41ed75 View commit details
  2. Merge pull request #56113 from Mic92/radare2

    radare2: 3.2.1 -> 3.3.0
    Mic92 authored Feb 21, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    codetheweb Max Isom
    Copy the full SHA
    6fed647 View commit details
Showing with 29 additions and 23 deletions.
  1. +22 −16 pkgs/development/tools/analysis/radare2/default.nix
  2. +7 −7 pkgs/development/tools/analysis/radare2/update.py
38 changes: 22 additions & 16 deletions pkgs/development/tools/analysis/radare2/default.nix
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ let
rev,
version,
sha256,
cs_tip,
cs_ver,
cs_sha256
}:
stdenv.mkDerivation rec {
@@ -46,15 +46,21 @@ let
owner = "aquynh";
repo = "capstone";
# version from $sourceRoot/shlr/Makefile
rev = cs_tip;
rev = cs_ver;
sha256 = cs_sha256;
};
in ''
if ! grep -F "CS_TIP=${cs_tip}" shlr/Makefile; then echo "CS_TIP mismatch"; exit 1; fi
# When using meson, it expects capstone source relative to build directory
mkdir -p build/shlr
cp -r ${capstone} shlr/capstone
chmod -R +w shlr/capstone
cp -r ${capstone} capstone-${cs_ver}
chmod -R +w capstone-${cs_ver}
# radare 3.3 compat for radare2-cutter
(cd shlr && ln -s ../capstone-${cs_ver} capstone)
tar -czvf shlr/capstone-${cs_ver}.tar.gz capstone-${cs_ver}
# necessary because they broke the offline-build:
# https://github.com/radare/radare2/commit/6290e4ff4cc167e1f2c28ab924e9b99783fb1b38#diff-a44d840c10f1f1feaf401917ae4ccd54R258
# https://github.com/radare/radare2/issues/13087#issuecomment-465159716
curl() { true; }
export -f curl
'';

postInstall = ''
@@ -104,23 +110,23 @@ in {
#<generated>
# DO NOT EDIT! Automatically generated by ./update.py
radare2 = generic {
version_commit = "20591";
gittap = "3.2.1";
gittip = "25913f4745cb3b635d52f1aafc4d8ff2aad3988a";
rev = "3.2.1";
version = "3.2.1";
sha256 = "1c4zj96386sc9lvfcsdh9lhyh0rvv4zzfr6218gvjkg9fy6cc91y";
cs_tip = "0ff8220adef16a942697afd245afc5ab0f70cbf8";
cs_sha256 = "1ak8ysgivq28d23r77881p0z5v65jhpap5plm10p9j3y2x00n3zn";
version_commit = "20942";
gittap = "3.3.0";
gittip = "5a9127d2599c8ff61d8544be7d4c9384402e94a3";
rev = "3.3.0";
version = "3.3.0";
sha256 = "11ap3icr8w0y49lq5dxch2h589qdmwf3qv9lsdyfsz4l0mjm49ri";
cs_ver = "4.0.1";
cs_sha256 = "0ijwxxk71nr9z91yxw20zfj4bbsbrgvixps5c7cpj163xlzlwba6";
};
r2-for-cutter = generic {
version_commit = "20591";
version_commit = "20942";
gittap = "2.9.0-310-gcb62c376b";
gittip = "cb62c376bef6c7427019a7c28910c33c364436dd";
rev = "cb62c376bef6c7427019a7c28910c33c364436dd";
version = "2018-10-07";
sha256 = "0z4nr1d2ca8ibq34441j15pj22wh46brcbr00j5hcqvn8y2lh96l";
cs_tip = "e2c1cd46c06744beaceff42dd882de3a90f0a37c";
cs_ver = "e2c1cd46c06744beaceff42dd882de3a90f0a37c";
cs_sha256 = "1czzqj8zdjgh7h2ixi26ij3mm4bgm4xw2slin6fv73nic8yaw722";
};
#</generated>
14 changes: 7 additions & 7 deletions pkgs/development/tools/analysis/radare2/update.py
Original file line number Diff line number Diff line change
@@ -61,23 +61,23 @@ def git(dirname: str, *args: str) -> str:
def get_repo_info(dirname: str, rev: str) -> Dict[str, str]:
sha256 = prefetch_github("radare", "radare2", rev)

cs_tip = None
cs_ver = None
with open(Path(dirname).joinpath("shlr", "Makefile")) as makefile:
for l in makefile:
match = re.match("CS_TIP=(\S+)", l)
match = re.match("CS_VER=(\S+)", l)
if match:
cs_tip = match.group(1)
assert cs_tip is not None
cs_ver = match.group(1)
assert cs_ver is not None

cs_sha256 = prefetch_github("aquynh", "capstone", cs_tip)
cs_sha256 = prefetch_github("aquynh", "capstone", cs_ver)

return dict(
rev=rev,
sha256=sha256,
version_commit=git(dirname, "rev-list", "--all", "--count"),
gittap=git(dirname, "describe", "--tags", "--match", "[0-9]*"),
gittip=git(dirname, "rev-parse", "HEAD"),
cs_tip=cs_tip,
cs_ver=cs_ver,
cs_sha256=cs_sha256,
)

@@ -90,7 +90,7 @@ def write_package_expr(version: str, info: Dict[str, str]) -> str:
rev = "{info["rev"]}";
version = "{version}";
sha256 = "{info["sha256"]}";
cs_tip = "{info["cs_tip"]}";
cs_ver = "{info["cs_ver"]}";
cs_sha256 = "{info["cs_sha256"]}";
}}"""