about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/virtualization
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-05 16:15:01 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-05 16:15:01 +0100
commita2c1eff83c3118a9aee8076c7f84f58137416b6e (patch)
tree4668c9ad2bba229a0eb3ccc8adbe78402e04ab07 /nixpkgs/pkgs/tools/virtualization
parentfa7e5142244bb8fd1c51b66df6e623a7f41cc0d3 (diff)
parent85f1ba3e51676fa8cc604a3d863d729026a6b8eb (diff)
downloadnixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.gz
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.bz2
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.lz
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.xz
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.zst
nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/tools/virtualization')
-rw-r--r--nixpkgs/pkgs/tools/virtualization/awsebcli/default.nix1
-rw-r--r--nixpkgs/pkgs/tools/virtualization/linode-cli/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/virtualization/linode-cli/remove-update-check.patch24
-rwxr-xr-xnixpkgs/pkgs/tools/virtualization/linode-cli/update.sh6
4 files changed, 35 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/tools/virtualization/awsebcli/default.nix b/nixpkgs/pkgs/tools/virtualization/awsebcli/default.nix
index 581b7ee70ec2..594b7a30b2ed 100644
--- a/nixpkgs/pkgs/tools/virtualization/awsebcli/default.nix
+++ b/nixpkgs/pkgs/tools/virtualization/awsebcli/default.nix
@@ -93,5 +93,6 @@ with localPython.pkgs; buildPythonApplication rec {
     changelog = "https://github.com/aws/aws-elastic-beanstalk-cli/blob/${version}/CHANGES.rst";
     maintainers = with maintainers; [ eqyiel kirillrdy ];
     license = licenses.asl20;
+    mainProgram = "eb";
   };
 }
diff --git a/nixpkgs/pkgs/tools/virtualization/linode-cli/default.nix b/nixpkgs/pkgs/tools/virtualization/linode-cli/default.nix
index e25fcb3a19bc..a4f54ec86177 100644
--- a/nixpkgs/pkgs/tools/virtualization/linode-cli/default.nix
+++ b/nixpkgs/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 ];
   };
 }
diff --git a/nixpkgs/pkgs/tools/virtualization/linode-cli/remove-update-check.patch b/nixpkgs/pkgs/tools/virtualization/linode-cli/remove-update-check.patch
index 316d2855b1f4..f26b30edf72d 100644
--- a/nixpkgs/pkgs/tools/virtualization/linode-cli/remove-update-check.patch
+++ b/nixpkgs/pkgs/tools/virtualization/linode-cli/remove-update-check.patch
@@ -1,11 +1,13 @@
---- a/linodecli/cli.py
-+++ b/linodecli/cli.py
-@@ -555,7 +555,7 @@
-         if self.debug_request:
-             self.print_response_debug_info(result)
- 
--        if not self.suppress_warnings:
-+        if False:
-             # check the major/minor version API reported against what we were built
-             # with to see if an upgrade should be available
-             api_version_higher = False
+diff --git a/linodecli/api_request.py b/linodecli/api_request.py
+index 4273aa6..3ada5c2 100644
+--- a/linodecli/api_request.py
++++ b/linodecli/api_request.py
+@@ -305,7 +305,7 @@ def _attempt_warn_old_version(ctx, result):
+                 file=sys.stderr,
+             )
+
+-    if api_version_higher:
++    if False:
+         # check to see if there is, in fact, a version to upgrade to.  If not, don't
+         # suggest an upgrade (since there's no package anyway)
+         new_version_exists = False
\ No newline at end of file
diff --git a/nixpkgs/pkgs/tools/virtualization/linode-cli/update.sh b/nixpkgs/pkgs/tools/virtualization/linode-cli/update.sh
index f232dd1e03b0..8bd0bfe8602e 100755
--- a/nixpkgs/pkgs/tools/virtualization/linode-cli/update.sh
+++ b/nixpkgs/pkgs/tools/virtualization/linode-cli/update.sh
@@ -18,13 +18,13 @@ VERSION=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
     | grep -v -e rc -e list \
     | cut -d '"' -f4 | sort -rV | head -n 1)
 
-SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linode/linode-cli/archive/refs/tags/${VERSION}.tar.gz)
+SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linode/linode-cli/archive/refs/tags/v${VERSION}.tar.gz)
 
 setKV () {
     sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
 }
 
 setKV specVersion ${SPEC_VERSION}
-setKV specSha256 ${SPEC_SHA256}
+setKV specHash ${SPEC_SHA256}
 setKV version ${VERSION}
-setKV sha256 ${SHA256}
+setKV hash ${SHA256}