686ce24904
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, stdenvNoCC, nodejs, fetchzip, testers }:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "twilio-cli";
|
|
version = "5.4.0";
|
|
|
|
src = fetchzip {
|
|
url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz";
|
|
sha256 = "sha256-DSYZUYC4WJiVOtxBWWGV3x/4wxpiJRQsfQYjgfNIj/4=";
|
|
};
|
|
|
|
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 = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "twilio version";
|
|
};
|
|
|
|
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/${version}/CHANGES.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ marsam ];
|
|
platforms = nodejs.meta.platforms;
|
|
mainProgram = "twilio";
|
|
};
|
|
})
|