diff --git a/pkgs/development/tools/tradcpp/aarch64.patch b/pkgs/development/tools/tradcpp/aarch64.patch new file mode 100644 index 000000000000..ef7ad9828ace --- /dev/null +++ b/pkgs/development/tools/tradcpp/aarch64.patch @@ -0,0 +1,12 @@ +diff a/config.h b/config.h +--- a/config.h ++++ b/config.h +@@ -124,6 +124,8 @@ + #define CONFIG_CPU "__ppc64__" + #elif defined(__ARM__) + #define CONFIG_CPU "__ARM__" ++#elif defined(__aarch64__) ++#define CONFIG_CPU "__aarch64__" + #else + /* let it go */ + #endif diff --git a/pkgs/development/tools/tradcpp/default.nix b/pkgs/development/tools/tradcpp/default.nix index 64a97ad00873..7f395174bb41 100644 --- a/pkgs/development/tools/tradcpp/default.nix +++ b/pkgs/development/tools/tradcpp/default.nix @@ -11,7 +11,10 @@ stdenv.mkDerivation { # tradcpp only comes with BSD-make Makefile; the patch adds configure support buildInputs = [ autoconf ]; preConfigure = "autoconf"; - patches = [ ./tradcpp-configure.patch ]; + patches = [ + ./tradcpp-configure.patch + ./aarch64.patch + ]; meta = with stdenv.lib; { description = "A traditional (K&R-style) C macro preprocessor";