depot/third_party/nixpkgs/pkgs/development/tools/twilio-cli/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

37 lines
1.1 KiB
Nix

{ lib, stdenvNoCC, nodejs, fetchzip, testers }:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "twilio-cli";
version = "5.8.1";
src = fetchzip {
url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz";
sha256 = "sha256-RFYuqizx4l5rjCsyat8zDSP9wUmbiDimcJQi93LltCI=";
};
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
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
meta = with lib; {
description = "Unleash the power of Twilio from your command prompt";
homepage = "https://github.com/twilio/twilio-cli";
changelog = "https://github.com/twilio/twilio-cli/blob/${finalAttrs.version}/CHANGES.md";
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
platforms = nodejs.meta.platforms;
mainProgram = "twilio";
};
})