-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
minikube: bundle kvm2 driver #41644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minikube: bundle kvm2 driver #41644
Conversation
Failure on aarch64-linux (full log) Attempted: minikube Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: minikube Partial log (click to expand)
|
pkgs/top-level/all-packages.nix
Outdated
@@ -16882,6 +16882,10 @@ with pkgs; | |||
|
|||
minikube = callPackage ../applications/networking/cluster/minikube { | |||
inherit (darwin.apple_sdk.frameworks) vmnet; | |||
drivers = lib.optionals stdenv.isLinux [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this in the argument definition in order to reduce the size of all-packages.nix
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would I do this cleanly? This comes to mind:
{ stdenv, buildGoPackage, fetchFromGitHub, fetchurl, go-bindata, libvirt, qemu
, gpgme, makeWrapper, hostPlatform, vmnet, python, pkgconfig
, pkgs, drivers ? stdenv.lib.optionals stdenv.isLinux [ pkgs.docker-machine-kvm pkgs.docker-machine-kvm2 ]
}:
But I don't like adding a pkgs
argument. Or do I do something like:
{ stdenv, buildGoPackage, fetchFromGitHub, fetchurl, go-bindata, libvirt, qemu
, gpgme, makeWrapper, hostPlatform, vmnet, python, pkgconfig
, kvmDriver ? stdenv.isLinux, docker-machine-kvm
, kvm2Driver ? stdenv.isLinux, docker-machine-kvm2
}:
and handle those specifically in binPath
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we could not just add docker-machine-kvm2
to the argument list as it is done for docker-machine-kvm
? Moreover, docker-machine-kvm
is supposed to be removed so it will remain only one driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @nlewo: Just add that package as you do now (with docker-machine-kvm
) and internally create a list of supported drivers.
let
drivers = filter (d: d != null) ([]
++ lib.optionals stdenv.isLinux [ docker-machine-kvm docker-machine-kvm2 ]
++ lib.optionals stdenv.isDarwn [ … ]
);
in …
Note: I am not sure if the null
filter is required here. Thought is that it will allow people to set inputs to null
in their overrides and remove specific drivers if they do not want them to be available.
If you want to allow people to add packages (as drivers) that aren't specified within the minikube
derivation: Add an extraDrivers argument that defaults to []
and add that to the list of drivers that are being assembled in the packages expression.
Success on x86_64-linux (full log) Attempted: minikube Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: minikube Partial log (click to expand)
|
Looks good to me. @nlewo any objections? |
Motivation for this change
See #34448
Add a
drivers ? []
argument for bundling arbitrary binaries in the minikubePATH
. This currently defaults to[ docker-machine-kvm docker-machine-kvm2 ]
on Linux.A separate effort is here: #39438
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)