Unverified Commit 7d912ec6 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #268869 from a-n-n-a-l-e-e/influxdb-fix

influxdb: 1.10.0 -> 1.10.5; fix build
parents 9039a920 293382ef
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub, stdenv, pkg-config, rustPlatform, libiconv, fetchpatch, nixosTests }:

let
  libflux_version = "0.170.1";
  libflux_version = "0.188.0";

  # This is copied from influxdb2 with flux version matching the needed by thi
  flux = rustPlatform.buildRustPackage rec {
@@ -11,20 +11,21 @@ let
      owner = "influxdata";
      repo = "flux";
      rev = "v${libflux_version}";
      sha256 = "sha256-P3SpleOVbL+nGWdscwjj9yWqRdck/9JsAwuJtGOO7N8=";
      hash = "sha256-4Z6Vfdyh0zimQlE47plSIjTWBYiju0Qu09M+MgMQOL4=";
    };
    patches = [
      # https://github.com/influxdata/flux/pull/5273
      # fix compile error with Rust 1.64
      # https://github.com/influxdata/flux/pull/5440
      # fix compile error with Rust 1.72.0
      (fetchpatch {
        url = "https://github.com/influxdata/flux/commit/20ca62138a0669f2760dd469ca41fc333e04b8f2.patch";
        url = "https://github.com/influxdata/flux/commit/8d1d6c8b485eb7e15b6a5f57762d1f766b17defd.patch";
        stripLen = 2;
        extraPrefix = "";
        sha256 = "sha256-Fb4CuH9ZvrPha249dmLLI8MqSNQRKqKPxPbw2pjqwfY=";
        hash = "sha256-BDBmGKsC2RWMyObDm7dPwFq/3cVIdBKF8ZVaCL+uftw=";
        includes = [ "flux/src/lib.rs" ];
      })
    ];
    sourceRoot = "${src.name}/libflux";
    cargoSha256 = "sha256-kYiZ5ZRiFHRf1RQeeUGjIhnEkTvhNSZ0t4tidpRIDyk=";
    cargoHash = "sha256-925U9weBOvMuyApsTOjtQxik3nqT2UpK+DPM64opc7c=";
    nativeBuildInputs = [ rustPlatform.bindgenHook ];
    buildInputs = lib.optional stdenv.isDarwin libiconv;
    pkgcfg = ''
@@ -47,16 +48,16 @@ let
in
buildGoModule rec {
  pname = "influxdb";
  version = "1.10.0";
  version = "1.10.5";

  src = fetchFromGitHub {
    owner = "influxdata";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-BMHR9EdYC+8oA0he7emzBRmNnHn15nO/5NqsLcr+R0k=";
    hash = "sha256-FvKGNqy27q6/X2DI/joJXfGVrax6hQcNcx5nJDeSLm0=";
  };

  vendorHash = "sha256-AY04cmfg7vbrWR4+LBuCFYqBgQJBXlPpO+2oj0qqjM4=";
  vendorHash = "sha256-1jeZBVmNOxF5NPlTKg+YRw6VqIIZDcT3snnoMLX3y4g=";

  nativeBuildInputs = [ pkg-config ];