From 060fb3b67260f0c87a7f8a64872cdb7e4250fc04 Mon Sep 17 00:00:00 2001 From: polygon Date: Fri, 14 May 2021 00:18:29 +0200 Subject: [PATCH 1/2] boomerang: Add cstdint include needed with GCC10 Include cstdint as needed with GCC10. This follows an upstream patch for the same issue that is not yet part of a release. https://github.com/BoomerangDecompiler/boomerang/commit/3342b0eac6b7617d9913226c06c1470820593e74 --- pkgs/development/tools/boomerang/cstdint.patch | 12 ++++++++++++ pkgs/development/tools/boomerang/default.nix | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/development/tools/boomerang/cstdint.patch diff --git a/pkgs/development/tools/boomerang/cstdint.patch b/pkgs/development/tools/boomerang/cstdint.patch new file mode 100644 index 00000000000..69e35261b4c --- /dev/null +++ b/pkgs/development/tools/boomerang/cstdint.patch @@ -0,0 +1,12 @@ +diff --git a/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h b/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h +index 011b9c9..40c343a 100644 +--- a/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h ++++ b/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h +@@ -10,6 +10,7 @@ + #pragma once + + ++#include + #include + #include + diff --git a/pkgs/development/tools/boomerang/default.nix b/pkgs/development/tools/boomerang/default.nix index 4ac9159520f..eb5ae33f919 100644 --- a/pkgs/development/tools/boomerang/default.nix +++ b/pkgs/development/tools/boomerang/default.nix @@ -3,6 +3,9 @@ mkDerivation rec { pname = "boomerang"; version = "0.5.2"; + # NOTE: When bumping version beyond 0.5.2, you likely need to remove + # the cstdint.patch below. The patch does a fix that has already + # been done upstream but is not yet part of a release src = fetchFromGitHub { owner = "BoomerangDecompiler"; @@ -13,6 +16,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake bison flex ]; buildInputs = [ qtbase capstone ]; + patches = [ ./cstdint.patch ]; meta = with lib; { homepage = "https://github.com/BoomerangDecompiler/boomerang"; From 92ac079673e7ec0749062b4c93c64b56d64828ea Mon Sep 17 00:00:00 2001 From: polygon Date: Fri, 14 May 2021 15:04:44 +0200 Subject: [PATCH 2/2] boomerang: Replace inline patch with fetchpatch --- pkgs/development/tools/boomerang/cstdint.patch | 12 ------------ pkgs/development/tools/boomerang/default.nix | 10 ++++++++-- 2 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 pkgs/development/tools/boomerang/cstdint.patch diff --git a/pkgs/development/tools/boomerang/cstdint.patch b/pkgs/development/tools/boomerang/cstdint.patch deleted file mode 100644 index 69e35261b4c..00000000000 --- a/pkgs/development/tools/boomerang/cstdint.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h b/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h -index 011b9c9..40c343a 100644 ---- a/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h -+++ b/src/boomerang-plugins/codegen/c/ControlFlowAnalyzer.h -@@ -10,6 +10,7 @@ - #pragma once - - -+#include - #include - #include - diff --git a/pkgs/development/tools/boomerang/default.nix b/pkgs/development/tools/boomerang/default.nix index eb5ae33f919..b37ab9a2d3f 100644 --- a/pkgs/development/tools/boomerang/default.nix +++ b/pkgs/development/tools/boomerang/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, cmake, qtbase, capstone, bison, flex }: +{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, qtbase, capstone, bison, flex }: mkDerivation rec { pname = "boomerang"; @@ -16,7 +16,13 @@ mkDerivation rec { nativeBuildInputs = [ cmake bison flex ]; buildInputs = [ qtbase capstone ]; - patches = [ ./cstdint.patch ]; + patches = [ + (fetchpatch { + name = "include-missing-cstdint.patch"; + url = "https://github.com/BoomerangDecompiler/boomerang/commit/3342b0eac6b7617d9913226c06c1470820593e74.patch"; + sha256 = "sha256-941IydcV3mqj7AWvXTM6GePW5VgawEcL0wrBCXqeWvc="; + }) + ]; meta = with lib; { homepage = "https://github.com/BoomerangDecompiler/boomerang";