c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ lib, stdenvNoCC, nodejs, fetchzip, testers }:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "twilio-cli";
|
|
version = "5.12.0";
|
|
|
|
src = fetchzip {
|
|
url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz";
|
|
sha256 = "sha256-K8SMUT2f8pgxCP5JGFyo/gLm60t0OeCt/1fYAw2HQX0=";
|
|
};
|
|
|
|
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";
|
|
};
|
|
})
|