1{
2 mkDerivation,
3 lib,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 qtbase,
8 capstone,
9 bison,
10 flex,
11}:
12
13mkDerivation rec {
14 pname = "boomerang";
15 version = "0.5.2";
16 # NOTE: When bumping version beyond 0.5.2, you likely need to remove
17 # the cstdint.patch below. The patch does a fix that has already
18 # been done upstream but is not yet part of a release
19
20 src = fetchFromGitHub {
21 owner = "BoomerangDecompiler";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "0xncdp0z8ry4lkzmvbj5d7hlzikivghpwicgywlv47spgh8ny0ix";
25 };
26
27 # Boomerang usually compiles with -Werror but has not been updated for newer
28 # compilers. Disable -Werror for now. Consider trying to remove this when
29 # updating this derivation.
30 NIX_CFLAGS_COMPILE = "-Wno-error";
31
32 nativeBuildInputs = [
33 cmake
34 bison
35 flex
36 ];
37 buildInputs = [
38 qtbase
39 capstone
40 ];
41 patches = [
42 (fetchpatch {
43 name = "include-missing-cstdint.patch";
44 url = "https://github.com/BoomerangDecompiler/boomerang/commit/3342b0eac6b7617d9913226c06c1470820593e74.patch";
45 sha256 = "sha256-941IydcV3mqj7AWvXTM6GePW5VgawEcL0wrBCXqeWvc=";
46 })
47 ];
48
49 meta = with lib; {
50 homepage = "https://github.com/BoomerangDecompiler/boomerang";
51 license = licenses.bsd3;
52 description = "General, open source, retargetable decompiler";
53 maintainers = [ ];
54 };
55}