Commit 4478f423 authored by Samuel Tardieu's avatar Samuel Tardieu Committed by Alyssa Ross
Browse files

rtz: 0.5.3 -> 0.7.0

parent 91f90f38
Loading
Loading
Loading
Loading
+1465 −845

File changed.

Preview size limit exceeded, changes collapsed.

+16 −4
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, fetchurl
, pkg-config
, bzip2
, openssl
@@ -11,13 +12,13 @@

rustPlatform.buildRustPackage rec {
  pname = "rtz";
  version = "0.5.3";
  version = "0.7.0";

  src = fetchFromGitHub {
    owner = "twitchax";
    repo = "rtz";
    rev = "v${version}";
    hash = "sha256-cc5yGZ4zHB9V//ywvKv9qgKGDpKotzkJKbfwv1rK2tM=";
    hash = "sha256-Wfb3FEZHjWYUtRI4Qn3QNunIXuzW1AIEZkIvtVrjBPs=";
  };

  cargoLock = {
@@ -27,6 +28,11 @@ rustPlatform.buildRustPackage rec {
    };
  };

  swagger-ui = fetchurl {
    url = "https://github.com/juhaku/utoipa/raw/master/utoipa-swagger-ui-vendored/res/v5.17.12.zip";
    hash = "sha256-HK4z/JI+1yq8BTBJveYXv9bpN/sXru7bn/8g5mf2B/I=";
  };

  nativeBuildInputs = [
    pkg-config
  ];
@@ -41,9 +47,15 @@ rustPlatform.buildRustPackage rec {

  buildFeatures = [ "web" ];

  # ${swagger-ui} is read-only and the copy made by the build script
  # is as well. Remove it so that checks can copy it again.
  preCheck = ''
    find target -name $(basename ${swagger-ui}) -delete
  '';

  env = {
    # requires nightly features
    RUSTC_BOOTSTRAP = true;
    # use local data file instead of requiring network access
    SWAGGER_UI_DOWNLOAD_URL = "file://${swagger-ui}";
  };

  meta = with lib; {