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

distrobox: does not support macOS (Darwin) #241720

Closed
osalbahr opened this issue Jul 5, 2023 · 4 comments
Closed

distrobox: does not support macOS (Darwin) #241720

osalbahr opened this issue Jul 5, 2023 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@osalbahr
Copy link

osalbahr commented Jul 5, 2023

Describe the bug

Distrobox does not work on macOS.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p distrobox
  2. distrobox enter

Expected behavior

A distrobox is created and entered.

Screenshots

  1. nix-shell -p distrobox
dracula@REDACTED ~ % nix-shell -p distrobox

[nix-shell:~]$ distrobox enter
Missing dependency: we need a container manager.
Please install one of podman or docker.
You can follow the documentation on:
	man distrobox-compatibility
or:
	https://github.com/89luca89/distrobox/blob/main/docs/compatibility.md
  1. nix-shell -p distrobox podman
dracula@REDACTED ~ % nix-shell -p distrobox podman

[nix-shell:~]$ distrobox enter
Error: inspecting object: no such container "my-distrobox"
Cannot find container my-distrobox
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:38? [Y/n]: y
Creating the container with command:
  /nix/store/fnq0wrsgzz354xg4sxfnp4hg70pbl81q-distrobox-1.5.0.2/bin/distrobox-create -i registry.fedoraproject.org/fedora-toolbox:38 -n my-distrobox
Creating 'my-distrobox' using image registry.fedoraproject.org/fedora-toolbox:3Error: statfs /nix/store/fnq0wrsgzz354xg4sxfnp4hg70pbl81q-distrobox-1.5.0.2/bin/distrobox-init: no such file or directory
 [ ERR ]
Container my-distrobox is not running.
Starting container my-distrobox
run this command to follow along:

 podman logs -f my-distrobox

Error: no container with name or ID "my-distrobox" found: no such container

[nix-shell:~]$ podman logs -f my-distrobox
Error: no container with name or ID "my-distrobox" found: no such container

3, nix-shell -p distrobox docker

dracula@REDACTED ~ % nix-shell -p distrobox docker

[nix-shell:~]$ distrobox enter
Error: No such container: my-distrobox
Cannot find container my-distrobox
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:38? [Y/n]: 
Creating the container with command:
  /nix/store/fnq0wrsgzz354xg4sxfnp4hg70pbl81q-distrobox-1.5.0.2/bin/distrobox-create -i registry.fedoraproject.org/fedora-toolbox:38 -n my-distrobox
Creating 'my-distrobox' using image registry.fedoraproject.org/fedora-toolbox:3Error response from daemon: make cli opts(): making volume mountpoint for volume /nix/store/fnq0wrsgzz354xg4sxfnp4hg70pbl81q-distrobox-1.5.0.2/bin/distrobox-export: mkdir /nix: operation not permitted
 [ ERR ]
Container my-distrobox is not running.
Starting container my-distrobox
run this command to follow along:

 docker logs -f my-distrobox

Error response from daemon: no container with name or ID "my-distrobox" found: no such container
Error: failed to start containers: my-distrobox

[nix-shell:~]$ docker logs -f my-distrobox
Error: No such container: my-distrobox

Additional context

The upstream does not support macOS (Darwin) 89luca89/distrobox#36: [Feature] MacOS host support. I'm not sure why https://search.nixos.org/packages?show=distrobox displays x86_64-darwin (and aarch64-darwin) under Platforms.

Notify maintainers

@AtilaSaraiva @r-ryantm

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

dracula@REDACTED ~ % nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 22.5.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.16.1`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Note: I'm actually not on macOS 10.16 but running the latest, macOS Ventura 13.4.1.

dracula@REDACTED ~ % nix-shell -p hyfetch                     

[nix-shell:~]$ neowofetch
                    c.'          dracula@Osamas-MacBook-Pro 
                 ,xNMM.          -------------------------- 
               .OMMMMo           OS: macOS Ventura 13.4.1 (22F82) x86_64 
               lMM"              Host: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) 
     .;loddo:.  .olloddol;.      Kernel: 22.5.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 11 hours, 32 mins 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Shell: bash 5.2.15 
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Resolution: 2560x1600 
;MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua () 
:MMMMMMMMMMMMMMMMMMMMMMMM:       WM: Quartz Compositor 
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM Theme: Blue (Dark) 
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    Terminal: Apple_Terminal 
 'XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal Font: SFMono-Regular 11 
  'XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Intel i5-7360U (4) @ 2.30GHz 
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Intel Iris Plus Graphics 640 
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 6798.67 MiB / 8192.00 MiB 
       "cooc*"    "*coo'"
                                                         
                                                         

Screenshot 2023-07-05 at 1 09 16 PM

Related issue: nixpkgs podman and qemu on darwin don't play well together #169118

@osalbahr osalbahr added the 0.kind: bug Something is broken label Jul 5, 2023
@osalbahr osalbahr changed the title distrobox: does not support macOS distrobox: does not support macOS (Darwin) Jul 5, 2023
@MichaelPachec0
Copy link
Member

MichaelPachec0 commented Jul 5, 2023

It shows as compatible because the derivation states that it is.

It would be a pretty easy fix to not show up as compatible with darwin targets. My question is since the expected behavior you mention is not what upstream currently supports, what it would take to close this issue? Would marking this package as not compatible (which would close the issue) until upstream supports darwin (at which point a new issue is created) targets be enough? or something else?

@osalbahr
Copy link
Author

osalbahr commented Jul 5, 2023

It shows as compatible because the derivation states that it is.

Oh, ok. Thank you for clarifying. I’m new to nix so I don’t know how derivations work.

It would be a pretty easy fix to not show up as compatible with darwin targets. My question is since the expected behavior you mention is not what upstream currently supports, what it would take to close this issue? Would marking this package as not compatible until upstream supports darwin targets be enough? or something else?

Not sure what the proper action is tbh. I am reporting how I interpreted the page. I thought nix somehow made distrobox work on macOS but then it didn’t so I opened an issue. How is compatibility usually determined in nixpkgs?

@MichaelPachec0
Copy link
Member

MichaelPachec0 commented Jul 5, 2023

Not sure what the proper action is tbh. I am reporting how I interpreted the page. I thought nix somehow made distrobox work on macOS but then it didn’t so I opened an issue. How is compatibility usually determined in nixpkgs?

Nix does not auto-magically do this. nix on darwin runs directly on darwin (as I understand) so if upstream does not support it, it is very likely the case that packages installed by nix on darwin wont either. This is still a valid issue, since upstream does not support darwin yet the derivation shows that it does.

@osalbahr
Copy link
Author

osalbahr commented Jul 8, 2023

Should be fixed by #242143.

@osalbahr osalbahr closed this as completed Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants