69 lines
1.4 KiB
Nix
69 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitLab,
|
|
pkg-config,
|
|
sqlite,
|
|
openssl,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "arti";
|
|
version = "1.3.2";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.torproject.org";
|
|
group = "tpo";
|
|
owner = "core";
|
|
repo = "arti";
|
|
tag = "arti-v${version}";
|
|
hash = "sha256-vypPQjTr3FsAz1AyS1J67MF35+HzMLNu5B9wkkEI30A=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-brC8ZTB/+LAtNiG9/MGhPzzFcnaEBV/zU9lexZ56N/I=";
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
|
|
|
buildInputs = [ sqlite ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
|
|
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"arti"
|
|
];
|
|
|
|
cargoTestFlags = [
|
|
"--package"
|
|
"arti"
|
|
];
|
|
|
|
checkFlags = [
|
|
# problematic test that hangs the build
|
|
"--skip=reload_cfg::test::watch_multiple"
|
|
];
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
versionCheckProgramArg = [ "--version" ];
|
|
doInstallCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Implementation of Tor in Rust";
|
|
mainProgram = "arti";
|
|
homepage = "https://arti.torproject.org/";
|
|
changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/arti-v${version}/CHANGELOG.md";
|
|
license = with lib.licenses; [
|
|
asl20
|
|
mit
|
|
];
|
|
maintainers = with lib.maintainers; [ rapiteanu ];
|
|
};
|
|
}
|