Merge pull request #50477 from mayflower/minishift-openshift

minishift: add openshift input
This commit is contained in:
Franz Pletz 2018-11-17 07:33:15 +00:00 committed by GitHub
commit 617132eba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,14 @@
{ lib, buildGoPackage, fetchFromGitHub, go-bindata, pkgconfig, makeWrapper
, glib, gtk3, libappindicator-gtk3, gpgme, ostree, libselinux, btrfs-progs
, glib, gtk3, libappindicator-gtk3, gpgme, openshift, ostree, libselinux, btrfs-progs
, lvm2, docker-machine-kvm
}:
let
version = "1.25.0";
version = "1.27.0";
# Update these on version bumps according to Makefile
b2dIsoVersion = "v1.3.0";
centOsIsoVersion = "v1.12.0";
centOsIsoVersion = "v1.13.0";
openshiftVersion = "v3.11.0";
in buildGoPackage rec {
@ -19,7 +19,7 @@ in buildGoPackage rec {
owner = "minishift";
repo = "minishift";
rev = "v${version}";
sha256 = "12a1irj92lplzkr88g049blpjsdsfwfihs2xix971cq7v0w38fkf";
sha256 = "1zd9fjw90h8dlr5w7pdf1agvm51b1zckf3grwwjdg64jqpzdwg9f";
};
nativeBuildInputs = [ pkgconfig go-bindata makeWrapper ];
@ -31,6 +31,11 @@ in buildGoPackage rec {
postPatch = ''
substituteInPlace vendor/github.com/containers/image/storage/storage_image.go \
--replace 'nil, diff' 'diff'
# minishift downloads openshift if not found therefore set the cache to /nix/store/...
substituteInPlace pkg/minishift/cache/oc_caching.go \
--replace 'filepath.Join(oc.MinishiftCacheDir, OC_CACHE_DIR, oc.OpenShiftVersion, runtime.GOOS)' '"${openshift}/bin"' \
--replace '"runtime"' ""
'';
buildFlagsArray = ''
@ -49,7 +54,7 @@ in buildGoPackage rec {
postInstall = ''
wrapProgram "$bin/bin/minishift" \
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm ]}'
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}'
'';
meta = with lib; {