Skip to content

Commit

Permalink
Add vfkit package
Browse files Browse the repository at this point in the history
See NixOS/nixpkgs#305868 and
NixOS/nixpkgs#334907 for more information.

Signed-off-by: micnncim <micnncim@gmail.com>
  • Loading branch information
micnncim committed Sep 5, 2024
1 parent ba4e414 commit ec21f8a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
mockgen = pkgs.callPackage ./pkgs/mockgen { };
slack-cli = pkgs.callPackage ./pkgs/slack-cli { };
tfcmt = pkgs.callPackage ./pkgs/tfcmt { };
vfkit = pkgs.callPackage ./pkgs/vfkit { };
}
32 changes: 32 additions & 0 deletions pkgs/vfkit/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://github.com/NixOS/nixpkgs/issues/305868
# https://github.com/NixOS/nixpkgs/pull/334907

{ pkgs, lib, fetchurl }:

pkgs.stdenv.mkDerivation rec {
pname = "vfkit";
version = "0.5.1";

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

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

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 ec21f8a

Please sign in to comment.