Skip to content

Commit e3efe0d

Browse files
committed
influxdb2: fix libflux compile with Rust 1.83
Signed-off-by: Florian Brandes <[email protected]>
1 parent 8812fb6 commit e3efe0d

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

pkgs/servers/nosql/influxdb2/default.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ let
5050
hash = "sha256-6LOTgbOCfETNTmshyXgtDZf9y4t/2iqRuVPkz9dYPHc=";
5151
})
5252
./fix-unsigned-char.patch
53+
# https://github.com/influxdata/flux/pull/5516
54+
./rust_lifetime.patch
5355
];
56+
# Don't fail on missing code documentation
57+
postPatch = ''
58+
substituteInPlace flux-core/src/lib.rs \
59+
--replace-fail "deny(warnings, missing_docs))]" "deny(warnings))]"
60+
'';
5461
sourceRoot = "${src.name}/libflux";
5562
cargoHash = "sha256-O+t4f4P5291BuyARH6Xf3LejMFEQEBv+qKtyjHRhclA=";
5663
nativeBuildInputs = [ rustPlatform.bindgenHook ];
@@ -74,7 +81,6 @@ let
7481
install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib
7582
'';
7683
};
77-
7884
in
7985
buildGoModule {
8086
pname = "influxdb";
@@ -132,7 +138,9 @@ buildGoModule {
132138
"-X main.version=${version}"
133139
];
134140

135-
passthru.tests = { inherit (nixosTests) influxdb2; };
141+
passthru.tests = {
142+
inherit (nixosTests) influxdb2;
143+
};
136144

137145
meta = with lib; {
138146
description = "Open-source distributed time series database";
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/flux-core/src/ast/walk/mod.rs b/flux-core/src/ast/walk/mod.rs
2+
index 90f70ba6f7..a6966827e8 100644
3+
--- a/flux-core/src/ast/walk/mod.rs
4+
+++ b/flux-core/src/ast/walk/mod.rs
5+
@@ -180,7 +180,7 @@ impl<'a> Node<'a> {
6+
7+
impl<'a> Node<'a> {
8+
#[allow(missing_docs)]
9+
- pub fn from_expr(expr: &'a Expression) -> Node {
10+
+ pub fn from_expr(expr: &'a Expression) -> Node<'a> {
11+
match expr {
12+
Expression::Identifier(e) => Node::Identifier(e),
13+
Expression::Array(e) => Node::ArrayExpr(e),
14+
diff --git a/flux-core/src/parser/mod.rs b/flux-core/src/parser/mod.rs
15+
index ac7d4b9a72..561c3a0ff6 100644
16+
--- a/flux-core/src/parser/mod.rs
17+
+++ b/flux-core/src/parser/mod.rs
18+
@@ -41,7 +41,7 @@ pub struct Parser<'input> {
19+
20+
impl<'input> Parser<'input> {
21+
/// Instantiates a new parser with the given string as input.
22+
- pub fn new(src: &'input str) -> Parser {
23+
+ pub fn new(src: &'input str) -> Parser<'input> {
24+
let s = Scanner::new(src);
25+
Parser {
26+
s,

0 commit comments

Comments
 (0)