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 { 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 , lvm2, docker-machine-kvm
}: }:
let let
version = "1.25.0"; version = "1.27.0";
# Update these on version bumps according to Makefile # Update these on version bumps according to Makefile
b2dIsoVersion = "v1.3.0"; b2dIsoVersion = "v1.3.0";
centOsIsoVersion = "v1.12.0"; centOsIsoVersion = "v1.13.0";
openshiftVersion = "v3.11.0"; openshiftVersion = "v3.11.0";
in buildGoPackage rec { in buildGoPackage rec {
@ -19,7 +19,7 @@ in buildGoPackage rec {
owner = "minishift"; owner = "minishift";
repo = "minishift"; repo = "minishift";
rev = "v${version}"; rev = "v${version}";
sha256 = "12a1irj92lplzkr88g049blpjsdsfwfihs2xix971cq7v0w38fkf"; sha256 = "1zd9fjw90h8dlr5w7pdf1agvm51b1zckf3grwwjdg64jqpzdwg9f";
}; };
nativeBuildInputs = [ pkgconfig go-bindata makeWrapper ]; nativeBuildInputs = [ pkgconfig go-bindata makeWrapper ];
@ -31,6 +31,11 @@ in buildGoPackage rec {
postPatch = '' postPatch = ''
substituteInPlace vendor/github.com/containers/image/storage/storage_image.go \ substituteInPlace vendor/github.com/containers/image/storage/storage_image.go \
--replace 'nil, diff' 'diff' --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 = '' buildFlagsArray = ''
@ -49,7 +54,7 @@ in buildGoPackage rec {
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/minishift" \ wrapProgram "$bin/bin/minishift" \
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm ]}' --prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}'
''; '';
meta = with lib; { meta = with lib; {