apps: vfkit and podman

This commit is contained in:
Jeremy Wall 2024-06-21 09:38:34 -04:00
parent 2421d0e06c
commit 4eb3973ce7
4 changed files with 50 additions and 3 deletions

View File

@ -1,4 +1,7 @@
{ pkgs, config, lib, ... }:
let
vfkit = pkgs.callPackage ../packages/vfkit.nix {};
in
{
nix = {
@ -283,6 +286,9 @@
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
environment.systemPackages = [
vfkit
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;

View File

@ -1116,11 +1116,11 @@
},
"unstable": {
"locked": {
"lastModified": 1706367331,
"narHash": "sha256-AqgkGHRrI6h/8FWuVbnkfFmXr4Bqsr4fV23aISqj/xg=",
"lastModified": 1718870667,
"narHash": "sha256-jab3Kpc8O1z3qxwVsCMHL4+18n5Wy/HHKyu1fcsF7gs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "160b762eda6d139ac10ae081f8f78d640dd523eb",
"rev": "9b10b8f00cb5494795e5f51b39210fed4d2b0748",
"type": "github"
},
"original": {

View File

@ -252,6 +252,7 @@ EOF";
durnitisp = durnitisp;
clio = clio;
victoria-logs = pkgs.callPackage ../packages/victoria-logs.nix { };
podman = unstablePkgs.podman;
})
rust-overlay
];
@ -306,6 +307,7 @@ EOF";
ghidra
#podman-desktop # Broken on darwin right now with electron build issues.
# Note that podman expects qemu to be installed in order to use the podman machine setup.
podman
qemu
lima
rlwrap

39
nix/packages/vfkit.nix Normal file
View File

@ -0,0 +1,39 @@
{ 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";
};
})