[Backport release-26.05] reaction: 2.3.1 -> 2.4.0 (#525101)

This commit is contained in:
nixpkgs-ci[bot]
2026-05-28 06:36:21 +00:00
committed by GitHub
3 changed files with 53 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
From 94fafae651077be5e7a6dfd29fc06327a2f218ed Mon Sep 17 00:00:00 2001
From: ppom <reaction@ppom.me>
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<Result<String, String>>,
}
-fn to_rust_string(c_ptr: *const i8) -> Option<String> {
+fn to_rust_string(c_ptr: *const c_char) -> Option<String> {
if c_ptr.is_null() {
None
} else {
--
GitLab

View File

@@ -4,6 +4,7 @@
callPackage,
rustPlatform,
fetchFromGitLab,
fetchpatch,
versionCheckHook,
installShellFiles,
@@ -13,17 +14,22 @@
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "reaction";
version = "2.3.1";
version = "2.4.0";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "ppom";
repo = "reaction";
rev = "c0868d6fe1d155de183a89729b5f3f0ede7be4a2"; # TODO: return to tagged release
hash = "sha256-QlSXZ2Wk1OXzAY2x6YjtW+xNchY+Ghb/6AsJgjfgoFE=";
tag = "v${finalAttrs.version}";
hash = "sha256-Y6scgbcwhg56SQ1DefNtdja+n89Gc5bJUHKHKn2EYwQ=";
};
cargoHash = "sha256-FYd7I93MAAzD6y0VMd9kMU7DAgS6v5CKt2KjrskaKeo=";
patches = [
# nftables: fix compilation on aarch64-linux; remove in 2.4.1
./nftables-aarch64-linux-compat.patch
];
cargoHash = "sha256-NAcMpASvphAqjBjbAPWLG5qZbSgdaFC3GvU25exCS3g=";
nativeBuildInputs = [ installShellFiles ];
@@ -66,7 +72,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
passthru = {
inherit (callPackage ./plugins { }) mkReactionPlugin plugins;
updateScript = nix-update-script { };
tests = nixosTests.reaction;
tests = {
inherit (nixosTests) reaction;
}
// finalAttrs.passthru.plugins;
};
meta = {

View File

@@ -12,7 +12,12 @@
rustPlatform.buildRustPackage (
{
pname = name;
inherit (reaction) version src cargoHash;
inherit (reaction)
version
src
patches
cargoHash
;
buildAndTestSubdir = "plugins/${name}";
meta = {