minikube: pull kubernetes into PATH and 0.15 -> 0.16
Also add support for KVM
This commit is contained in:
parent
1e835f23de
commit
50f1d8d2fa
|
@ -1,15 +1,18 @@
|
|||
{ stdenv, fetchurl, kubernetes }:
|
||||
{ stdenv, lib, fetchurl, makeWrapper, docker-machine-kvm, kubernetes, libvirt, qemu }:
|
||||
|
||||
let
|
||||
arch = if stdenv.isLinux
|
||||
then "linux-amd64"
|
||||
else "darwin-amd64";
|
||||
checksum = if stdenv.isLinux
|
||||
then "1g6k3va84nm2h9z2ywbbkc8jabgkarqlf8wv1sp2p6s6hw7hi5h3"
|
||||
else "0jpwyvgpl34n07chcyd7ldvk3jq3rx72cp8yf0bh7gnzr5lcnxnc";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
then "0njx4vzr0cpr3dba08w0jrlpfb8qrmxq5lqfrk3qrx29x5y6i6hi"
|
||||
else "0i21m1pys6rdxcwsk987l08lhzpcbg4bdrznaam02g6jj6jxvq0x";
|
||||
|
||||
# TODO: compile from source
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "minikube";
|
||||
version = "0.15.0";
|
||||
version = "0.16.0";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -17,26 +20,24 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "${checksum}";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
propagatedBuildInputs = [ kubernetes ];
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
binPath = lib.makeBinPath [ docker-machine-kvm kubernetes libvirt qemu ];
|
||||
|
||||
installPhase = ''
|
||||
cp $src $out/bin/${pname}
|
||||
chmod +x $out/bin/${pname}
|
||||
install -Dm755 ${src} $out/bin/${pname}
|
||||
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--prefix PATH : ${binPath}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/kubernetes/minikube;
|
||||
description = "A tool that makes it easy to run Kubernetes locally";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ebzzry ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ ebzzry ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue