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

fix(nix): ignore unsupported package psmisc on Darwin #11

Merged
merged 2 commits into from
Mar 17, 2024

Conversation

tomeon
Copy link
Collaborator

@tomeon tomeon commented Feb 27, 2024

psmisc is not available for Darwin; omit it from vagrant-libvirt-create-box's dependency list if Nix detects that it is running on Darwin.

tomeon added 2 commits March 15, 2024 15:34
It's nominally needed (for `fuser`) by `vagrant-libvirt-create-box`, but
YOLO -- we can just suppress/ignore the `127` exit status and modify the
disk image anyway.  This is the snippet in question:

    if fuser -s "$IMG"; then
        error "Image '$IMG_BASENAME' is used by another process"
    fi

If `fuser` is absent, then the command in the `if` stanza will return
status `127`, and `vagrant-libvirt-create-box` will continue execution.
@tomeon tomeon force-pushed the nix-flake-darwin-fix branch from 627e61a to d7b4e7b Compare March 15, 2024 19:35
@tomeon tomeon merged commit 5759bad into jose1711:master Mar 17, 2024
1 of 7 checks passed
@tomeon tomeon deleted the nix-flake-darwin-fix branch March 17, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant