2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, testers
|
|
|
|
, triton
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "triton";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "7.17.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TritonDataCenter";
|
|
|
|
repo = "node-triton";
|
|
|
|
rev = version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-udS5CnaaeaY+owOrbC3R2jrNBpuTBKOkHrIS2AlHWAE=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
npmDepsHash = "sha256-w33awTkj+YxBoPlmP0JBlZlrMmaWhMC03/5a+LB0RZ8=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|