lol

Merge pull request #166503 from stehessel/update-openshift-4.10

openshift: 4.1 -> 4.10

authored by

Pascal Bach and committed by
GitHub
fe9906cb 45f98389

+35 -51
+35 -51
pkgs/applications/networking/cluster/openshift/default.nix
··· 1 - { lib, fetchFromGitHub, buildGoPackage, which, go-bindata, rsync, util-linux 2 - , coreutils, libkrb5, ncurses, clang, installShellFiles 3 - , components ? [ 4 - "cmd/oc" 5 - "cmd/openshift" 6 - ] 7 }: 8 9 - with lib; 10 - 11 - let 12 - version = "4.1.0"; 13 - ver = lib.elemAt (lib.splitVersion version); 14 - versionMajor = ver 0; 15 - versionMinor = ver 1; 16 - versionPatch = ver 2; 17 - gitCommit = "b4261e0"; 18 - # version is in vendor/k8s.io/kubernetes/pkg/version/base.go 19 - k8sversion = "v1.11.1"; 20 - k8sgitcommit = "b1b2997"; 21 - k8sgitMajor = "0"; 22 - k8sgitMinor = "1"; 23 - in buildGoPackage rec { 24 - pname = "openshift-origin"; 25 - inherit version; 26 27 src = fetchFromGitHub { 28 owner = "openshift"; 29 - repo = "origin"; 30 - rev = "v${version}"; 31 - sha256 = "16bc6ljm418kxz92gz8ldm82491mvlqamrvigyr6ff72rf7ml7ba"; 32 }; 33 34 - goPackagePath = "github.com/openshift/origin"; 35 36 buildInputs = [ libkrb5 ]; 37 38 - nativeBuildInputs = [ 39 - clang 40 - go-bindata 41 - installShellFiles 42 - ncurses 43 - rsync 44 - which 45 - ]; 46 47 patchPhase = '' 48 patchShebangs ./hack 49 ''; 50 51 buildPhase = '' 52 - cd go/src/${goPackagePath} 53 # Openshift build require this variables to be set 54 # unless there is a .git folder which is not the case with fetchFromGitHub 55 - echo "OS_GIT_VERSION=v${version}" >> os-version-defs 56 - echo "OS_GIT_TREE_STATE=clean" >> os-version-defs 57 - echo "OS_GIT_MAJOR=${versionMajor}" >> os-version-defs 58 - echo "OS_GIT_MINOR=${versionMinor}" >> os-version-defs 59 - echo "OS_GIT_PATCH=${versionPatch}" >> os-version-defs 60 - echo "OS_GIT_COMMIT=${gitCommit}" >> os-version-defs 61 - echo "KUBE_GIT_VERSION=${k8sversion}" >> os-version-defs 62 - echo "KUBE_GIT_COMMIT=${k8sgitcommit}" >> os-version-defs 63 - echo "KUBE_GIT_MAJOR=${k8sgitMajor}" >> os-version-defs 64 - echo "KUBE_GIT_MINOR=${k8sgitMinor}" >> os-version-defs 65 - export OS_VERSION_FILE="os-version-defs" 66 - export CC=clang 67 - make all WHAT='${concatStringsSep " " components}' 68 ''; 69 70 installPhase = '' 71 mkdir -p $out/bin 72 - cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/" 73 installShellCompletion --bash contrib/completions/bash/* 74 installShellCompletion --zsh contrib/completions/zsh/* 75 ''; 76 77 meta = with lib; { 78 description = "Build, deploy, and manage your applications with Docker and Kubernetes"; 79 license = licenses.asl20; 80 homepage = "http://www.openshift.org"; 81 - maintainers = with maintainers; [offline bachp moretea]; 82 platforms = platforms.unix; 83 }; 84 }
··· 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + , libkrb5 5 + , git 6 + , installShellFiles 7 + , testVersion 8 + , openshift 9 }: 10 11 + buildGoModule rec { 12 + pname = "openshift"; 13 + version = "4.10.0"; 14 + gitCommit = "346b183"; 15 16 src = fetchFromGitHub { 17 owner = "openshift"; 18 + repo = "oc"; 19 + rev = "release-4.10"; 20 + sha256 = "Pdq3OwT5P7vvB70X+GVglT9CdJbhkm35nvEGurO1HPc="; 21 }; 22 23 + vendorSha256 = null; 24 25 buildInputs = [ libkrb5 ]; 26 27 + nativeBuildInputs = [ installShellFiles ]; 28 29 patchPhase = '' 30 patchShebangs ./hack 31 ''; 32 33 buildPhase = '' 34 # Openshift build require this variables to be set 35 # unless there is a .git folder which is not the case with fetchFromGitHub 36 + export SOURCE_GIT_COMMIT=${gitCommit} 37 + export SOURCE_GIT_TAG=v${version} 38 + export SOURCE_GIT_TREE_STATE=clean 39 + 40 + make all 41 ''; 42 43 installPhase = '' 44 mkdir -p $out/bin 45 + cp oc $out/bin 46 + 47 + mkdir -p man 48 + ./genman man oc 49 + installManPage man/*.1 50 + 51 installShellCompletion --bash contrib/completions/bash/* 52 installShellCompletion --zsh contrib/completions/zsh/* 53 ''; 54 55 + passthru.tests.version = testVersion { 56 + package = openshift; 57 + command = "oc version"; 58 + version = "v${version}"; 59 + }; 60 + 61 meta = with lib; { 62 description = "Build, deploy, and manage your applications with Docker and Kubernetes"; 63 license = licenses.asl20; 64 homepage = "http://www.openshift.org"; 65 + maintainers = with maintainers; [ offline bachp moretea stehessel ]; 66 platforms = platforms.unix; 67 }; 68 }