commit d88ebe54679356cc745ac087dfae56c600cf10a8
parent d30165e64eb013571fcf7e455f0f3662cfdcd583
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 16 Jul 2020 16:57:42 +0200
pkgs/openshift-install: add multiple versions…
… and bump to the last one.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
2 files changed, 57 insertions(+), 32 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -75,7 +75,12 @@ rec {
oc_4_5
;
oc = oc_4_4;
- openshift-install = pkgs.callPackage ./openshift-install { };
+ inherit (pkgs.callPackage ./openshift-install { })
+ openshift-install_4_3
+ openshift-install_4_4
+ openshift-install_4_5
+ ;
+ openshift-install = openshift-install_4_4;
inherit (pkgs.callPackage ./crc { oc_4_4 = oc_4_4; oc_4_3 = oc_4_3; })
crc_1_9
diff --git a/pkgs/openshift-install/default.nix b/pkgs/openshift-install/default.nix
@@ -1,36 +1,56 @@
{ stdenv, lib, fetchurl }:
-stdenv.mkDerivation rec {
- pname = "openshift-install";
- version = "4.4.11";
- name = "${pname}-${version}";
-
- src = fetchurl {
- url = "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${version}/openshift-install-linux-${version}.tar.gz";
- sha256 = "0sahh666xalz60ycf6cv771xkhmfz4kvj6gbj217mzbpgb4pzlbd";
- };
+with lib;
+rec {
+ openshiftInstallGen =
+ { version
+ , sha256
+ }:
+
+ stdenv.mkDerivation rec {
+ pname = "openshift-install";
+ name = "${pname}-${version}";
+
+ src = fetchurl {
+ inherit sha256;
+ url = "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${version}/openshift-install-linux-${version}.tar.gz";
+ };
+
+ phases = " unpackPhase installPhase fixupPhase ";
+
+ unpackPhase = ''
+ runHook preUnpack
+ mkdir ${name}
+ tar -C ${name} -xzf $src
+ '';
- phases = " unpackPhase installPhase fixupPhase ";
-
- unpackPhase = ''
- runHook preUnpack
- mkdir ${name}
- tar -C ${name} -xzf $src
- '';
-
- installPhase = ''
- runHook preInstall
- install -D ${name}/openshift-install $out/bin/openshift-install
- # completions
- mkdir -p $out/share/bash-completion/completions/
- $out/bin/openshift-install completion bash > $out/share/bash-completion/completions/openshift-install
- mkdir -p $out/share/zsh/site-functions
- $out/bin/openshift-install completion zsh > $out/share/zsh/site-functions/_openshift-install
- '';
-
- meta = {
- description = "Install an OpenShift cluster";
- homepage = https://github.com/openshift/installer;
- license = lib.licenses.asl20;
+ installPhase = ''
+ runHook preInstall
+ install -D ${name}/openshift-install $out/bin/openshift-install
+ # completions
+ mkdir -p $out/share/bash-completion/completions/
+ $out/bin/openshift-install completion bash > $out/share/bash-completion/completions/openshift-install
+ mkdir -p $out/share/zsh/site-functions
+ $out/bin/openshift-install completion zsh > $out/share/zsh/site-functions/_openshift-install
+ '';
+
+ meta = {
+ description = "Install an OpenShift cluster";
+ homepage = https://github.com/openshift/installer;
+ license = lib.licenses.asl20;
+ };
+ };
+
+ openshift-install_4_5 = makeOverridable openshiftInstallGen {
+ version = "4.5.2";
+ sha256 = "0apb94914y9g2driwbnbcgd3y60jwsnpmb0n8nlzrshbfmkvp7l7";
+ };
+ openshift-install_4_4 = makeOverridable openshiftInstallGen {
+ version = "4.4.13";
+ sha256 = "10n2i0wkzay277cixc3qifag8l0pqba31ljvczx5m8bi06hnnsni";
+ };
+ openshift-install_4_3 = makeOverridable openshiftInstallGen {
+ version = "4.3.29";
+ sha256 = "0rrzmc8pkks8k3ar834z6k5nl0mgpi8llyb14slcn7mwilwg9024";
};
}