Something went wrong. Try again.
Nix configuration
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738{ stdenv, lib, fetchurl }:
# Factory: call with { version, hash, isLatest ? false }.# isLatest=true installs as `talosctl`; otherwise installs as `talosctl-MAJ.MIN`.{ version, hash, isLatest ? false }:
let suffix = lib.optionalString (!isLatest) "-${lib.versions.majorMinor version}"; binName = "talosctl${suffix}";instdenv.mkDerivation { pname = binName; inherit version;
src = fetchurl { url = "https://github.com/siderolabs/talos/releases/download/v${version}/talosctl-linux-amd64"; inherit hash; };
dontUnpack = true; dontConfigure = true; dontBuild = true;
installPhase = '' runHook preInstall install -Dm755 $src $out/bin/${binName} runHook postInstall '';
meta = with lib; { description = "CLI for Sidero Labs Talos Linux (${version})"; homepage = "https://github.com/siderolabs/talos"; license = licenses.mpl20; mainProgram = binName; platforms = [ "x86_64-linux" ]; };}