2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenvNoCC, nodejs, fetchzip, testers }:
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
|
|
pname = "twilio-cli";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "5.8.1";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-RFYuqizx4l5rjCsyat8zDSP9wUmbiDimcJQi93LltCI=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ nodejs ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin $out/libexec/twilio-cli
|
|
|
|
cp -R . $out/libexec/twilio-cli
|
|
|
|
ln -s $out/libexec/twilio-cli/bin/run $out/bin/twilio
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2023-01-11 07:51:40 +00:00
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Unleash the power of Twilio from your command prompt";
|
|
|
|
homepage = "https://github.com/twilio/twilio-cli";
|
2023-03-27 19:17:25 +00:00
|
|
|
changelog = "https://github.com/twilio/twilio-cli/blob/${finalAttrs.version}/CHANGES.md";
|
2023-01-11 07:51:40 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ marsam ];
|
|
|
|
platforms = nodejs.meta.platforms;
|
|
|
|
mainProgram = "twilio";
|
|
|
|
};
|
|
|
|
})
|