Merge pull request #25369 from bachp/openshift-1.5.0
openshift: 1.3.2 -> 1.5.0
This commit is contained in:
commit
b99007de81
@ -1,13 +1,12 @@
|
|||||||
{ stdenv, fetchFromGitHub, go, which }:
|
{ stdenv, fetchFromGitHub, which, buildGoPackage }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.3.2";
|
version = "1.5.0";
|
||||||
ver = stdenv.lib.elemAt (stdenv.lib.splitString "." version);
|
ver = stdenv.lib.elemAt (stdenv.lib.splitString "." version);
|
||||||
versionMajor = ver 0;
|
versionMajor = ver 0;
|
||||||
versionMinor = ver 1;
|
versionMinor = ver 1;
|
||||||
versionPatch = ver 2;
|
versionPatch = ver 2;
|
||||||
in
|
in buildGoPackage rec {
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "openshift-origin-${version}";
|
name = "openshift-origin-${version}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
@ -15,17 +14,18 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "openshift";
|
owner = "openshift";
|
||||||
repo = "origin";
|
repo = "origin";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0zw8zb9c6icigcq6y47ppnjnqyghk2kril07bapbddvgnvbbfp6m";
|
sha256 = "0qvyxcyca3888nkgvyvqcmybm95ncwxb3zvrzbg2gz8kx6g6350v";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go which ];
|
buildInputs = [ which ];
|
||||||
|
|
||||||
|
goPackagePath = null;
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
patchShebangs ./hack
|
patchShebangs ./hack
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export GOPATH=$(pwd)
|
cd go/src/origin-v${version}-src
|
||||||
# Openshift build require this variables to be set
|
# Openshift build require this variables to be set
|
||||||
# unless there is a .git folder which is not the case with fetchFromGitHub
|
# unless there is a .git folder which is not the case with fetchFromGitHub
|
||||||
export OS_GIT_VERSION=${version}
|
export OS_GIT_VERSION=${version}
|
||||||
@ -35,10 +35,8 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
export GOOS=$(go env GOOS)
|
mkdir -p "$bin/bin"
|
||||||
export GOARCH=$(go env GOARCH)
|
cp "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/"
|
||||||
mkdir -p "$out/bin"
|
|
||||||
mv _output/local/bin/$GOOS/$GOARCH/* "$out/bin/"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user