Created
May 10, 2026 16:02
-
-
Save mausch/ce4a24b8a7293d0c28a4d72afcd1697f to your computer and use it in GitHub Desktop.
vastai-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "Standalone flake packaging vast-cli"; | |
| inputs = { | |
| flake-parts.url = "github:hercules-ci/flake-parts"; | |
| nixpkgs.url = "github:NixOS/nixpkgs/549bd84d6279f9852cae6225e372cc67fb91a4c1"; | |
| }; | |
| outputs = inputs@{ flake-parts, nixpkgs, ... }: | |
| flake-parts.lib.mkFlake { inherit inputs; } { | |
| systems = nixpkgs.lib.systems.flakeExposed; | |
| perSystem = { pkgs, ... }: | |
| let | |
| python = pkgs.python3; | |
| pythonPkgs = python.pkgs; | |
| borb = pythonPkgs.borb.overridePythonAttrs (_: { | |
| doCheck = false; | |
| }); | |
| vast-cli = pythonPkgs.buildPythonApplication rec { | |
| pname = "vast-cli"; | |
| version = "1.0.12"; | |
| pyproject = true; | |
| src = pkgs.fetchFromGitHub { | |
| owner = "vast-ai"; | |
| repo = "vast-cli"; | |
| tag = "v${version}"; | |
| hash = "sha256-UondZHTgZR2X4cSQb/61lYHeGtcWUMQTrNzU86IxdPM="; | |
| }; | |
| pythonRelaxDeps = true; | |
| nativeBuildInputs = [ | |
| pythonPkgs.pythonRelaxDepsHook | |
| ]; | |
| build-system = [ | |
| pythonPkgs.poetry-core | |
| ]; | |
| dependencies = with pythonPkgs; [ | |
| xdg | |
| borb | |
| requests | |
| python-dateutil | |
| urllib3 | |
| pyparsing | |
| aiohttp | |
| aiodns | |
| pycares | |
| anyio | |
| psutil | |
| pycryptodome | |
| argcomplete | |
| curlify | |
| rich | |
| cryptography | |
| pillow | |
| typing-extensions | |
| poetry-dynamic-versioning | |
| ]; | |
| pythonImportsCheck = [ | |
| "vastai" | |
| "vastai_sdk" | |
| ]; | |
| meta = with pkgs.lib; { | |
| description = "CLI and SDK for Vast.ai GPU Cloud Service"; | |
| homepage = "https://vast.ai"; | |
| changelog = "https://github.com/vast-ai/vast-cli/releases/tag/v${version}"; | |
| license = licenses.mit; | |
| mainProgram = "vastai"; | |
| platforms = platforms.all; | |
| }; | |
| }; | |
| in | |
| { | |
| packages = { | |
| default = vast-cli; | |
| inherit vast-cli; | |
| }; | |
| apps.default = { | |
| type = "app"; | |
| program = "${vast-cli}/bin/vastai"; | |
| }; | |
| }; | |
| }; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/vast-ai/vast-cli