podman: add darwin wrapper with qemu for podman machine

- requires xz to unpack vm image
- remove linux install conditional to simplify wrapper
This commit is contained in:
zowoq 2021-07-16 13:08:20 +10:00
parent d41882c7b9
commit f4902536aa
3 changed files with 8 additions and 7 deletions

View file

@ -64,11 +64,9 @@ buildGoModule rec {
installShellCompletion --fish completions/fish/*
installShellCompletion --zsh completions/zsh/*
MANDIR=$man/share/man make install.man-nobuild
'' + lib.optionalString stdenv.isLinux ''
install -Dm644 cni/87-podman-bridge.conflist -t $out/etc/cni/net.d
install -Dm644 contrib/tmpfile/podman.conf -t $out/lib/tmpfiles.d
install -Dm644 contrib/systemd/system/podman.{socket,service} -t $out/lib/systemd/system
'' + ''
runHook postInstall
'';

View file

@ -2,6 +2,7 @@
, runCommand
, makeWrapper
, lib
, stdenv
, extraPackages ? []
, podman # Docker compat
, runc # Default container runtime
@ -13,12 +14,14 @@
, cni-plugins # not added to path
, iptables
, iproute2
, qemu
, xz
}:
let
podman = podman-unwrapped;
binPath = lib.makeBinPath ([
binPath = lib.makeBinPath ([ ] ++ lib.optionals stdenv.isLinux [
runc
crun
conmon
@ -27,6 +30,9 @@ let
util-linux
iptables
iproute2
] ++ lib.optionals stdenv.isDarwin [
qemu
xz
] ++ extraPackages);
in runCommand podman.name {

View file

@ -8056,10 +8056,7 @@ in
podiff = callPackage ../tools/text/podiff { };
podman = if stdenv.isDarwin then
callPackage ../applications/virtualization/podman { }
else
callPackage ../applications/virtualization/podman/wrapper.nix { };
podman = callPackage ../applications/virtualization/podman/wrapper.nix { };
podman-unwrapped = callPackage ../applications/virtualization/podman { };
podman-compose = python3Packages.callPackage ../applications/virtualization/podman-compose {};