diff options
Diffstat (limited to 'pkgs/tools/admin/triton/default.nix')
-rw-r--r-- | pkgs/tools/admin/triton/default.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/tools/admin/triton/default.nix b/pkgs/tools/admin/triton/default.nix new file mode 100644 index 0000000000000..d5841e924571d --- /dev/null +++ b/pkgs/tools/admin/triton/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +, installShellFiles +, testers +, triton +}: + +buildNpmPackage rec { + pname = "triton"; + version = "7.15.4"; + + src = fetchFromGitHub { + owner = "TritonDataCenter"; + repo = "node-triton"; + rev = version; + hash = "sha256-RjYJT8Iw9JZzvd2d9zh2CS27qUx12nDi12k+YuTh7tk="; + }; + + npmDepsHash = "sha256-2ZTTgJ4LzmlfFoNNNPrrmna5pbREshdw5x9w5N7nasc="; + + dontBuild = true; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd triton --bash <($out/bin/triton completion) + # Strip timestamp from generated bash completion + sed -i '/Bash completion generated.*/d' $out/share/bash-completion/completions/triton.bash + ''; + + passthru = { + tests.version = testers.testVersion { + package = triton; + }; + }; + + meta = with lib; { + description = "TritonDataCenter Client CLI and Node.js SDK"; + homepage = "https://github.com/TritonDataCenter/node-triton"; + license = licenses.mpl20; + maintainers = with maintainers; [ teutat3s ]; + }; +} |