Created
July 25, 2024 20:38
-
-
Save NickLarsenNZ/e35943aada6d38ac6a2bf16f7d08561d to your computer and use it in GitHub Desktop.
Replicated CLI for Nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv | |
, lib | |
, fetchurl | |
, installShellFiles | |
}: | |
stdenv.mkDerivation rec { | |
pname = "replicated"; | |
version = "0.78.0"; | |
src = fetchurl { | |
url = "https://github.com/replicatedhq/replicated/releases/download/v${version}/replicated_${version}_linux_amd64.tar.gz"; | |
hash = "sha256-Si5cbAkVMMt11Ipn61eQXR9ZQIUFDtY7O87FaCriBIM="; | |
}; | |
nativeBuildInputs = [ | |
installShellFiles | |
]; | |
sourceRoot = "."; | |
installPhase = '' | |
runHook preInstall | |
install -m755 -D replicated $out/bin/replicated | |
installShellCompletion --cmd replicated \ | |
--bash <($out/bin/replicated completion bash) \ | |
--fish <($out/bin/replicated completion fish) \ | |
--zsh <($out/bin/replicated completion zsh) | |
runHook postInstall | |
''; | |
meta = with lib; { | |
homepage = "https://replicated.com"; | |
description = "Replicated CLI"; | |
platforms = platforms.linux; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment