Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
ttyd,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
makeWrapper,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "clive";
|
|
version = "0.12.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "koki-develop";
|
|
repo = "clive";
|
|
tag = "v${version}";
|
|
hash = "sha256-gycxHlNbwPLpR/ATxAsQ68Fetp/hptOUsRc+D3P7x1k=";
|
|
};
|
|
|
|
vendorHash = "sha256-S2MR3eDfAiEz7boUetdPmOf0rQe7QrV6yO1RfMAEj4o=";
|
|
subPackages = [ "." ];
|
|
buildInputs = [ ttyd ];
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
ldflags = [
|
|
"-X github.com/koki-develop/clive/cmd.version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/clive --prefix PATH : ${ttyd}/bin
|
|
''
|
|
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd clive \
|
|
--bash <($out/bin/clive completion bash) \
|
|
--fish <($out/bin/clive completion fish) \
|
|
--zsh <($out/bin/clive completion zsh)
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgramArg = "--version";
|
|
doinstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Automates terminal operations";
|
|
homepage = "https://github.com/koki-develop/clive";
|
|
changelog = "https://github.com/koki-develop/clive/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ misilelab ];
|
|
mainProgram = "clive";
|
|
};
|
|
}
|