Skip to content

Commit dc57ebe

Browse files
google-labs-jules[bot]hsjobeki
authored andcommitted
fix(pesto): fix build by using system oniguruma
`onig_sys` was failing to build with recent compiler updates due to strict C checks. This change switches to using the system `oniguruma` library provided by `nixpkgs` instead of the bundled one, which resolves the build issue. We also add `pkg-config` to native build inputs to ensure the library is found.
1 parent 12c7696 commit dc57ebe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pesto/flake-module.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
commonArgs = {
88
inherit src;
99
strictDeps = true;
10-
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
10+
buildInputs = [ pkgs.oniguruma ];
11+
nativeBuildInputs = [ pkgs.pkg-config ];
12+
RUSTONIG_SYSTEM_LIBONIG = "1";
1113
};
1214

13-
pesto = craneLib.buildPackage commonArgs;
15+
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
16+
17+
pesto = craneLib.buildPackage (commonArgs // {
18+
inherit cargoArtifacts;
19+
});
1420

1521
data-json = pkgs.stdenv.mkDerivation {
1622
name = "pesto-data";
@@ -23,10 +29,12 @@
2329
checks = {
2430
inherit pesto;
2531
pesto-clippy = craneLib.cargoClippy (commonArgs // {
32+
inherit cargoArtifacts;
2633
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
2734
});
2835
pesto-fmt = craneLib.cargoFmt { inherit src; };
2936
pesto-nextest = craneLib.cargoNextest (commonArgs // {
37+
inherit cargoArtifacts;
3038
partitions = 1;
3139
partitionType = "count";
3240
});

0 commit comments

Comments
 (0)