diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix new file mode 100644 index 00000000000..99cb7b98f5c --- /dev/null +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix @@ -0,0 +1,21 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/docker/machine"; + fetch = { + type = "git"; + url = "https://github.com/docker/machine"; + rev = "5b274558ea6ca822c06dd407a4e774a0105c3f60"; + sha256 = "1wdq9h4bx7awgclh969gvmcnl9jvgv7ldfklnclh5iv47mi7q22d"; + }; + } + { + goPackagePath = "github.com/zchee/libhyperkit"; + fetch = { + type = "git"; + url = "https://github.com/zchee/libhyperkit"; + rev = "1a19a7693fac32b46ec6cdd22da6fbec974447fc"; + sha256 = "119f5gcl24znwnmi837jk667asd3lirx32jldpd4mbyb3sm9nz24"; + }; + } +] diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix new file mode 100644 index 00000000000..6b0440eb84a --- /dev/null +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -0,0 +1,27 @@ +{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, Hypervisor, vmnet }: + +buildGoPackage rec { + name = "docker-machine-xhyve-${version}"; + version = "0.3.3"; + + goPackagePath = "github.com/zchee/docker-machine-driver-xhyve"; + goDeps = ./xhyve-deps.nix; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "zchee"; + repo = "docker-machine-driver-xhyve"; + sha256 = "0rj6pyqp4yv4j28bglqjs95rip5i77vv8mrkmqv1rxrsl3i8aqqy"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ Hypervisor vmnet ]; + + meta = with stdenv.lib; { + homepage = https://github.com/zchee/docker-machine-driver-xhyve; + description = "Xhyve driver for docker-machine."; + license = licenses.bsd3; + maintainers = with maintainers; [ periklis ]; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8bad50a4799..23a9bb27fe0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14250,6 +14250,9 @@ with pkgs; docker-machine = callPackage ../applications/networking/cluster/docker-machine { }; docker-machine-kvm = callPackage ../applications/networking/cluster/docker-machine/kvm.nix { }; + docker-machine-xhyve = callPackage ../applications/networking/cluster/docker-machine/xhyve.nix { + inherit (darwin.apple_sdk.frameworks) Hypervisor vmnet; + }; docker-distribution = callPackage ../applications/virtualization/docker-distribution { };