1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/networking/cluster/openshift/default.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2016-09-25 00:57:35 +01:00
{ stdenv, fetchFromGitHub, go, which }:
2015-07-07 10:54:45 +01:00
2016-09-25 00:57:35 +01:00
let
2016-11-09 18:54:09 +00:00
version = "1.3.1";
2016-09-25 00:57:35 +01:00
versionMajor = "1";
versionMinor = "3";
in
2015-07-07 10:54:45 +01:00
stdenv.mkDerivation rec {
name = "openshift-origin-${version}";
2016-09-25 00:57:35 +01:00
inherit version;
2015-07-07 10:54:45 +01:00
2016-09-25 00:57:35 +01:00
src = fetchFromGitHub {
owner = "openshift";
repo = "origin";
rev = "v${version}";
2016-11-09 18:54:09 +00:00
sha256 = "1kxa1k38hvi1vg52p82mmkmp9k4bbbm2pryzapsxwga7d8x4bnbh";
2015-07-07 10:54:45 +01:00
};
2016-09-25 00:57:35 +01:00
buildInputs = [ go which ];
2015-07-07 10:54:45 +01:00
2016-09-25 00:57:35 +01:00
patchPhase = ''
patchShebangs ./hack
'';
buildPhase = ''
export GOPATH=$(pwd)
# Openshift build require this variables to be set
# unless there is a .git folder which is not the case with fetchFromGitHub
export OS_GIT_VERSION=${version}
export OS_GIT_MAJOR=${versionMajor}
export OS_GIT_MINOR=${versionMinor}
make build
'';
2015-07-07 10:54:45 +01:00
installPhase = ''
2016-09-25 00:57:35 +01:00
export GOOS=$(go env GOOS)
export GOARCH=$(go env GOARCH)
2015-07-07 10:54:45 +01:00
mkdir -p "$out/bin"
2016-09-25 00:57:35 +01:00
mv _output/local/bin/$GOOS/$GOARCH/* "$out/bin/"
2015-07-07 10:54:45 +01:00
'';
meta = with stdenv.lib; {
description = "Build, deploy, and manage your applications with Docker and Kubernetes";
license = licenses.asl20;
homepage = http://www.openshift.org;
maintainers = with maintainers; [offline];
2016-11-09 18:54:09 +00:00
platforms = platforms.linux;
2015-07-07 10:54:45 +01:00
};
}