holo-cli: 0.5.0-unstable-2025-09-22 -> 0.5.0-unstable-2026-01-03

This commit is contained in:
Sizhe Zhao
2026-06-01 14:52:20 +05:30
committed by phanirithvij
parent 5039b0e63d
commit 7cd4dcf4c5
2 changed files with 29 additions and 4 deletions
@@ -0,0 +1,12 @@
--- a/build.rs
+++ b/build.rs
@@ -62,6 +62,9 @@
cmake_config.define("ENABLE_BUILD_TESTS", "OFF");
cmake_config.define("CMAKE_BUILD_TYPE", "Release");
cmake_config.define("CMAKE_POSITION_INDEPENDENT_CODE", "ON");
+ // https://github.com/CESNET/libyang/blob/3d07c3a71534a580c3960907da17568eff7e5c64/CMakeModules/FindPCRE2.cmake#L9
+ cmake_config.define("PCRE2_INCLUDE_DIRS", "@PCRE2_INCLUDE_DIRS@");
+ cmake_config.define("PCRE2_LIBRARIES", "@PCRE2_LIBRARIES@");
let cmake_dst = cmake_config.build();
println!("cargo:root={}", env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search=native={}/lib", cmake_dst.display());
+17 -4
View File
@@ -2,6 +2,8 @@
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
replaceVars,
cmake,
pkg-config,
protobuf,
@@ -11,18 +13,29 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "holo-cli";
version = "0.5.0-unstable-2025-09-22";
version = "0.5.0-unstable-2026-01-03";
src = fetchFromGitHub {
owner = "holo-routing";
repo = "holo-cli";
rev = "7d99e7de5eb5226728ee57153c03362c90eb65b2";
hash = "sha256-O509LNSpak+MJPQheYLPtJQcNGPyZLMHMasKScoVnls=";
rev = "8a8f02fc56f30cca216e9a99029b736fe57b3d59";
hash = "sha256-pCupXT4fymydzOpdsMbimAcQZzVUNzfG3VRnrD3q7Xw=";
};
cargoHash = "sha256-bsoxWjOMzRRtFGEaaqK0/adhGpDcejCIY0Pzw1HjQ5U=";
cargoHash = "sha256-7/OtT2TdLhFVZeuQOg6xQJFnGJNz/G9mna8vIeh86/k=";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
pushd $cargoDepsCopy/libyang4-sys-*
patch -p1 < ${
replaceVars ./libyang4-sys.patch {
PCRE2_INCLUDE_DIRS = "${lib.getInclude pcre2}/include";
PCRE2_LIBRARIES = "${lib.getLib pcre2}/lib/libpcre2-8${stdenv.hostPlatform.extensions.sharedLibrary}";
}
}
popd
'';
# Use rust nightly features
env.RUSTC_BOOTSTRAP = 1;