nixpkgs/pkgs/by-name/vf/vfkit/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.2 KiB
Nix
Raw Normal View History

2024-08-14 22:13:18 +00:00
{
lib,
apple-sdk_14,
buildGoModule,
darwin,
darwinMinVersionHook,
fetchFromGitHub,
2024-08-14 22:13:18 +00:00
testers,
vfkit,
2024-08-14 22:13:18 +00:00
}:
buildGoModule rec {
2024-08-14 22:13:18 +00:00
pname = "vfkit";
version = "0.5.1";
src = fetchFromGitHub {
owner = "crc-org";
repo = "vfkit";
rev = "v${version}";
hash = "sha256-9iPr9VhN60B6kBikdEIFAs5mMH+VcmnjGhLuIa3A2JU=";
2024-08-14 22:13:18 +00:00
};
vendorHash = "sha256-6O1T9aOCymYXGAIR/DQBWfjc2sCyU/nZu9b1bIuXEps=";
2024-08-14 22:13:18 +00:00
subPackages = [ "cmd/vfkit" ];
2024-08-14 22:13:18 +00:00
ldflags = [
"-s"
"-w"
"-X github.com/crc-org/vfkit/pkg/cmdline.gitVersion=${src.rev}"
];
2024-08-14 22:13:18 +00:00
nativeBuildInputs = [
darwin.sigtool
];
buildInputs = [
apple-sdk_14
(darwinMinVersionHook "11")
];
postFixup = ''
codesign --entitlements vf.entitlements -f -s - $out/bin/vfkit
2024-08-14 22:13:18 +00:00
'';
passthru.tests = {
version = testers.testVersion { package = vfkit; };
2024-08-14 22:13:18 +00:00
};
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;
sourceProvenance = [ lib.sourceTypes.fromSource ];
2024-08-14 22:13:18 +00:00
mainProgram = "vfkit";
};
}