rtz: 0.5.3 -> 0.7.0

This commit is contained in:
Samuel Tardieu
2024-08-31 11:41:41 +02:00
committed by Alyssa Ross
parent 91f90f3858
commit 4478f423e3
2 changed files with 1495 additions and 863 deletions
+1479 -859
View File
File diff suppressed because it is too large Load Diff
+16 -4
View File
@@ -1,6 +1,7 @@
{ 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; {