2019-08-22 10:26:51 +01:00
|
|
|
{ stdenv, buildGoModule, libvirt, pkgconfig, minikube }:
|
2018-06-05 22:06:56 +01:00
|
|
|
|
2019-08-22 10:26:51 +01:00
|
|
|
buildGoModule rec {
|
2018-06-05 22:06:56 +01:00
|
|
|
pname = "docker-machine-kvm2";
|
2018-10-19 22:34:04 +01:00
|
|
|
version = minikube.version;
|
2018-06-05 22:06:56 +01:00
|
|
|
|
|
|
|
goPackagePath = "k8s.io/minikube";
|
|
|
|
subPackages = [ "cmd/drivers/kvm" ];
|
|
|
|
|
2018-10-19 22:34:04 +01:00
|
|
|
src = minikube.src;
|
2018-06-05 22:06:56 +01:00
|
|
|
|
2019-08-22 10:26:51 +01:00
|
|
|
modSha256 = minikube.go-modules.outputHash;
|
|
|
|
|
2018-06-05 22:06:56 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libvirt ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export buildFlagsArray=(-ldflags="-X k8s.io/minikube/pkg/drivers/kvm/version.VERSION=v${version}")
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2019-08-22 10:26:51 +01:00
|
|
|
mv $out/bin/kvm $out/bin/docker-machine-driver-kvm2
|
2018-06-05 22:06:56 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/kubernetes/minikube/blob/master/docs/drivers.md;
|
|
|
|
description = "KVM2 driver for docker-machine.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|