2018-05-08 09:22:25 +01:00
|
|
|
{ lib, stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bluemix-cli";
|
2018-07-16 14:38:45 +01:00
|
|
|
version = "0.8.0";
|
2018-05-08 09:22:25 +01:00
|
|
|
|
2018-07-16 14:38:45 +01:00
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then
|
2018-07-16 14:38:45 +01:00
|
|
|
fetchurl {
|
|
|
|
name = "linux32-${version}.tar.gz";
|
|
|
|
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
|
|
|
|
sha256 = "1ryngbjlw59x33rfd32bcz49r93a1q1g92jh7xmi9vydgqnzsifh";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
|
|
|
name = "linux64-${version}.tar.gz";
|
|
|
|
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux64";
|
|
|
|
sha256 = "056zbaca430ldcn0s86vy40m5abvwpfrmvqybbr6fjwfv9zngywx";
|
|
|
|
}
|
|
|
|
;
|
2018-05-08 09:22:25 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2018-07-16 14:38:45 +01:00
|
|
|
install -m755 -D -t $out/bin bin/ibmcloud bin/ibmcloud-analytics
|
|
|
|
install -m755 -D -t $out/bin/cfcli bin/cfcli/cf
|
|
|
|
ln -sv $out/bin/ibmcloud $out/bin/bx
|
|
|
|
ln -sv $out/bin/ibmcloud $out/bin/bluemix
|
|
|
|
install -D -t "$out/etc/bash_completion.d" bx/bash_autocomplete
|
|
|
|
install -D -t "$out/share/zsh/site-functions" bx/zsh_autocomplete
|
2018-05-08 09:22:25 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Administration CLI for IBM BlueMix";
|
|
|
|
homepage = "https://console.bluemix.net/docs/cli/index.html";
|
|
|
|
downloadPage = "https://console.bluemix.net/docs/cli/reference/bluemix_cli/download_cli.html#download_install";
|
|
|
|
license = licenses.unfree;
|
2018-07-16 14:38:45 +01:00
|
|
|
maintainers = [ maintainers.tazjin maintainers.jensbin ];
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2018-05-08 09:22:25 +01:00
|
|
|
};
|
|
|
|
}
|