diff --git a/pkgs/by-name/ar/arti/package.nix b/pkgs/by-name/ar/arti/package.nix index bc0636bfe4a5..87e80ed49cff 100644 --- a/pkgs/by-name/ar/arti/package.nix +++ b/pkgs/by-name/ar/arti/package.nix @@ -6,7 +6,8 @@ pkg-config, sqlite, openssl, - darwin, + versionCheckHook, + nix-update-script, }: rustPlatform.buildRustPackage rec { @@ -18,7 +19,7 @@ rustPlatform.buildRustPackage rec { group = "tpo"; owner = "core"; repo = "arti"; - rev = "arti-v${version}"; + tag = "arti-v${version}"; hash = "sha256-vypPQjTr3FsAz1AyS1J67MF35+HzMLNu5B9wkkEI30A="; }; @@ -26,15 +27,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = - [ sqlite ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk.frameworks; - [ - CoreServices - ] - ); + buildInputs = [ sqlite ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ]; cargoBuildFlags = [ "--package" @@ -51,11 +44,21 @@ rustPlatform.buildRustPackage rec { "--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/${src.rev}/CHANGELOG.md"; + changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/arti-v${version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 mit