radare2: 3.2.1 -> 3.3.0

This commit is contained in:
Jörg Thalheim 2019-02-19 14:26:11 +00:00
parent 2935a67eb9
commit c41ed752dc
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4
2 changed files with 29 additions and 23 deletions

View file

@ -29,7 +29,7 @@ let
rev, rev,
version, version,
sha256, sha256,
cs_tip, cs_ver,
cs_sha256 cs_sha256
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -46,15 +46,21 @@ let
owner = "aquynh"; owner = "aquynh";
repo = "capstone"; repo = "capstone";
# version from $sourceRoot/shlr/Makefile # version from $sourceRoot/shlr/Makefile
rev = cs_tip; rev = cs_ver;
sha256 = cs_sha256; sha256 = cs_sha256;
}; };
in '' 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 mkdir -p build/shlr
cp -r ${capstone} shlr/capstone cp -r ${capstone} capstone-${cs_ver}
chmod -R +w shlr/capstone 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 = '' postInstall = ''
@ -104,23 +110,23 @@ in {
#<generated> #<generated>
# DO NOT EDIT! Automatically generated by ./update.py # DO NOT EDIT! Automatically generated by ./update.py
radare2 = generic { radare2 = generic {
version_commit = "20591"; version_commit = "20942";
gittap = "3.2.1"; gittap = "3.3.0";
gittip = "25913f4745cb3b635d52f1aafc4d8ff2aad3988a"; gittip = "5a9127d2599c8ff61d8544be7d4c9384402e94a3";
rev = "3.2.1"; rev = "3.3.0";
version = "3.2.1"; version = "3.3.0";
sha256 = "1c4zj96386sc9lvfcsdh9lhyh0rvv4zzfr6218gvjkg9fy6cc91y"; sha256 = "11ap3icr8w0y49lq5dxch2h589qdmwf3qv9lsdyfsz4l0mjm49ri";
cs_tip = "0ff8220adef16a942697afd245afc5ab0f70cbf8"; cs_ver = "4.0.1";
cs_sha256 = "1ak8ysgivq28d23r77881p0z5v65jhpap5plm10p9j3y2x00n3zn"; cs_sha256 = "0ijwxxk71nr9z91yxw20zfj4bbsbrgvixps5c7cpj163xlzlwba6";
}; };
r2-for-cutter = generic { r2-for-cutter = generic {
version_commit = "20591"; version_commit = "20942";
gittap = "2.9.0-310-gcb62c376b"; gittap = "2.9.0-310-gcb62c376b";
gittip = "cb62c376bef6c7427019a7c28910c33c364436dd"; gittip = "cb62c376bef6c7427019a7c28910c33c364436dd";
rev = "cb62c376bef6c7427019a7c28910c33c364436dd"; rev = "cb62c376bef6c7427019a7c28910c33c364436dd";
version = "2018-10-07"; version = "2018-10-07";
sha256 = "0z4nr1d2ca8ibq34441j15pj22wh46brcbr00j5hcqvn8y2lh96l"; sha256 = "0z4nr1d2ca8ibq34441j15pj22wh46brcbr00j5hcqvn8y2lh96l";
cs_tip = "e2c1cd46c06744beaceff42dd882de3a90f0a37c"; cs_ver = "e2c1cd46c06744beaceff42dd882de3a90f0a37c";
cs_sha256 = "1czzqj8zdjgh7h2ixi26ij3mm4bgm4xw2slin6fv73nic8yaw722"; cs_sha256 = "1czzqj8zdjgh7h2ixi26ij3mm4bgm4xw2slin6fv73nic8yaw722";
}; };
#</generated> #</generated>

View file

@ -61,15 +61,15 @@ def git(dirname: str, *args: str) -> str:
def get_repo_info(dirname: str, rev: str) -> Dict[str, str]: def get_repo_info(dirname: str, rev: str) -> Dict[str, str]:
sha256 = prefetch_github("radare", "radare2", rev) sha256 = prefetch_github("radare", "radare2", rev)
cs_tip = None cs_ver = None
with open(Path(dirname).joinpath("shlr", "Makefile")) as makefile: with open(Path(dirname).joinpath("shlr", "Makefile")) as makefile:
for l in makefile: for l in makefile:
match = re.match("CS_TIP=(\S+)", l) match = re.match("CS_VER=(\S+)", l)
if match: if match:
cs_tip = match.group(1) cs_ver = match.group(1)
assert cs_tip is not None assert cs_ver is not None
cs_sha256 = prefetch_github("aquynh", "capstone", cs_tip) cs_sha256 = prefetch_github("aquynh", "capstone", cs_ver)
return dict( return dict(
rev=rev, rev=rev,
@ -77,7 +77,7 @@ def get_repo_info(dirname: str, rev: str) -> Dict[str, str]:
version_commit=git(dirname, "rev-list", "--all", "--count"), version_commit=git(dirname, "rev-list", "--all", "--count"),
gittap=git(dirname, "describe", "--tags", "--match", "[0-9]*"), gittap=git(dirname, "describe", "--tags", "--match", "[0-9]*"),
gittip=git(dirname, "rev-parse", "HEAD"), gittip=git(dirname, "rev-parse", "HEAD"),
cs_tip=cs_tip, cs_ver=cs_ver,
cs_sha256=cs_sha256, cs_sha256=cs_sha256,
) )
@ -90,7 +90,7 @@ def write_package_expr(version: str, info: Dict[str, str]) -> str:
rev = "{info["rev"]}"; rev = "{info["rev"]}";
version = "{version}"; version = "{version}";
sha256 = "{info["sha256"]}"; sha256 = "{info["sha256"]}";
cs_tip = "{info["cs_tip"]}"; cs_ver = "{info["cs_ver"]}";
cs_sha256 = "{info["cs_sha256"]}"; cs_sha256 = "{info["cs_sha256"]}";
}}""" }}"""