depot/third_party/nixpkgs/pkgs/tools/security/arti/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, rustPlatform
, fetchFromGitLab
, pkg-config
, sqlite
, openssl
, CoreServices
}:
rustPlatform.buildRustPackage rec {
pname = "arti";
version = "1.2.1";
src = fetchFromGitLab {
domain = "gitlab.torproject.org";
group = "tpo";
owner = "core";
repo = "arti";
rev = "arti-v${version}";
hash = "sha256-Ps1AIvL6hOnSYtvi4wbgJQiuv2eb1XIEPul/WypM9bo=";
};
cargoHash = "sha256-2u/8nn/9tz+hlNDz6I/g2cMPWXZSMVNV7FPsKFP8jqo=";
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
buildInputs = [ sqlite ]
++ lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ CoreServices ];
cargoBuildFlags = [ "--package" "arti" ];
cargoTestFlags = [ "--package" "arti" ];
meta = with lib; {
description = "An implementation of Tor in Rust";
mainProgram = "arti";
homepage = "https://arti.torproject.org/";
changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ marsam ];
};
}