sozu: fix build on x86_64-darwin

This commit is contained in:
Angel J 2026-05-05 19:22:46 -07:00
commit d90a02b5c3
No known key found for this signature in database
GPG key ID: 4CE6C8BA718B9657

View file

@ -3,6 +3,7 @@
stdenv,
rustPlatform,
fetchFromGitHub,
fetchpatch2,
protobuf,
nix-update-script,
testers,
@ -16,12 +17,20 @@ rustPlatform.buildRustPackage (finalAttrs: {
src = fetchFromGitHub {
owner = "sozu-proxy";
repo = "sozu";
rev = finalAttrs.version;
tag = finalAttrs.version;
hash = "sha256-a/Pna2l1gRv4kxIyGUuUHlN+lIQemGjZXwM65Ccc24Y=";
};
cargoHash = "sha256-9ZmlUUdtVAvri9v+EJb6vRQ7Yc3FjRwU5I5Xe8je9/c=";
patches = [
# Fix build with Rust 1.82+ on Darwin: extern blocks must be unsafe.
(fetchpatch2 {
url = "https://github.com/sozu-proxy/sozu/commit/ec83fad967f2606d5d668679e138631a70ec7de5.patch?full_index=1";
hash = "sha256-chXehutcI4+gDwY1uUPgE4t0fgGOsEHPP8gMsnXNB10=";
})
];
nativeBuildInputs = [ protobuf ];
doCheck = false;
@ -38,7 +47,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
meta = {
description = "Open Source HTTP Reverse Proxy built in Rust for Immutable Infrastructures";
homepage = "https://www.sozu.io";
changelog = "https://github.com/sozu-proxy/sozu/releases/tag/${finalAttrs.version}";
changelog = "https://github.com/sozu-proxy/sozu/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.agpl3Only;
maintainers = [ ];
mainProgram = "sozu";