Unverified Commit a40b1a0c authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #239995 from gaelreyrol/sozu-update-0.15.0

sozū: 0.13.6 -> 0.15.0
parents dd05cbb4 eb8ac66e
Loading
Loading
Loading
Loading
+2486 −0

File added.

Preview size limit exceeded, changes collapsed.

+35 −5
Original line number Diff line number Diff line
{ lib, stdenv, rustPlatform, fetchFromGitHub, darwin }:
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, darwin
, protobuf
, nix-update-script
, testers
, sozu
}:

rustPlatform.buildRustPackage rec {
  pname = "sozu";
  version = "0.13.6";
  version = "0.15.0";

  src = fetchFromGitHub {
    owner = "sozu-proxy";
    repo = pname;
    rev = version;
    sha256 = "sha256-C2wIkneOh6t8gjoHRYMRorAKEVvM3R+NRZbG9hhCE5A=";
    hash = "sha256-lbBwmi8MrcWr6AXzl9upnXw8ZEWyDGEWr+txE4dujWs=";
  };

  cargoSha256 = "sha256-Ej2/X1aQ8uRdZKpVRT4+AzhDWMv/sT8GrCitUmkrHmI=";
  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  nativeBuildInputs = [ protobuf ];

  buildInputs =
    lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;

  postPatch = ''
    # update Cargo.lock to fix build
    ln -sf ${./Cargo.lock} Cargo.lock
  '';

  doCheck = false;

  passthru = {
    updateScript = nix-update-script { };
    tests.version = testers.testVersion {
      package = sozu;
      command = "sozu --version";
      version = "${version}";
    };
  };

  meta = with lib; {
    description =
      "Open Source HTTP Reverse Proxy built in Rust for Immutable Infrastructures";
    homepage = "https://www.sozu.io";
    license = licenses.agpl3;
    maintainers = with maintainers; [ Br1ght0ne ];
    maintainers = with maintainers; [ Br1ght0ne gaelreyrol ];
    platforms = [ "x86_64-linux" ];
  };
}