提交 66e24b6a authored 作者: John Kozak's avatar John Kozak

NixOS friendly build process - explicitly detect NixOS and guix

This patch may be removed if

  https://github.com/NixOS/nixpkgs/issues/142383

and a similar change to guix is actioned.
上级 1e699807
......@@ -14,6 +14,7 @@ DOCKER ?= docker
PIP_DIR = $(MEDIASOUP_OUT_DIR)/pip
MESON ?= $(PIP_DIR)/bin/meson
MESON_ARGS ?= ""
PIP_BUILD_BINARIES = $(shell [ -f /etc/NIXOS -o -d /etc/guix ] && echo "--no-binary :all:")
# Disable `*.pyc` files creation.
export PYTHONDONTWRITEBYTECODE = 1
......@@ -42,7 +43,7 @@ ifeq ($(wildcard $(PIP_DIR)),)
$(PYTHON) -m pip install --target=$(PIP_DIR) pip setuptools || \
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
# Install `meson` and `ninja` using `pip` into custom location, so we don't depend on system-wide installation.
$(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) --no-binary ":all:" meson ninja
$(PYTHON) -m pip install --upgrade --target=$(PIP_DIR) $(PIP_BUILD_BINARIES) meson ninja
endif
setup: meson-ninja
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论