Since Devbox 0.13.0, adding the python package to devbox.json causes two Python packages to be added to /nix/store (same version but different hashes). To reduce storage and improve speed, only one package should be installed.
The problem does not occur if you specify python3 instead of python.
Steps to reproduce
I've put the steps in a Dockerfile to make it easy to test this with a clean slate.
Dockerfile
FROM jetpackio/devbox:0.13.6
WORKDIR /home/devbox
RUN devbox init
ARG PKG
RUN devbox add ${PKG}
RUN devbox install
Using python:
docker build -t devbox-python --build-arg PKG=python@3.12.6 .
docker run --rm devbox-python ls /nix/store | grep python3-3.12.6$
docker image ls devbox-python
Output shows two Python packages in /nix/store and large image size:
17wcwdw4mzk31x5qbmalkqa43155zj79-python3-3.12.6
wfbjq35kxs6x83c3ncpfxdyl5gbhdx4h-python3-3.12.6
REPOSITORY TAG IMAGE ID CREATED SIZE
devbox-python latest 65d021ce8cdd 26 seconds ago 2.69GB
Using python3:
docker build -t devbox-python3 --build-arg PKG=python3@3.12.6 .
docker run --rm devbox-python3 ls /nix/store | grep python3-3.12.6$
docker image ls devbox-python3
Output shows one Python package in /nix/store and smaller image size:
wfbjq35kxs6x83c3ncpfxdyl5gbhdx4h-python3-3.12.6
REPOSITORY TAG IMAGE ID CREATED SIZE
devbox-python3 latest 155b0e3cee81 8 seconds ago 1.27GB
What happened?
Since Devbox 0.13.0, adding the
python
package todevbox.json
causes two Python packages to be added to/nix/store
(same version but different hashes). To reduce storage and improve speed, only one package should be installed.The problem does not occur if you specify
python3
instead ofpython
.Steps to reproduce
I've put the steps in a Dockerfile to make it easy to test this with a clean slate.
Dockerfile
Using
python
:Output shows two Python packages in
/nix/store
and large image size:Using
python3
:Output shows one Python package in
/nix/store
and smaller image size:Command
install
devbox.json
Devbox version
0.13.6
Nix version
nix (Nix) 2.24.7
What system does this bug occur on?
Linux (x86-64)
Debug logs