at 23.11-beta 40 lines 1.5 kB view raw
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "bluemix-cli"; 5 version = "0.8.0"; 6 7 src = 8 if stdenv.hostPlatform.system == "i686-linux" then 9 fetchurl { 10 name = "linux32-${version}.tar.gz"; 11 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32"; 12 sha256 = "1ryngbjlw59x33rfd32bcz49r93a1q1g92jh7xmi9vydgqnzsifh"; 13 } 14 else 15 fetchurl { 16 name = "linux64-${version}.tar.gz"; 17 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux64"; 18 sha256 = "056zbaca430ldcn0s86vy40m5abvwpfrmvqybbr6fjwfv9zngywx"; 19 } 20 ; 21 22 installPhase = '' 23 install -m755 -D -t $out/bin bin/ibmcloud bin/ibmcloud-analytics 24 install -m755 -D -t $out/bin/cfcli bin/cfcli/cf 25 ln -sv $out/bin/ibmcloud $out/bin/bx 26 ln -sv $out/bin/ibmcloud $out/bin/bluemix 27 install -D -t "$out/share/bash-completion/completions" bx/bash_autocomplete 28 install -D -t "$out/share/zsh/site-functions" bx/zsh_autocomplete 29 ''; 30 31 meta = with lib; { 32 description = "Administration CLI for IBM BlueMix"; 33 homepage = "https://console.bluemix.net/docs/cli/index.html"; 34 downloadPage = "https://console.bluemix.net/docs/cli/reference/bluemix_cli/download_cli.html#download_install"; 35 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 36 license = licenses.unfree; 37 maintainers = [ maintainers.tazjin maintainers.jensbin ]; 38 platforms = [ "x86_64-linux" "i686-linux" ]; 39 }; 40}