arti: 2.3.0 -> 2.4.0, add patch for TROVE-2026-024 (#527653)

This commit is contained in:
Peder Bergebakken Sundt
2026-06-07 17:20:59 +00:00
committed by GitHub
+23 -21
View File
@@ -3,6 +3,7 @@
stdenv,
rustPlatform,
fetchFromGitLab,
fetchpatch,
pkg-config,
sqlite,
openssl,
@@ -13,7 +14,7 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "arti";
version = "2.3.0";
version = "2.4.0";
src = fetchFromGitLab {
domain = "gitlab.torproject.org";
@@ -21,9 +22,20 @@ rustPlatform.buildRustPackage (finalAttrs: {
owner = "core";
repo = "arti";
tag = "arti-v${finalAttrs.version}";
hash = "sha256-OEGKjYJ3p4g0ZfeK6k8IJJPjgSBMrSlKlxsCw1OwyaI=";
hash = "sha256-YLOdrHstmN2pLl75uclkbpN5h3iBs3xpraZ8XN6R/+Q=";
};
patches = [
# Fixes a panic that could allow malicious directory caches to crash
# clients.
# https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4062
(fetchpatch {
name = "TROVE-2026-024.patch";
url = "https://gitlab.torproject.org/tpo/core/arti/-/commit/f69be8c70561629e63004788f0aa4bf898025f93.patch";
hash = "sha256-P0sXTKOBW7ulqQZwmTVJfrpLksLyaonuDpxGF2keDqE=";
})
];
# Working around a bug in cargo that appears with cargo-auditable, see
# https://github.com/rust-secure-code/cargo-auditable/issues/124.
postPatch = ''
@@ -31,22 +43,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
--replace-fail '"tor-rpcbase"' '"dep:tor-rpcbase"'
'';
cargoHash = "sha256-OJgrIXL185W9rcQd7XZsgiqN4in74Oc2jDT1ZmcCC6E=";
buildAndTestSubdir = "crates/arti";
cargoHash = "sha256-7X3JJbt0/jxaMvBR3XQvguR7tqd96kiqX66G2byvPjM=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
buildInputs = [ sqlite ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
cargoBuildFlags = [
"--package"
"arti"
];
cargoTestFlags = [
"--package"
"arti"
];
# `full` includes all stable and non-conflicting feature flags. the primary
# downsides are increased binary size and memory usage for building, but
# those are acceptable for nixpkgs
@@ -69,9 +71,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
# sandbox. this does NOT affect downstream users of Arti.
env.ARTI_FS_DISABLE_PERMISSION_CHECKS = 1;
nativeInstallCheckInputs = [
versionCheckHook
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
@@ -84,10 +84,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
mainProgram = "arti";
homepage = "https://arti.torproject.org/";
changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/arti-v${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [
asl20
mit
];
license =
with lib.licenses;
OR [
asl20
mit
];
maintainers = with lib.maintainers; [
rapiteanu
whispersofthedawn