Skip to content
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

Package request: vfkit #306179

Closed
msgilligan opened this issue Apr 23, 2024 · 6 comments · Fixed by #334907
Closed

Package request: vfkit #306179

msgilligan opened this issue Apr 23, 2024 · 6 comments · Fixed by #334907
Labels
0.kind: packaging request Request for a new package to be added

Comments

@msgilligan
Copy link
Contributor

msgilligan commented Apr 23, 2024

Project description

vfkit - Simple command line tool to start VMs through macOS Virtualization Framework

This is (apparently) required by Podman 5.0.x and Darwin. See: #305868

Metadata

@cfergeau
Copy link

This is (apparently) required by Podman 5.0.x and Darwin. See: #305868

I can confirm this is required by podman 5 on macOS in order to start the virtual machine podman machine uses to run containers

@msgilligan
Copy link
Contributor Author

This is (apparently) required by Podman 5.0.x and Darwin. See: #305868

I can confirm this is required

The reason I said "apparently" was because although I had observed that I needed to install vfkit to get Podman to work, I wasn't 100% sure there wasn't an alternative configuration.

@marsam marsam mentioned this issue Apr 24, 2024
13 tasks
@anthr76
Copy link
Contributor

anthr76 commented Apr 25, 2024

I know the PR is closed but it's worth mentioning it didn't work.

@marsam
Copy link
Contributor

marsam commented May 20, 2024

I know the PR is closed but it's worth mentioning it didn't work.

yeah, I could build it with our Darwin SDK, but it seems to disable too many features to make it usable.

I think you can use the following:

# pkgs/by-name/vf/vfkit/package.nix
{ 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 virtualization framework";
    homepage = "https://github.com/crc-org/vfkit";
    license = lib.licenses.asl20;
    maintainers = [ ];
    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";
  };
})

@afh
Copy link
Member

afh commented May 25, 2024

Could you elaborate a bit on which features needed to be disabled and why, @marsam?

@daneov
Copy link
Contributor

daneov commented Aug 6, 2024

@marsam : I just hit this problem and found this issue. Is there a specific reason that specific package was not yet submitted upstream, or could I (beginner) do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants