3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #288161 from marsam/update-sonic-server

sonic-server: 1.4.3 -> 1.4.8
This commit is contained in:
Nick Cao 2024-02-12 09:15:15 -05:00 committed by GitHub
commit f4e5f7b56f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,6 @@
, stdenv , stdenv
, rustPlatform , rustPlatform
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, nix-update-script , nix-update-script
, nixosTests , nixosTests
, testers , testers
@ -11,26 +10,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "sonic-server"; pname = "sonic-server";
version = "1.4.3"; version = "1.4.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "valeriansaliou"; owner = "valeriansaliou";
repo = "sonic"; repo = "sonic";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-V97K4KS46DXje4qKA11O9NEm0s13aTUnM+XW8lGc6fo="; hash = "sha256-kNuLcImowjoptNQI12xHD6Tv+LLYdwlpauqYviKw6Xk=";
}; };
cargoPatches = [ cargoHash = "sha256-9XSRb5RB82L72RzRWPJ45AJahkRnLwAL7lI2QFqbeko=";
# Update rocksdb to 0.21 to fix compilation issues against clang 16, see:
# https://github.com/valeriansaliou/sonic/issues/315
# https://github.com/valeriansaliou/sonic/pull/316
(fetchpatch {
url = "https://github.com/valeriansaliou/sonic/commit/81d5f1efec21ef8b911ed3303fcbe9ca6335f562.patch";
hash = "sha256-nOvHThTc2L3UQRVusUsD/OzbSkhSleZc6n0WyZducHM=";
})
];
cargoHash = "sha256-k+gPCkf8DCnuv/aLXcQwjmsDUu/eqSEqKXlUyj8bRq8=";
# Found argument '--test-threads' which wasn't expected, or isn't valid in this context # Found argument '--test-threads' which wasn't expected, or isn't valid in this context
doCheck = false; doCheck = false;
@ -39,6 +28,10 @@ rustPlatform.buildRustPackage rec {
rustPlatform.bindgenHook rustPlatform.bindgenHook
]; ];
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
env.NIX_LDFLAGS = lib.optionalString stdenv.cc.isClang "-l${stdenv.cc.libcxx.cxxabi.libName}";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation";
postPatch = '' postPatch = ''
substituteInPlace src/main.rs --replace "./config.cfg" "$out/etc/sonic/config.cfg" substituteInPlace src/main.rs --replace "./config.cfg" "$out/etc/sonic/config.cfg"
''; '';