stract: 0-unstable-2024-09-14 -> 0-unstable-2024-12-11

In the previous version, a fixed-output derivation in the source hash
was causing another package to be built instead of stract.

This commit updates stract to the latest version, fixing the source and
the build of the actual package.
This commit is contained in:
eljamm
2025-01-24 11:04:50 +01:00
committed by Valentin Gagarin
parent 99317f1aa0
commit cc3d676b47
+39 -8
View File
@@ -1,32 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
rustPlatform,
pkg-config,
oniguruma,
openssl,
curl,
zstd,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage {
pname = "stract";
version = "0-unstable-2024-09-14";
version = "0-unstable-2024-12-11";
src = fetchFromGitHub {
owner = "StractOrg";
repo = "stract";
rev = "21d28ea86d9ff19ccb4c25b1bdde67e5ec302d79";
hash = "sha256-7Uvo5+saxwTMQjfDliyOYC6j6LbpMf/FiONfX38xepI=";
rev = "ecb495a66cf6c2f66d817803df38385a3001a38d";
hash = "sha256-UeIziIihDCjGoz2IdfROnO9/N82S4yextnF4Sbtrn24=";
fetchSubmodules = true;
};
cargoHash = "sha256-7Skbeeev/xBAhlcyOsYpDJB9LnZpT66D0Fu1I/jIBso=";
cargoHash = "sha256-UArPGrcEfFZBOZ4Tv7NraqPzdMtyJXVFsfUM32eSGic=";
useFetchCargoVendor = true;
cargoDepsName = "stract";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
oniguruma
openssl
curl
zstd
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
ZSTD_SYS_USE_PKG_CONFIG = true;
SWAGGER_UI_DOWNLOAD_URL =
let
# When updating:
# - Look for the version of `utoipa-swagger-ui` at:
# https://github.com/StractOrg/stract/blob/<STRACT-REV>/Cargo.toml#L183
# - Look at the corresponding version of `swagger-ui` at:
# https://github.com/juhaku/utoipa/blob/utoipa-swagger-ui-<UTOPIA-SWAGGER-UI-VERSION>/utoipa-swagger-ui/build.rs#L21-L22
swaggerUiVersion = "5.17.12";
swaggerUi = fetchurl {
url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${swaggerUiVersion}.zip";
hash = "sha256-HK4z/JI+1yq8BTBJveYXv9bpN/sXru7bn/8g5mf2B/I=";
};
in
"file://${swaggerUi}";
};
# swagger-ui will once more be copied in the target directory during the check phase
# Not deleting the existing unpacked archive leads to a `PermissionDenied` error
preCheck = ''
rm -rf target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/build/
'';
meta = {
description = "Open source web search engine hosted at stract.com targeted towards tinkerers and developers.";
homepage = "https://github.com/StractOrg/stract";