Skip to content

Commit

Permalink
vfkit: init at 0.5.1 (#334907)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lassulus authored Sep 8, 2024
2 parents 0e157eb + eeed74e commit 1a779f1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/applications/virtualization/podman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
, aardvark-dns
, netavark
, passt
, vfkit
, testers
, podman
}:
Expand All @@ -44,6 +45,8 @@ let
util-linux
iptables
iproute2
] ++ lib.optionals stdenv.isDarwin [
vfkit
] ++ extraPackages);

helpersBin = symlinkJoin {
Expand Down
42 changes: 42 additions & 0 deletions pkgs/by-name/vf/vfkit/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
fetchurl,
stdenvNoCC,
testers,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "vfkit";
version = "0.5.1";

src = fetchurl {
url = "https://github.com/crc-org/vfkit/releases/download/v${finalAttrs.version}/vfkit";
hash = "sha256-at+KsvsKO359d4VUvcSuio2ej5hM6//U4Mj/jqXwhEc=";
};

dontUnpack = true;

installPhase = ''
runHook preInstall
install -Dm755 $src $out/bin/vfkit
runHook postInstall
'';

passthru.tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
};

meta = {
description = "Simple command line tool to start VMs through the macOS Virtualization framework";
homepage = "https://github.com/crc-org/vfkit";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ sarcasticadmin ];
platforms = lib.platforms.darwin;
# Source build will be possible after darwin SDK 12.0 bump
# https://github.com/NixOS/nixpkgs/pull/229210
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
mainProgram = "vfkit";
};
})

0 comments on commit 1a779f1

Please sign in to comment.