2017-01-31 17:39:24 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, docker-machine-kvm, kubernetes, libvirt, qemu }:
|
|
|
|
|
2016-12-06 01:23:59 +00:00
|
|
|
let
|
|
|
|
arch = if stdenv.isLinux
|
|
|
|
then "linux-amd64"
|
|
|
|
else "darwin-amd64";
|
|
|
|
checksum = if stdenv.isLinux
|
2017-01-31 17:39:24 +00:00
|
|
|
then "0njx4vzr0cpr3dba08w0jrlpfb8qrmxq5lqfrk3qrx29x5y6i6hi"
|
|
|
|
else "0i21m1pys6rdxcwsk987l08lhzpcbg4bdrznaam02g6jj6jxvq0x";
|
|
|
|
|
|
|
|
# TODO: compile from source
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-12-06 01:23:59 +00:00
|
|
|
pname = "minikube";
|
2017-01-31 17:39:24 +00:00
|
|
|
version = "0.16.0";
|
2016-12-06 01:23:59 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/minikube/releases/v${version}/minikube-${arch}";
|
|
|
|
sha256 = "${checksum}";
|
|
|
|
};
|
|
|
|
|
2017-01-31 17:39:24 +00:00
|
|
|
phases = [ "installPhase" ];
|
2016-12-06 01:23:59 +00:00
|
|
|
|
2017-01-31 17:39:24 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
2016-12-06 01:23:59 +00:00
|
|
|
|
2017-01-31 17:39:24 +00:00
|
|
|
binPath = lib.makeBinPath [ docker-machine-kvm kubernetes libvirt qemu ];
|
2016-12-06 01:23:59 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2017-01-31 17:39:24 +00:00
|
|
|
install -Dm755 ${src} $out/bin/${pname}
|
|
|
|
|
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--prefix PATH : ${binPath}
|
2016-12-06 01:23:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/kubernetes/minikube;
|
|
|
|
description = "A tool that makes it easy to run Kubernetes locally";
|
|
|
|
license = licenses.asl20;
|
2017-01-31 17:39:24 +00:00
|
|
|
maintainers = with maintainers; [ ebzzry ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-12-06 01:23:59 +00:00
|
|
|
};
|
|
|
|
}
|