From 1a7b7c7ddff42c2b8f871e23c684fa629b9c96ef Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 28 May 2026 01:03:03 +0200 Subject: [PATCH] reaction: port patch for aarch64-linux nftables compat This patch is merged upstream and can be reverted on the next update. Fetchpatch does not work against framagit.org, which is why I vendored the patch instead. --- .../nftables-aarch64-linux-compat.patch | 33 +++++++++++++++++++ pkgs/by-name/re/reaction/package.nix | 6 ++++ pkgs/by-name/re/reaction/plugins/default.nix | 7 +++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/re/reaction/nftables-aarch64-linux-compat.patch diff --git a/pkgs/by-name/re/reaction/nftables-aarch64-linux-compat.patch b/pkgs/by-name/re/reaction/nftables-aarch64-linux-compat.patch new file mode 100644 index 000000000000..bd25eb2122a4 --- /dev/null +++ b/pkgs/by-name/re/reaction/nftables-aarch64-linux-compat.patch @@ -0,0 +1,33 @@ +From 94fafae651077be5e7a6dfd29fc06327a2f218ed Mon Sep 17 00:00:00 2001 +From: ppom +Date: Thu, 28 May 2026 12:00:00 +0200 +Subject: [PATCH] nftables: fix compilation on aarch64-linux + +--- + plugins/reaction-plugin-nftables/src/nft.rs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/plugins/reaction-plugin-nftables/src/nft.rs b/plugins/reaction-plugin-nftables/src/nft.rs +index c234f77..2ac49df 100644 +--- a/plugins/reaction-plugin-nftables/src/nft.rs ++++ b/plugins/reaction-plugin-nftables/src/nft.rs +@@ -1,5 +1,6 @@ + use std::{ + ffi::{CStr, CString}, ++ os::raw::c_char, + thread, + }; + +@@ -71,7 +72,7 @@ struct NftCommand { + ret: oneshot::Sender>, + } + +-fn to_rust_string(c_ptr: *const i8) -> Option { ++fn to_rust_string(c_ptr: *const c_char) -> Option { + if c_ptr.is_null() { + None + } else { +-- +GitLab + + diff --git a/pkgs/by-name/re/reaction/package.nix b/pkgs/by-name/re/reaction/package.nix index 8dba09fad8c8..4515bdc356dc 100644 --- a/pkgs/by-name/re/reaction/package.nix +++ b/pkgs/by-name/re/reaction/package.nix @@ -4,6 +4,7 @@ callPackage, rustPlatform, fetchFromGitLab, + fetchpatch, versionCheckHook, installShellFiles, @@ -23,6 +24,11 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "sha256-Y6scgbcwhg56SQ1DefNtdja+n89Gc5bJUHKHKn2EYwQ="; }; + patches = [ + # nftables: fix compilation on aarch64-linux; remove in 2.4.1 + ./nftables-aarch64-linux-compat.patch + ]; + cargoHash = "sha256-NAcMpASvphAqjBjbAPWLG5qZbSgdaFC3GvU25exCS3g="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/re/reaction/plugins/default.nix b/pkgs/by-name/re/reaction/plugins/default.nix index c6a7fa124699..37be39a9bd2d 100644 --- a/pkgs/by-name/re/reaction/plugins/default.nix +++ b/pkgs/by-name/re/reaction/plugins/default.nix @@ -12,7 +12,12 @@ rustPlatform.buildRustPackage ( { pname = name; - inherit (reaction) version src cargoHash; + inherit (reaction) + version + src + patches + cargoHash + ; buildAndTestSubdir = "plugins/${name}"; meta = {