From 44719bd4960c649f1a0b793aefab832524eef8bf Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Fri, 26 Mar 2021 10:32:37 +0000 Subject: [PATCH] octant: cleanup - Remove unneeded quotes around `${system}` - Cleanup meta - Correct the variable names in `update.sh` - Luckily even though the names were a jumble the correct shas were being put in the right places --- .../networking/cluster/octant/default.nix | 14 ++++++++------ .../networking/cluster/octant/update.sh | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/cluster/octant/default.nix b/pkgs/applications/networking/cluster/octant/default.nix index 0e97b541a5d..734a1eb3ac3 100644 --- a/pkgs/applications/networking/cluster/octant/default.nix +++ b/pkgs/applications/networking/cluster/octant/default.nix @@ -6,7 +6,7 @@ let x86_64-linux = "Linux-64bit"; aarch64-linux = "Linux-arm64"; x86_64-darwin = "macOS-64bit"; - }."${system}" or (throw "Unsupported system: ${system}"); + }.${system} or (throw "Unsupported system: ${system}"); baseurl = "https://github.com/vmware-tanzu/octant/releases/download"; fetchsrc = version: sha256: fetchzip { url = "${baseurl}/v${version}/octant_${version}_${suffix}.tar.gz"; @@ -48,12 +48,14 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://octant.dev/"; changelog = "https://github.com/vmware-tanzu/octant/blob/v${version}/CHANGELOG.md"; - description = "Highly extensible platform for developers to better understand the complexity of Kubernetes clusters."; + description = "Highly extensible platform for developers to better understand the complexity of Kubernetes clusters"; longDescription = '' - Octant is a tool for developers to understand how applications run on a Kubernetes cluster. - It aims to be part of the developer's toolkit for gaining insight and approaching complexity found in Kubernetes. - Octant offers a combination of introspective tooling, cluster navigation, and object management along with a - plugin system to further extend its capabilities. + Octant is a tool for developers to understand how applications run on a + Kubernetes cluster. + It aims to be part of the developer's toolkit for gaining insight and + approaching complexity found in Kubernetes. Octant offers a combination of + introspective tooling, cluster navigation, and object management along + with a plugin system to further extend its capabilities. ''; license = licenses.asl20; maintainers = with maintainers; [ jk ]; diff --git a/pkgs/applications/networking/cluster/octant/update.sh b/pkgs/applications/networking/cluster/octant/update.sh index 4ffe4aefb30..6c34fc4b37a 100755 --- a/pkgs/applications/networking/cluster/octant/update.sh +++ b/pkgs/applications/networking/cluster/octant/update.sh @@ -28,11 +28,11 @@ replace_sha() { OCTANT_VER=$(curl -Ls -w "%{url_effective}" -o /dev/null https://github.com/vmware-tanzu/octant/releases/latest | awk -F'/' '{print $NF}' | sed 's/v//') OCTANT_LINUX_X64_SHA256=$(fetch_arch "$OCTANT_VER" "Linux-64bit") -OCTANT_DARWIN_X64_SHA256=$(fetch_arch "$OCTANT_VER" "Linux-arm64") -OCTANT_LINUX_AARCH64_SHA256=$(fetch_arch "$OCTANT_VER" "macOS-64bit") +OCTANT_LINUX_AARCH64_SHA256=$(fetch_arch "$OCTANT_VER" "Linux-arm64") +OCTANT_DARWIN_X64_SHA256=$(fetch_arch "$OCTANT_VER" "macOS-64bit") sed -i "s/version = \".*\"/version = \"$OCTANT_VER\"/" "$NIX_DRV" replace_sha "x86_64-linux" "$OCTANT_LINUX_X64_SHA256" -replace_sha "x86_64-darwin" "$OCTANT_LINUX_AARCH64_SHA256" -replace_sha "aarch64-linux" "$OCTANT_DARWIN_X64_SHA256" +replace_sha "aarch64-linux" "$OCTANT_LINUX_AARCH64_SHA256" +replace_sha "x86_64-darwin" "$OCTANT_DARWIN_X64_SHA256"