Skip to content

Commit 26ae359

Browse files
committed
feat: let frr use libyang v3.x.y
We need to link to xxHash to make it comile now (libyang gained xxhash as a dependency). Signed-off-by: Daniel Noland <[email protected]>
1 parent 3704e2e commit 26ae359

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,16 @@ rec {
188188
}
189189
)
190190
);
191+
fancy.xxHash = optimizedBuild super.xxHash;
191192
libyang-dynamic =
192-
((optimizedBuild super.libyang).override { pcre2 = self.fancy.pcre2; }).overrideAttrs
193+
((optimizedBuild super.libyang).override { pcre2 = self.fancy.pcre2; xxHash = self.fancy.xxHash; }).overrideAttrs
193194
(orig: {
194195
cmakeFlags = (orig.cmakeFlags or [ ]) ++ [
195196
"-DBUILD_SHARED_LIBS=ON"
196197
];
197198
});
198199
libyang-static =
199-
((optimizedBuild super.libyang).override { pcre2 = self.fancy.pcre2; }).overrideAttrs
200+
((optimizedBuild super.libyang).override { pcre2 = self.fancy.pcre2; xxHash = self.fancy.xxHash; }).overrideAttrs
200201
(orig: {
201202
cmakeFlags = (orig.cmakeFlags or [ ]) ++ [
202203
"-DBUILD_SHARED_LIBS=OFF"
@@ -295,6 +296,7 @@ rec {
295296
LDFLAGS =
296297
(orig.LDFLAGS or "")
297298
+ " -L${self.libyang-static}/lib -lyang "
299+
+ " -L${fancy.xxHash}/lib -lxxhash "
298300
+ " -L${fancy.libxcrypt}/lib -lcrypt "
299301
+ " -L${protobufc}/lib -lprotobuf-c "
300302
+ " -L${fancy.pcre2}/lib -lpcre2-8 ";

nix/frr/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ stdenv.mkDerivation
8181
inherit rev hash;
8282
};
8383

84+
# Without the std explicitly set, we may run into abseil-cpp
85+
# compilation errors.
86+
CXXFLAGS = "-std=gnu++23";
87+
8488
nativeBuildInputs = [
8589
autoreconfHook
8690
bison

0 commit comments

Comments
 (0)