From 7eab8c22cf6a47a42272c62354eb8f0d80c7c93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 26 Sep 2023 15:32:36 +0200 Subject: [PATCH] replace bubblewrap with fakeroot this restores macOS support. --- pkgs/clan-cli/clan_cli/zerotier/__init__.py | 21 ++++----------------- pkgs/clan-cli/default.nix | 4 ++-- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/zerotier/__init__.py b/pkgs/clan-cli/clan_cli/zerotier/__init__.py index 9dddf07a..cca9403c 100644 --- a/pkgs/clan-cli/clan_cli/zerotier/__init__.py +++ b/pkgs/clan-cli/clan_cli/zerotier/__init__.py @@ -107,26 +107,13 @@ def zerotier_controller() -> Iterator[ZerotierController]: home = tempdir / "zerotier-one" home.mkdir() cmd = nix_shell( - ["bubblewrap"], + ["fakeroot"], [ - "bwrap", - "--proc", - "/proc", - "--dev", - "/dev", - "--unshare-user", - "--uid", - "0", - "--gid", - "0", - "--ro-bind", - "/nix", - "/nix", - "--bind", - str(home), - "/var/lib/zerotier-one", + "fakeroot", + "--", zerotier_exe, f"-p{controller_port}", + str(home), ], ) with subprocess.Popen(cmd) as p: diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index c643448c..860e071b 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -3,7 +3,6 @@ , argcomplete , fastapi , uvicorn -, bubblewrap , installShellFiles , nix , openssh @@ -18,6 +17,7 @@ , stdenv , wheel , zerotierone +, fakeroot , rsync , ui-assets , bash @@ -52,7 +52,7 @@ let bash nix zerotierone - bubblewrap + fakeroot openssh sshpass zbar