mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
9232a335ef
In "minikube: 1.0.1 -> 1.2.0" [1], the package changed from
buildGoPackage to buildGoModule. This package, docker-machine-kvm2, is
built from the same sources and must follow the same packaging.
[1] a12efe947f
34 lines
880 B
Nix
34 lines
880 B
Nix
{ stdenv, buildGoModule, libvirt, pkgconfig, minikube }:
|
|
|
|
buildGoModule rec {
|
|
pname = "docker-machine-kvm2";
|
|
name = "${pname}-${version}";
|
|
version = minikube.version;
|
|
|
|
goPackagePath = "k8s.io/minikube";
|
|
subPackages = [ "cmd/drivers/kvm" ];
|
|
|
|
src = minikube.src;
|
|
|
|
modSha256 = minikube.go-modules.outputHash;
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [ libvirt ];
|
|
|
|
preBuild = ''
|
|
export buildFlagsArray=(-ldflags="-X k8s.io/minikube/pkg/drivers/kvm/version.VERSION=v${version}")
|
|
'';
|
|
|
|
postInstall = ''
|
|
mv $out/bin/kvm $out/bin/docker-machine-driver-kvm2
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|