@@ -1,9 +1,21 @@
1−{lib, stdenv, fetchFromGitHub
1+{ lib
2+, stdenv
3+, fetchFromGitHub
24, buildPackages
35, pkg-config
4−, libusb-compat-0_1, readline, libewf, perl, zlib, openssl
5−, libuv, file, libzip, xxHash
6−, gtk2 ? null, vte ? null, gtkdialog ? null
6+, libusb-compat-0_1
7+, readline
8+, libewf
9+, perl
10+, zlib
11+, openssl
12+, libuv
13+, file
14+, libzip
15+, xxHash
16+, gtk2 ? null
17+, vte ? null
18+, gtkdialog ? null
719, python3 ? null
820, ruby ? null
921, lua ? null
@@ -21,108 +33,84 @@ assert pythonBindings -> python3 != null;
2133let
2234 inherit (lib) optional;
2335
24− generic = {
25− version_commit, # unused
26− gittap,
27− gittip,
28− rev,
29− version,
30− sha256,
31− cs_ver,
32− cs_sha256
33− }:
34− stdenv.mkDerivation {
35− pname = "radare2";
36− inherit version;
36+ #<generated>
37+ # DO NOT EDIT! Automatically generated by ./update.py
38+ gittap = "5.1.1";
39+ gittip = "a86f8077fc148abd6443384362a3717cd4310e64";
40+ rev = "5.1.1";
41+ version = "5.1.1";
42+ sha256 = "0hv9x31iabasj12g8f04incr1rbcdkxi3xnqn3ggp8gl4h6pf2f3";
43+ cs_ver = "4.0.2";
44+ cs_sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
45+ #</generated>
46+in
47+stdenv.mkDerivation {
48+ pname = "radare2";
49+ inherit version;
3750
38− src = fetchFromGitHub {
39− owner = "radare";
40− repo = "radare2";
41− inherit rev sha256;
42− };
51+ src = fetchFromGitHub {
52+ owner = "radare";
53+ repo = "radare2";
54+ inherit rev sha256;
55+ };
4356
44− postPatch = let
45− capstone = fetchFromGitHub {
46− owner = "aquynh";
47− repo = "capstone";
48− # version from $sourceRoot/shlr/Makefile
49− rev = cs_ver;
50− sha256 = cs_sha256;
51− };
52− in ''
53− mkdir -p build/shlr
54− cp -r ${capstone} capstone-${cs_ver}
55− chmod -R +w capstone-${cs_ver}
56− # radare 3.3 compat for radare2-cutter
57− (cd shlr && ln -s ../capstone-${cs_ver} capstone)
58− tar -czvf shlr/capstone-${cs_ver}.tar.gz capstone-${cs_ver}
59− '';
57+ postPatch =
58+ let
59+ capstone = fetchFromGitHub {
60+ owner = "aquynh";
61+ repo = "capstone";
62+ # version from $sourceRoot/shlr/Makefile
63+ rev = cs_ver;
64+ sha256 = cs_sha256;
65+ };
66+ in
67+ ''
68+ mkdir -p build/shlr
69+ cp -r ${capstone} capstone-${cs_ver}
70+ chmod -R +w capstone-${cs_ver}
71+ tar -czvf shlr/capstone-${cs_ver}.tar.gz capstone-${cs_ver}
72+ '';
6073
61− postInstall = ''
62− install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
63− '';
74+ postInstall = ''
75+ install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
76+ '';
6477
65− WITHOUT_PULL="1";
66− makeFlags = [
67− "GITTAP=${gittap}"
68− "GITTIP=${gittip}"
69− "RANLIB=${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.bintools.targetPrefix}ranlib"
70− ];
71− configureFlags = [
72− "--with-sysmagic"
73− "--with-syszip"
74− "--with-sysxxhash"
75− "--with-openssl"
76− ];
78+ WITHOUT_PULL = "1";
79+ makeFlags = [
80+ "GITTAP=${gittap}"
81+ "GITTIP=${gittip}"
82+ "RANLIB=${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.bintools.targetPrefix}ranlib"
83+ ];
84+ configureFlags = [
85+ "--with-sysmagic"
86+ "--with-syszip"
87+ "--with-sysxxhash"
88+ "--with-openssl"
89+ ];
7790
78− enableParallelBuilding = true;
79− depsBuildBuild = [ buildPackages.stdenv.cc ];
91+ enableParallelBuilding = true;
92+ depsBuildBuild = [ buildPackages.stdenv.cc ];
8093
81− nativeBuildInputs = [ pkg-config ];
82− buildInputs = [ file readline libusb-compat-0_1 libewf perl zlib openssl libuv ]
83− ++ optional useX11 [ gtkdialog vte gtk2 ]
84− ++ optional rubyBindings [ ruby ]
85− ++ optional pythonBindings [ python3 ]
86− ++ optional luaBindings [ lua ];
94+ nativeBuildInputs = [ pkg-config ];
95+ buildInputs = [ file readline libusb-compat-0_1 libewf perl zlib openssl libuv ]
96+ ++ optional useX11 [ gtkdialog vte gtk2 ]
97+ ++ optional rubyBindings [ ruby ]
98+ ++ optional pythonBindings [ python3 ]
99+ ++ optional luaBindings [ lua ];
87100
88− propagatedBuildInputs = [
89− # radare2 exposes r_lib which depends on these libraries
90− file # for its list of magic numbers (`libmagic`)
91− libzip
92− xxHash
93− ];
101+ propagatedBuildInputs = [
102+ # radare2 exposes r_lib which depends on these libraries
103+ file # for its list of magic numbers (`libmagic`)
104+ libzip
105+ xxHash
106+ ];
94107
95− meta = {
96− description = "unix-like reverse engineering framework and commandline tools";
97− homepage = "http://radare.org/";
98− license = lib.licenses.gpl2Plus;
99− maintainers = with lib.maintainers; [ raskin makefu mic92 ];
100− platforms = with lib.platforms; linux;
101− inherit version;
102− };
103− };
104−in {
105− #<generated>
106− # DO NOT EDIT! Automatically generated by ./update.py
107− radare2 = generic {
108− version_commit = "25741";
109− gittap = "5.1.1";
110− gittip = "a86f8077fc148abd6443384362a3717cd4310e64";
111− rev = "5.1.1";
112− version = "5.1.1";
113− sha256 = "0hv9x31iabasj12g8f04incr1rbcdkxi3xnqn3ggp8gl4h6pf2f3";
114− cs_ver = "4.0.2";
115− cs_sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
116− };
117− r2-for-cutter = generic {
118− version_commit = "24959";
119− gittap = "4.5.1";
120− gittip = "293cf5ae65ba4e28828095dcae212955593ba255";
121− rev = "4.5.1";
122− version = "4.5.1";
123− sha256 = "0qigy1px0jy74c5ig73dc2fqjcy6vcy76i25dx9r3as6zfpkkaxj";
124− cs_ver = "4.0.2";
125− cs_sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
108+ meta = {
109+ description = "unix-like reverse engineering framework and commandline tools";
110+ homepage = "http://radare.org/";
111+ license = lib.licenses.gpl2Plus;
112+ maintainers = with lib.maintainers; [ raskin makefu mic92 ];
113+ platforms = with lib.platforms; linux;
114+ inherit version;
126115 };
127− #</generated>
128116}