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 - ] 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + , libkrb5 5 + , git 6 + , installShellFiles 7 + , testVersion 8 + , openshift 7 9 }: 8 10 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; 11 + buildGoModule rec { 12 + pname = "openshift"; 13 + version = "4.10.0"; 14 + gitCommit = "346b183"; 26 15 27 16 src = fetchFromGitHub { 28 17 owner = "openshift"; 29 - repo = "origin"; 30 - rev = "v${version}"; 31 - sha256 = "16bc6ljm418kxz92gz8ldm82491mvlqamrvigyr6ff72rf7ml7ba"; 18 + repo = "oc"; 19 + rev = "release-4.10"; 20 + sha256 = "Pdq3OwT5P7vvB70X+GVglT9CdJbhkm35nvEGurO1HPc="; 32 21 }; 33 22 34 - goPackagePath = "github.com/openshift/origin"; 23 + vendorSha256 = null; 35 24 36 25 buildInputs = [ libkrb5 ]; 37 26 38 - nativeBuildInputs = [ 39 - clang 40 - go-bindata 41 - installShellFiles 42 - ncurses 43 - rsync 44 - which 45 - ]; 27 + nativeBuildInputs = [ installShellFiles ]; 46 28 47 29 patchPhase = '' 48 30 patchShebangs ./hack 49 31 ''; 50 32 51 33 buildPhase = '' 52 - cd go/src/${goPackagePath} 53 34 # Openshift build require this variables to be set 54 35 # 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}' 36 + export SOURCE_GIT_COMMIT=${gitCommit} 37 + export SOURCE_GIT_TAG=v${version} 38 + export SOURCE_GIT_TREE_STATE=clean 39 + 40 + make all 68 41 ''; 69 42 70 43 installPhase = '' 71 44 mkdir -p $out/bin 72 - cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/" 45 + cp oc $out/bin 46 + 47 + mkdir -p man 48 + ./genman man oc 49 + installManPage man/*.1 50 + 73 51 installShellCompletion --bash contrib/completions/bash/* 74 52 installShellCompletion --zsh contrib/completions/zsh/* 75 53 ''; 76 54 55 + passthru.tests.version = testVersion { 56 + package = openshift; 57 + command = "oc version"; 58 + version = "v${version}"; 59 + }; 60 + 77 61 meta = with lib; { 78 62 description = "Build, deploy, and manage your applications with Docker and Kubernetes"; 79 63 license = licenses.asl20; 80 64 homepage = "http://www.openshift.org"; 81 - maintainers = with maintainers; [offline bachp moretea]; 65 + maintainers = with maintainers; [ offline bachp moretea stehessel ]; 82 66 platforms = platforms.unix; 83 67 }; 84 68 }