{ lib , cmake , darwin , fetchFromGitHub , openssl , pkg-config , rustPlatform , stdenv , nix-update-script }: rustPlatform.buildRustPackage rec { pname = "uv"; version = "0.1.22"; src = fetchFromGitHub { owner = "astral-sh"; repo = "uv"; rev = version; hash = "sha256-AbixSkwyhj3eBMLvGlodpz7XE3ln0IokNMdu5SOZjOE="; }; cargoLock = { lockFile = ./Cargo.lock; outputHashes = { "async_zip-0.0.16" = "sha256-M94ceTCtyQc1AtPXYrVGplShQhItqZZa/x5qLiL+gs0="; "pubgrub-0.2.1" = "sha256-Pn60v5tfpGrssCeuaUcxw5eJ1g8Dk/+un0s8+k4abpo="; }; }; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; cargoBuildFlags = [ "--package" "uv" ]; # Tests require network access doCheck = false; env = { OPENSSL_NO_VENDOR = true; }; passthru.updateScript = nix-update-script { }; meta = with lib; { description = "An extremely fast Python package installer and resolver, written in Rust"; homepage = "https://github.com/astral-sh/uv"; changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md"; license = with licenses; [ asl20 mit ]; maintainers = with maintainers; [ marsam ]; mainProgram = "uv"; }; }