minishift: add openshift input

minishift depdends on oc to control the openshift installation.
This commit is contained in:
Christian Albrecht 2018-11-16 23:18:51 +01:00
parent d59307e54c
commit 08c3c0094a
No known key found for this signature in database
GPG Key ID: 866AF4B25DF7EB00

View File

@ -1,5 +1,5 @@
{ 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
}:
@ -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; {