depot/third_party/nixpkgs/pkgs/development/tools/twilio-cli/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

37 lines
1.1 KiB
Nix

{ lib, stdenvNoCC, nodejs-slim, fetchzip, testers }:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "twilio-cli";
version = "5.17.0";
src = fetchzip {
url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz";
hash = "sha256-7BJ/9dqEKBjH89XDyIonRbfCn8cyjvgtV2PwdzGIUro=";
};
buildInputs = [ nodejs-slim ];
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-slim.meta.platforms;
mainProgram = "twilio";
};
})