work: +chronoctl

This commit is contained in:
2025-08-27 06:23:05 +00:00
parent f1ad15ed59
commit bb66ae9870
3 changed files with 46 additions and 1 deletions

View File

@@ -105,6 +105,7 @@
nicer = super.callPackage ./pkgs/nicer.nix { };
tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { };
vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { };
chronoctl = super.callPackage ./pkgs/chronoctl.nix { };
pkgs-unstable = import nixpkgs-unstable {
inherit (super) system;
@@ -323,7 +324,7 @@
in
{
packages.x86_64-linux = {
inherit (pkgs) weather gamja;
inherit (pkgs) weather gamja chronoctl;
};
}
);

43
pkgs/chronoctl.nix Normal file
View File

@@ -0,0 +1,43 @@
{
stdenv,
fetchurl,
}:
let
version = "0.71.0";
sources = {
x86_64-linux = {
url = "https://storage.googleapis.com/chronosphere-release/${version}/chronoctl-linux-amd64";
# nix store prefetch-file --hash-type sha256 https://storage.googleapis.com/chronosphere-release/0.71.0/chronoctl-linux-amd64
hash = "sha256-SE7wuSRh3lwx7IBzqMsV3hy4DeHLfbs60uHhhIsLZMs=";
};
aarch64-linux = {
url = "https://storage.googleapis.com/chronosphere-release/${version}/chronoctl-linux-arm64";
# Replace with the real hash (SRI). For a quick prefetch:
# nix store prefetch-file --hash-type sha256 https://storage.googleapis.com/chronosphere-release/0.71.0/chronoctl-linux-arm64
hash = "sha256-iM9fLvpRdpvnxN+Rto1zh5BhwwEkLSuhPzODYd2TtJo=";
};
};
srcInfo =
sources.${stdenv.hostPlatform.system}
or (throw "chronoctl: unsupported system ${stdenv.hostPlatform.system}");
in
stdenv.mkDerivation {
pname = "chronoctl";
inherit version;
src = fetchurl {
inherit (srcInfo) url hash;
};
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm755 "$src" "$out/bin/chronoctl"
runHook postInstall
'';
}

View File

@@ -13,6 +13,7 @@
mysql80
kubectl
kubectx
chronoctl
terraform
github-cli
claude-code