diff options
Diffstat (limited to 'pkgs/tools/virtualization/linode-cli/default.nix')
-rw-r--r-- | pkgs/tools/virtualization/linode-cli/default.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/pkgs/tools/virtualization/linode-cli/default.nix b/pkgs/tools/virtualization/linode-cli/default.nix index e25fcb3a19b..a4f54ec8617 100644 --- a/pkgs/tools/virtualization/linode-cli/default.nix +++ b/pkgs/tools/virtualization/linode-cli/default.nix @@ -8,29 +8,33 @@ , requests , setuptools , terminaltables +, rich +, openapi3 +, packaging }: let - sha256 = "0r5by5d6wr5zbsaj211s99qg28nr7wm8iri6jxnksx5b375dah6g"; + hash = "sha256-J0L+FTVzYuAqTDOwpoH12lQr03UNo5dsQpd/iUKR40Q="; # specVersion taken from: https://www.linode.com/docs/api/openapi.yaml at `info.version`. - specVersion = "4.140.0"; - specSha256 = "0ay54m4aa8bmmpjc7s66rfzqzk4w25h48b9a665y29g67ybb432g"; + specVersion = "4.166.0"; + specHash = "sha256-rUwKQt3y/ALZUoW3eJiiIDJYLQpUHO7Abm0h09ra02g="; spec = fetchurl { url = "https://raw.githubusercontent.com/linode/linode-api-docs/v${specVersion}/openapi.yaml"; - sha256 = specSha256; + hash = specHash; }; in buildPythonApplication rec { pname = "linode-cli"; - version = "5.26.1"; + version = "5.45.0"; + pyproject = true; src = fetchFromGitHub { owner = "linode"; repo = pname; - rev = version; - inherit sha256; + rev = "v${version}"; + inherit hash; }; patches = [ @@ -40,7 +44,7 @@ buildPythonApplication rec { # remove need for git history prePatch = '' substituteInPlace setup.py \ - --replace "version=get_version()," "version='${version}'," + --replace "version = get_version()" "version='${version}'," ''; propagatedBuildInputs = [ @@ -49,11 +53,15 @@ buildPythonApplication rec { requests setuptools terminaltables + rich + openapi3 + packaging ]; postConfigure = '' python3 -m linodecli bake ${spec} --skip-config cp data-3 linodecli/ + echo "${version}" > baked_version ''; doInstallCheck = true; @@ -69,9 +77,10 @@ buildPythonApplication rec { passthru.updateScript = ./update.sh; meta = with lib; { + mainProgram = "linode-cli"; description = "The Linode Command Line Interface"; homepage = "https://github.com/linode/linode-cli"; license = licenses.bsd3; - maintainers = with maintainers; [ ryantm ]; + maintainers = with maintainers; [ ryantm techknowlogick ]; }; } |