home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

openshift-install.nix (2237B)


      1 { stdenv, lib, fetchurl }:
      2 
      3 with lib;
      4 rec {
      5   openshiftInstallGen =
      6     { version
      7     , sha256
      8     }:
      9 
     10     stdenv.mkDerivation rec {
     11       pname = "openshift-install";
     12       name = "${pname}-${version}";
     13 
     14       src = fetchurl {
     15         inherit sha256;
     16         url = "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${version}/openshift-install-linux-${version}.tar.gz";
     17       };
     18 
     19       phases = " unpackPhase installPhase fixupPhase ";
     20 
     21       unpackPhase = ''
     22         runHook preUnpack
     23         mkdir ${name}
     24         tar -C ${name} -xzf $src
     25       '';
     26 
     27       installPhase = ''
     28         runHook preInstall
     29         install -D ${name}/openshift-install $out/bin/openshift-install
     30         # completions
     31         mkdir -p $out/share/bash-completion/completions/
     32         $out/bin/openshift-install completion bash > $out/share/bash-completion/completions/openshift-install
     33         #mkdir -p $out/share/zsh/site-functions
     34         #$out/bin/openshift-install completion zsh > $out/share/zsh/site-functions/_openshift-install
     35       '';
     36 
     37       meta = {
     38         description = "Install an OpenShift cluster";
     39         homepage = https://github.com/openshift/installer;
     40         license = lib.licenses.asl20;
     41       };
     42     };
     43 
     44   openshift-install = openshift-install_4_8;
     45   openshift-install_4_8 = makeOverridable openshiftInstallGen {
     46     version = "4.8.14";
     47     sha256 = "03n71m4bdsjwfc5ynvbyvvfdnrvrbsa9kn5yd6gaaql0y591ya90";
     48   };
     49   openshift-install_4_7 = makeOverridable openshiftInstallGen {
     50     version = "4.7.33";
     51     sha256 = "19ivnppp9k7z71fnv05n0axhkr7srsb26jgri9gx7g1g33q945gz";
     52   };
     53   openshift-install_4_6 = makeOverridable openshiftInstallGen {
     54     version = "4.6.47";
     55     sha256 = "0z0kfiq5yavll9zkp7cv3ki936bzjcmxim8di7lbv0wknb405i9a";
     56   };
     57   openshift-install_4_5 = makeOverridable openshiftInstallGen {
     58     version = "4.5.41";
     59     sha256 = "1356q49bhl0bkqspalh2xymma8rlr5v8xdcfmhflisim930iimw3";
     60   };
     61   openshift-install_4_4 = makeOverridable openshiftInstallGen {
     62     version = "4.4.33";
     63     sha256 = "1mdjccyz4wbcwvg4ax2wr3x52cx5h8a0i25n1a7aawsni6z5261m";
     64   };
     65   openshift-install_4_3 = makeOverridable openshiftInstallGen {
     66     version = "4.3.40";
     67     sha256 = "02in21q7d2bazrgkksk0vy2rflxqssayjjlz43k65cnrk8nnv1sm";
     68   };
     69 }