Context:
- podman: includes missing edk2-aarch64-code.fd on aarch64-darwin by tricktron · Pull Request #163015 · NixOS/nixpkgs · GitHub
- nixpkgs podman and qemu on darwin don't play well together · Issue #169118 · NixOS/nixpkgs · GitHub
- [Bug]: aarch64-darwin: podman installed from nixpkgs uses wrong path for edk2-aarch64-code.fd · Issue #17026 · containers/podman · GitHub
I found some behavior that surprised me. If I install qemu via nix profile install
, its $out/share
gets symlinked to my profile:
$ nix profile install nixpkgs#qemu
$ fd -uL edk2-aarch64-code.fd ~/.nix-profile
/Users/n8henrie/.nix-profile/share/qemu/edk2-aarch64-code.fd
However, if I install declaratively via nix-darwin
(or home-manager
), I don’t see share/qemu
in /run/current-system/sw/share
or /run/current-system/...
anywhere.
$ nix profile remove "$(nix profile list | awk '/qemu/ { print $1 }')"
removing 'flake:nixpkgs#legacyPackages.aarch64-darwin.qemu'
$ type -a qemu-system-aarch64
qemu-system-aarch64 is /run/current-system/sw/bin/qemu-system-aarch64
$ ls /run/current-system/sw/share/qemu
ls: cannot access '/run/current-system/sw/share/qemu': No such file or directory
$ ls /run/current-system/etc/profiles/per-user/n8henrie/share/qemu
ls: cannot access '/run/current-system/etc/profiles/per-user/n8henrie/share/qemu': No such file or directory
$ sudo find -L /run -path '*/share/qemu/*'
$
Is this expected behavior – for $out/share
to be linked with a profile install but not otherwise? (Looks like it may be.) I see the same behavior on x86_64-linux NixOS, so I don’t think it’s a nix-darwin or arm64 issue.